1/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8// Created by cgo -godefs. Enum fields in structs were fixed by hand.
9// command: go tool cgo -godefs ctypes.go > types.go
10//
11// The purpose of this file is to have Go structs with the same memory
12// layout as their C counterparts. For enums we want the underlying primitive
13// types to match.
14//
15// TODO(stephan): Add tests that allow to detect failure on platforms other
16// than Linux and changes in the underlying C types.
17
18package skia
19
20type Color uint32
21
22type ColorType uint32
23
24const (
25	UNKNOWN_COLORTYPE   ColorType = 0x0
26	RGBA_8888_COLORTYPE ColorType = 0x1
27	BGRA_8888_COLORTYPE ColorType = 0x2
28	ALPHA_8_COLORTYPE   ColorType = 0x3
29)
30
31type AlphaType uint32
32
33const (
34	OPAQUE_ALPHATYPE   AlphaType = 0x0
35	PREMUL_ALPHATYPE   AlphaType = 0x1
36	UNPREMUL_ALPHATYPE AlphaType = 0x2
37)
38
39type PixelGeometry uint32
40
41const (
42	UNKNOWN_SK_PIXELGEOMETRY PixelGeometry = 0x0
43	RGB_H_SK_PIXELGEOMETRY   PixelGeometry = 0x1
44	BGR_H_SK_PIXELGEOMETRY   PixelGeometry = 0x2
45	RGB_V_SK_PIXELGEOMETRY   PixelGeometry = 0x3
46	BGR_V_SK_PIXELGEOMETRY   PixelGeometry = 0x4
47)
48
49type ImageInfo struct {
50	Width     int32
51	Height    int32
52	ColorType ColorType
53	AlphaType AlphaType
54}
55
56type SurfaceProps struct {
57	PixelGeometry PixelGeometry
58}
59
60type Rect struct {
61	Left   float32
62	Top    float32
63	Right  float32
64	Bottom float32
65}
66