• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//+build ignore
2
3/*
4 * Copyright 2015 Google Inc.
5 *
6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file.
8 */
9
10package skia
11
12// This file is used to generate 'types.go'
13// from the corresponding type definitions in the C API.
14// Any C struct for which we would like to generate a
15// Go struct with the same memory layout should defined defined here.
16// Any enum that is used in Go should also be listed here, together
17// with the enum values that we want to use.
18
19/*
20#cgo CFLAGS: -I../../include/c
21#include "../../include/c/sk_types.h"
22*/
23import "C"
24
25type Color C.sk_color_t
26
27type ColorType C.sk_colortype_t
28
29const (
30	UNKNOWN_COLORTYPE   ColorType = C.UNKNOWN_SK_COLORTYPE
31	RGBA_8888_COLORTYPE ColorType = C.RGBA_8888_SK_COLORTYPE
32	BGRA_8888_COLORTYPE ColorType = C.BGRA_8888_SK_COLORTYPE
33	ALPHA_8_COLORTYPE   ColorType = C.ALPHA_8_SK_COLORTYPE
34)
35
36type AlphaType C.sk_alphatype_t
37
38const (
39	OPAQUE_ALPHATYPE   AlphaType = C.OPAQUE_SK_ALPHATYPE
40	PREMUL_ALPHATYPE   AlphaType = C.PREMUL_SK_ALPHATYPE
41	UNPREMUL_ALPHATYPE AlphaType = C.UNPREMUL_SK_ALPHATYPE
42)
43
44type PixelGeometry C.sk_pixelgeometry_t
45
46const (
47	UNKNOWN_SK_PIXELGEOMETRY PixelGeometry = C.UNKNOWN_SK_PIXELGEOMETRY
48	RGB_H_SK_PIXELGEOMETRY   PixelGeometry = C.RGB_H_SK_PIXELGEOMETRY
49	BGR_H_SK_PIXELGEOMETRY   PixelGeometry = C.BGR_H_SK_PIXELGEOMETRY
50	RGB_V_SK_PIXELGEOMETRY   PixelGeometry = C.RGB_V_SK_PIXELGEOMETRY
51	BGR_V_SK_PIXELGEOMETRY   PixelGeometry = C.BGR_V_SK_PIXELGEOMETRY
52)
53
54type ImageInfo C.sk_imageinfo_t
55
56type SurfaceProps C.sk_surfaceprops_t
57
58type Rect C.sk_rect_t
59