aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/go-skia/ctypes.go
blob: 64953edc378b58c81e2da61f62907d06b8ec68c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//+build ignore

/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

package skia

// This file is used to generate 'types.go'
// from the corresponding type definitions in the C API.
// Any C struct for which we would like to generate a
// Go struct with the same memory layout should defined defined here.
// Any enum that is used in Go should also be listed here, together
// with the enum values that we want to use.

/*
#cgo CFLAGS: -I../../include/c
#include "../../include/c/sk_types.h"
*/
import "C"

type Color C.sk_color_t

type ColorType C.sk_colortype_t

const (
	UNKNOWN_COLORTYPE   ColorType = C.UNKNOWN_SK_COLORTYPE
	RGBA_8888_COLORTYPE ColorType = C.RGBA_8888_SK_COLORTYPE
	BGRA_8888_COLORTYPE ColorType = C.BGRA_8888_SK_COLORTYPE
	ALPHA_8_COLORTYPE   ColorType = C.ALPHA_8_SK_COLORTYPE
)

type AlphaType C.sk_alphatype_t

const (
	OPAQUE_ALPHATYPE   AlphaType = C.OPAQUE_SK_ALPHATYPE
	PREMUL_ALPHATYPE   AlphaType = C.PREMUL_SK_ALPHATYPE
	UNPREMUL_ALPHATYPE AlphaType = C.UNPREMUL_SK_ALPHATYPE
)

type PixelGeometry C.sk_pixelgeometry_t

const (
	UNKNOWN_SK_PIXELGEOMETRY PixelGeometry = C.UNKNOWN_SK_PIXELGEOMETRY
	RGB_H_SK_PIXELGEOMETRY   PixelGeometry = C.RGB_H_SK_PIXELGEOMETRY
	BGR_H_SK_PIXELGEOMETRY   PixelGeometry = C.BGR_H_SK_PIXELGEOMETRY
	RGB_V_SK_PIXELGEOMETRY   PixelGeometry = C.RGB_V_SK_PIXELGEOMETRY
	BGR_V_SK_PIXELGEOMETRY   PixelGeometry = C.BGR_V_SK_PIXELGEOMETRY
)

type ImageInfo C.sk_imageinfo_t

type SurfaceProps C.sk_surfaceprops_t

type Rect C.sk_rect_t