cogl_sys/
lib.rs

1#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
2#![allow(
3    clippy::upper_case_acronyms,
4    clippy::approx_constant,
5    clippy::type_complexity,
6    clippy::unreadable_literal
7)]
8
9extern crate glib_sys as glib;
10extern crate gobject_sys as gobject;
11extern crate libc;
12
13#[allow(unused_imports)]
14use libc::{
15    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
16    intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE,
17};
18
19#[allow(unused_imports)]
20use glib::{gboolean, gconstpointer, gpointer, GType};
21
22// Aliases
23pub type CoglAngle = i32;
24pub type CoglBool = c_int;
25pub type CoglBuffer = c_void;
26pub type CoglHandle = *mut c_void;
27pub type CoglMetaTexture = c_void;
28pub type CoglPrimitiveTexture = c_void;
29pub type CoglUserDataDestroyCallback = glib::GDestroyNotify;
30
31// Enums
32pub type CoglAttributeType = c_int;
33pub const COGL_ATTRIBUTE_TYPE_BYTE: CoglAttributeType = 5120;
34pub const COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE: CoglAttributeType = 5121;
35pub const COGL_ATTRIBUTE_TYPE_SHORT: CoglAttributeType = 5122;
36pub const COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT: CoglAttributeType = 5123;
37pub const COGL_ATTRIBUTE_TYPE_FLOAT: CoglAttributeType = 5126;
38
39pub type CoglBitmapError = c_int;
40pub const COGL_BITMAP_ERROR_FAILED: CoglBitmapError = 0;
41pub const COGL_BITMAP_ERROR_UNKNOWN_TYPE: CoglBitmapError = 1;
42pub const COGL_BITMAP_ERROR_CORRUPT_IMAGE: CoglBitmapError = 2;
43
44pub type CoglBlendStringError = c_int;
45pub const COGL_BLEND_STRING_ERROR_PARSE_ERROR: CoglBlendStringError = 0;
46pub const COGL_BLEND_STRING_ERROR_ARGUMENT_PARSE_ERROR: CoglBlendStringError = 1;
47pub const COGL_BLEND_STRING_ERROR_INVALID_ERROR: CoglBlendStringError = 2;
48pub const COGL_BLEND_STRING_ERROR_GPU_UNSUPPORTED_ERROR: CoglBlendStringError = 3;
49
50pub type CoglBufferError = c_int;
51pub const COGL_BUFFER_ERROR_MAP: CoglBufferError = 0;
52
53pub type CoglBufferUpdateHint = c_int;
54pub const COGL_BUFFER_UPDATE_HINT_STATIC: CoglBufferUpdateHint = 0;
55pub const COGL_BUFFER_UPDATE_HINT_DYNAMIC: CoglBufferUpdateHint = 1;
56pub const COGL_BUFFER_UPDATE_HINT_STREAM: CoglBufferUpdateHint = 2;
57
58pub type CoglDepthTestFunction = c_int;
59pub const COGL_DEPTH_TEST_FUNCTION_NEVER: CoglDepthTestFunction = 512;
60pub const COGL_DEPTH_TEST_FUNCTION_LESS: CoglDepthTestFunction = 513;
61pub const COGL_DEPTH_TEST_FUNCTION_EQUAL: CoglDepthTestFunction = 514;
62pub const COGL_DEPTH_TEST_FUNCTION_LEQUAL: CoglDepthTestFunction = 515;
63pub const COGL_DEPTH_TEST_FUNCTION_GREATER: CoglDepthTestFunction = 516;
64pub const COGL_DEPTH_TEST_FUNCTION_NOTEQUAL: CoglDepthTestFunction = 517;
65pub const COGL_DEPTH_TEST_FUNCTION_GEQUAL: CoglDepthTestFunction = 518;
66pub const COGL_DEPTH_TEST_FUNCTION_ALWAYS: CoglDepthTestFunction = 519;
67
68pub type CoglDriver = c_int;
69pub const COGL_DRIVER_ANY: CoglDriver = 0;
70pub const COGL_DRIVER_NOP: CoglDriver = 1;
71pub const COGL_DRIVER_GL: CoglDriver = 2;
72pub const COGL_DRIVER_GL3: CoglDriver = 3;
73pub const COGL_DRIVER_GLES1: CoglDriver = 4;
74pub const COGL_DRIVER_GLES2: CoglDriver = 5;
75pub const COGL_DRIVER_WEBGL: CoglDriver = 6;
76
77pub type CoglFeatureID = c_int;
78pub const COGL_FEATURE_ID_TEXTURE_NPOT_BASIC: CoglFeatureID = 1;
79pub const COGL_FEATURE_ID_TEXTURE_NPOT_MIPMAP: CoglFeatureID = 2;
80pub const COGL_FEATURE_ID_TEXTURE_NPOT_REPEAT: CoglFeatureID = 3;
81pub const COGL_FEATURE_ID_TEXTURE_NPOT: CoglFeatureID = 4;
82pub const COGL_FEATURE_ID_TEXTURE_RECTANGLE: CoglFeatureID = 5;
83pub const COGL_FEATURE_ID_TEXTURE_3D: CoglFeatureID = 6;
84pub const COGL_FEATURE_ID_GLSL: CoglFeatureID = 7;
85pub const COGL_FEATURE_ID_ARBFP: CoglFeatureID = 8;
86pub const COGL_FEATURE_ID_OFFSCREEN: CoglFeatureID = 9;
87pub const COGL_FEATURE_ID_OFFSCREEN_MULTISAMPLE: CoglFeatureID = 10;
88pub const COGL_FEATURE_ID_ONSCREEN_MULTIPLE: CoglFeatureID = 11;
89pub const COGL_FEATURE_ID_UNSIGNED_INT_INDICES: CoglFeatureID = 12;
90pub const COGL_FEATURE_ID_DEPTH_RANGE: CoglFeatureID = 13;
91pub const COGL_FEATURE_ID_POINT_SPRITE: CoglFeatureID = 14;
92pub const COGL_FEATURE_ID_MAP_BUFFER_FOR_READ: CoglFeatureID = 15;
93pub const COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE: CoglFeatureID = 16;
94pub const COGL_FEATURE_ID_MIRRORED_REPEAT: CoglFeatureID = 17;
95pub const COGL_FEATURE_ID_SWAP_BUFFERS_EVENT: CoglFeatureID = 18;
96pub const COGL_FEATURE_ID_GLES2_CONTEXT: CoglFeatureID = 19;
97pub const COGL_FEATURE_ID_DEPTH_TEXTURE: CoglFeatureID = 20;
98pub const COGL_FEATURE_ID_PRESENTATION_TIME: CoglFeatureID = 21;
99pub const COGL_FEATURE_ID_FENCE: CoglFeatureID = 22;
100pub const COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE: CoglFeatureID = 23;
101pub const COGL_FEATURE_ID_TEXTURE_RG: CoglFeatureID = 24;
102pub const COGL_FEATURE_ID_BUFFER_AGE: CoglFeatureID = 25;
103
104pub type CoglFilterReturn = c_int;
105pub const COGL_FILTER_CONTINUE: CoglFilterReturn = 0;
106pub const COGL_FILTER_REMOVE: CoglFilterReturn = 1;
107
108pub type CoglFogMode = c_int;
109pub const COGL_FOG_MODE_LINEAR: CoglFogMode = 0;
110pub const COGL_FOG_MODE_EXPONENTIAL: CoglFogMode = 1;
111pub const COGL_FOG_MODE_EXPONENTIAL_SQUARED: CoglFogMode = 2;
112
113pub type CoglFrameEvent = c_int;
114pub const COGL_FRAME_EVENT_SYNC: CoglFrameEvent = 1;
115pub const COGL_FRAME_EVENT_COMPLETE: CoglFrameEvent = 2;
116
117pub type CoglFramebufferError = c_int;
118pub const COGL_FRAMEBUFFER_ERROR_ALLOCATE: CoglFramebufferError = 0;
119
120pub type CoglGLES2ContextError = c_int;
121pub const COGL_GLES2_CONTEXT_ERROR_UNSUPPORTED: CoglGLES2ContextError = 0;
122pub const COGL_GLES2_CONTEXT_ERROR_DRIVER: CoglGLES2ContextError = 1;
123
124pub type CoglIndicesType = c_int;
125pub const COGL_INDICES_TYPE_UNSIGNED_BYTE: CoglIndicesType = 0;
126pub const COGL_INDICES_TYPE_UNSIGNED_SHORT: CoglIndicesType = 1;
127pub const COGL_INDICES_TYPE_UNSIGNED_INT: CoglIndicesType = 2;
128
129pub type CoglMaterialAlphaFunc = c_int;
130pub const COGL_MATERIAL_ALPHA_FUNC_NEVER: CoglMaterialAlphaFunc = 512;
131pub const COGL_MATERIAL_ALPHA_FUNC_LESS: CoglMaterialAlphaFunc = 513;
132pub const COGL_MATERIAL_ALPHA_FUNC_EQUAL: CoglMaterialAlphaFunc = 514;
133pub const COGL_MATERIAL_ALPHA_FUNC_LEQUAL: CoglMaterialAlphaFunc = 515;
134pub const COGL_MATERIAL_ALPHA_FUNC_GREATER: CoglMaterialAlphaFunc = 516;
135pub const COGL_MATERIAL_ALPHA_FUNC_NOTEQUAL: CoglMaterialAlphaFunc = 517;
136pub const COGL_MATERIAL_ALPHA_FUNC_GEQUAL: CoglMaterialAlphaFunc = 518;
137pub const COGL_MATERIAL_ALPHA_FUNC_ALWAYS: CoglMaterialAlphaFunc = 519;
138
139pub type CoglMaterialFilter = c_int;
140pub const COGL_MATERIAL_FILTER_NEAREST: CoglMaterialFilter = 9728;
141pub const COGL_MATERIAL_FILTER_LINEAR: CoglMaterialFilter = 9729;
142pub const COGL_MATERIAL_FILTER_NEAREST_MIPMAP_NEAREST: CoglMaterialFilter = 9984;
143pub const COGL_MATERIAL_FILTER_LINEAR_MIPMAP_NEAREST: CoglMaterialFilter = 9985;
144pub const COGL_MATERIAL_FILTER_NEAREST_MIPMAP_LINEAR: CoglMaterialFilter = 9986;
145pub const COGL_MATERIAL_FILTER_LINEAR_MIPMAP_LINEAR: CoglMaterialFilter = 9987;
146
147pub type CoglMaterialLayerType = c_int;
148pub const COGL_MATERIAL_LAYER_TYPE_TEXTURE: CoglMaterialLayerType = 0;
149
150pub type CoglMaterialWrapMode = c_int;
151pub const COGL_MATERIAL_WRAP_MODE_REPEAT: CoglMaterialWrapMode = 10497;
152pub const COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE: CoglMaterialWrapMode = 33071;
153pub const COGL_MATERIAL_WRAP_MODE_AUTOMATIC: CoglMaterialWrapMode = 519;
154
155pub type CoglPipelineAlphaFunc = c_int;
156pub const COGL_PIPELINE_ALPHA_FUNC_NEVER: CoglPipelineAlphaFunc = 512;
157pub const COGL_PIPELINE_ALPHA_FUNC_LESS: CoglPipelineAlphaFunc = 513;
158pub const COGL_PIPELINE_ALPHA_FUNC_EQUAL: CoglPipelineAlphaFunc = 514;
159pub const COGL_PIPELINE_ALPHA_FUNC_LEQUAL: CoglPipelineAlphaFunc = 515;
160pub const COGL_PIPELINE_ALPHA_FUNC_GREATER: CoglPipelineAlphaFunc = 516;
161pub const COGL_PIPELINE_ALPHA_FUNC_NOTEQUAL: CoglPipelineAlphaFunc = 517;
162pub const COGL_PIPELINE_ALPHA_FUNC_GEQUAL: CoglPipelineAlphaFunc = 518;
163pub const COGL_PIPELINE_ALPHA_FUNC_ALWAYS: CoglPipelineAlphaFunc = 519;
164
165pub type CoglPipelineCullFaceMode = c_int;
166pub const COGL_PIPELINE_CULL_FACE_MODE_NONE: CoglPipelineCullFaceMode = 0;
167pub const COGL_PIPELINE_CULL_FACE_MODE_FRONT: CoglPipelineCullFaceMode = 1;
168pub const COGL_PIPELINE_CULL_FACE_MODE_BACK: CoglPipelineCullFaceMode = 2;
169pub const COGL_PIPELINE_CULL_FACE_MODE_BOTH: CoglPipelineCullFaceMode = 3;
170
171pub type CoglPipelineFilter = c_int;
172pub const COGL_PIPELINE_FILTER_NEAREST: CoglPipelineFilter = 9728;
173pub const COGL_PIPELINE_FILTER_LINEAR: CoglPipelineFilter = 9729;
174pub const COGL_PIPELINE_FILTER_NEAREST_MIPMAP_NEAREST: CoglPipelineFilter = 9984;
175pub const COGL_PIPELINE_FILTER_LINEAR_MIPMAP_NEAREST: CoglPipelineFilter = 9985;
176pub const COGL_PIPELINE_FILTER_NEAREST_MIPMAP_LINEAR: CoglPipelineFilter = 9986;
177pub const COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR: CoglPipelineFilter = 9987;
178
179pub type CoglPipelineWrapMode = c_int;
180pub const COGL_PIPELINE_WRAP_MODE_REPEAT: CoglPipelineWrapMode = 10497;
181pub const COGL_PIPELINE_WRAP_MODE_MIRRORED_REPEAT: CoglPipelineWrapMode = 33648;
182pub const COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE: CoglPipelineWrapMode = 33071;
183pub const COGL_PIPELINE_WRAP_MODE_AUTOMATIC: CoglPipelineWrapMode = 519;
184
185pub type CoglPixelFormat = c_int;
186pub const COGL_PIXEL_FORMAT_ANY: CoglPixelFormat = 0;
187pub const COGL_PIXEL_FORMAT_A_8: CoglPixelFormat = 17;
188pub const COGL_PIXEL_FORMAT_RGB_565: CoglPixelFormat = 4;
189pub const COGL_PIXEL_FORMAT_RGBA_4444: CoglPixelFormat = 21;
190pub const COGL_PIXEL_FORMAT_RGBA_5551: CoglPixelFormat = 22;
191pub const COGL_PIXEL_FORMAT_YUV: CoglPixelFormat = 7;
192pub const COGL_PIXEL_FORMAT_G_8: CoglPixelFormat = 8;
193pub const COGL_PIXEL_FORMAT_RG_88: CoglPixelFormat = 9;
194pub const COGL_PIXEL_FORMAT_RGB_888: CoglPixelFormat = 2;
195pub const COGL_PIXEL_FORMAT_BGR_888: CoglPixelFormat = 34;
196pub const COGL_PIXEL_FORMAT_RGBA_8888: CoglPixelFormat = 19;
197pub const COGL_PIXEL_FORMAT_BGRA_8888: CoglPixelFormat = 51;
198pub const COGL_PIXEL_FORMAT_ARGB_8888: CoglPixelFormat = 83;
199pub const COGL_PIXEL_FORMAT_ABGR_8888: CoglPixelFormat = 115;
200pub const COGL_PIXEL_FORMAT_RGBA_1010102: CoglPixelFormat = 29;
201pub const COGL_PIXEL_FORMAT_BGRA_1010102: CoglPixelFormat = 61;
202pub const COGL_PIXEL_FORMAT_ARGB_2101010: CoglPixelFormat = 93;
203pub const COGL_PIXEL_FORMAT_ABGR_2101010: CoglPixelFormat = 125;
204pub const COGL_PIXEL_FORMAT_RGBA_8888_PRE: CoglPixelFormat = 147;
205pub const COGL_PIXEL_FORMAT_BGRA_8888_PRE: CoglPixelFormat = 179;
206pub const COGL_PIXEL_FORMAT_ARGB_8888_PRE: CoglPixelFormat = 211;
207pub const COGL_PIXEL_FORMAT_ABGR_8888_PRE: CoglPixelFormat = 243;
208pub const COGL_PIXEL_FORMAT_RGBA_4444_PRE: CoglPixelFormat = 149;
209pub const COGL_PIXEL_FORMAT_RGBA_5551_PRE: CoglPixelFormat = 150;
210pub const COGL_PIXEL_FORMAT_RGBA_1010102_PRE: CoglPixelFormat = 157;
211pub const COGL_PIXEL_FORMAT_BGRA_1010102_PRE: CoglPixelFormat = 189;
212pub const COGL_PIXEL_FORMAT_ARGB_2101010_PRE: CoglPixelFormat = 221;
213pub const COGL_PIXEL_FORMAT_ABGR_2101010_PRE: CoglPixelFormat = 253;
214pub const COGL_PIXEL_FORMAT_DEPTH_16: CoglPixelFormat = 265;
215pub const COGL_PIXEL_FORMAT_DEPTH_32: CoglPixelFormat = 259;
216pub const COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8: CoglPixelFormat = 771;
217
218pub type CoglPollFDEvent = c_int;
219pub const COGL_POLL_FD_EVENT_IN: CoglPollFDEvent = 1;
220pub const COGL_POLL_FD_EVENT_PRI: CoglPollFDEvent = 2;
221pub const COGL_POLL_FD_EVENT_OUT: CoglPollFDEvent = 4;
222pub const COGL_POLL_FD_EVENT_ERR: CoglPollFDEvent = 8;
223pub const COGL_POLL_FD_EVENT_HUP: CoglPollFDEvent = 16;
224pub const COGL_POLL_FD_EVENT_NVAL: CoglPollFDEvent = 32;
225
226pub type CoglRendererError = c_int;
227pub const COGL_RENDERER_ERROR_XLIB_DISPLAY_OPEN: CoglRendererError = 0;
228pub const COGL_RENDERER_ERROR_BAD_CONSTRAINT: CoglRendererError = 1;
229
230pub type CoglShaderType = c_int;
231pub const COGL_SHADER_TYPE_VERTEX: CoglShaderType = 0;
232pub const COGL_SHADER_TYPE_FRAGMENT: CoglShaderType = 1;
233
234pub type CoglSnippetHook = c_int;
235pub const COGL_SNIPPET_HOOK_VERTEX: CoglSnippetHook = 0;
236pub const COGL_SNIPPET_HOOK_VERTEX_TRANSFORM: CoglSnippetHook = 1;
237pub const COGL_SNIPPET_HOOK_VERTEX_GLOBALS: CoglSnippetHook = 2;
238pub const COGL_SNIPPET_HOOK_POINT_SIZE: CoglSnippetHook = 3;
239pub const COGL_SNIPPET_HOOK_FRAGMENT: CoglSnippetHook = 2048;
240pub const COGL_SNIPPET_HOOK_FRAGMENT_GLOBALS: CoglSnippetHook = 2049;
241pub const COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM: CoglSnippetHook = 4096;
242pub const COGL_SNIPPET_HOOK_LAYER_FRAGMENT: CoglSnippetHook = 6144;
243pub const COGL_SNIPPET_HOOK_TEXTURE_LOOKUP: CoglSnippetHook = 6145;
244
245pub type CoglStereoMode = c_int;
246pub const COGL_STEREO_BOTH: CoglStereoMode = 0;
247pub const COGL_STEREO_LEFT: CoglStereoMode = 1;
248pub const COGL_STEREO_RIGHT: CoglStereoMode = 2;
249
250pub type CoglSubpixelOrder = c_int;
251pub const COGL_SUBPIXEL_ORDER_UNKNOWN: CoglSubpixelOrder = 0;
252pub const COGL_SUBPIXEL_ORDER_NONE: CoglSubpixelOrder = 1;
253pub const COGL_SUBPIXEL_ORDER_HORIZONTAL_RGB: CoglSubpixelOrder = 2;
254pub const COGL_SUBPIXEL_ORDER_HORIZONTAL_BGR: CoglSubpixelOrder = 3;
255pub const COGL_SUBPIXEL_ORDER_VERTICAL_RGB: CoglSubpixelOrder = 4;
256pub const COGL_SUBPIXEL_ORDER_VERTICAL_BGR: CoglSubpixelOrder = 5;
257
258pub type CoglSystemError = c_int;
259pub const COGL_SYSTEM_ERROR_UNSUPPORTED: CoglSystemError = 0;
260pub const COGL_SYSTEM_ERROR_NO_MEMORY: CoglSystemError = 1;
261
262pub type CoglTextureComponents = c_int;
263pub const COGL_TEXTURE_COMPONENTS_A: CoglTextureComponents = 1;
264pub const COGL_TEXTURE_COMPONENTS_RG: CoglTextureComponents = 2;
265pub const COGL_TEXTURE_COMPONENTS_RGB: CoglTextureComponents = 3;
266pub const COGL_TEXTURE_COMPONENTS_RGBA: CoglTextureComponents = 4;
267pub const COGL_TEXTURE_COMPONENTS_DEPTH: CoglTextureComponents = 5;
268
269pub type CoglTextureError = c_int;
270pub const COGL_TEXTURE_ERROR_SIZE: CoglTextureError = 0;
271pub const COGL_TEXTURE_ERROR_FORMAT: CoglTextureError = 1;
272pub const COGL_TEXTURE_ERROR_BAD_PARAMETER: CoglTextureError = 2;
273pub const COGL_TEXTURE_ERROR_TYPE: CoglTextureError = 3;
274
275pub type CoglTexturePixmapX11Error = c_int;
276pub const COGL_TEXTURE_PIXMAP_X11_ERROR_X11: CoglTexturePixmapX11Error = 0;
277
278pub type CoglTexturePixmapX11ReportLevel = c_int;
279pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_RAW_RECTANGLES: CoglTexturePixmapX11ReportLevel = 0;
280pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_DELTA_RECTANGLES: CoglTexturePixmapX11ReportLevel = 1;
281pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_BOUNDING_BOX: CoglTexturePixmapX11ReportLevel = 2;
282pub const COGL_TEXTURE_PIXMAP_X11_DAMAGE_NON_EMPTY: CoglTexturePixmapX11ReportLevel = 3;
283
284pub type CoglTextureType = c_int;
285pub const COGL_TEXTURE_TYPE_2D: CoglTextureType = 0;
286pub const COGL_TEXTURE_TYPE_3D: CoglTextureType = 1;
287pub const COGL_TEXTURE_TYPE_RECTANGLE: CoglTextureType = 2;
288
289pub type CoglVerticesMode = c_int;
290pub const COGL_VERTICES_MODE_POINTS: CoglVerticesMode = 0;
291pub const COGL_VERTICES_MODE_LINES: CoglVerticesMode = 1;
292pub const COGL_VERTICES_MODE_LINE_LOOP: CoglVerticesMode = 2;
293pub const COGL_VERTICES_MODE_LINE_STRIP: CoglVerticesMode = 3;
294pub const COGL_VERTICES_MODE_TRIANGLES: CoglVerticesMode = 4;
295pub const COGL_VERTICES_MODE_TRIANGLE_STRIP: CoglVerticesMode = 5;
296pub const COGL_VERTICES_MODE_TRIANGLE_FAN: CoglVerticesMode = 6;
297
298pub type CoglWinding = c_int;
299pub const COGL_WINDING_CLOCKWISE: CoglWinding = 0;
300pub const COGL_WINDING_COUNTER_CLOCKWISE: CoglWinding = 1;
301
302pub type CoglWinsysFeature = c_int;
303pub const COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN: CoglWinsysFeature = 0;
304pub const COGL_WINSYS_FEATURE_SWAP_THROTTLE: CoglWinsysFeature = 1;
305pub const COGL_WINSYS_FEATURE_VBLANK_COUNTER: CoglWinsysFeature = 2;
306pub const COGL_WINSYS_FEATURE_VBLANK_WAIT: CoglWinsysFeature = 3;
307pub const COGL_WINSYS_FEATURE_TEXTURE_FROM_PIXMAP: CoglWinsysFeature = 4;
308pub const COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT: CoglWinsysFeature = 5;
309pub const COGL_WINSYS_FEATURE_SWAP_REGION: CoglWinsysFeature = 6;
310pub const COGL_WINSYS_FEATURE_SWAP_REGION_THROTTLE: CoglWinsysFeature = 7;
311pub const COGL_WINSYS_FEATURE_SWAP_REGION_SYNCHRONIZED: CoglWinsysFeature = 8;
312pub const COGL_WINSYS_FEATURE_BUFFER_AGE: CoglWinsysFeature = 9;
313pub const COGL_WINSYS_FEATURE_SYNC_AND_COMPLETE_EVENT: CoglWinsysFeature = 10;
314pub const COGL_WINSYS_FEATURE_N_FEATURES: CoglWinsysFeature = 11;
315
316pub type CoglWinsysID = c_int;
317pub const COGL_WINSYS_ID_ANY: CoglWinsysID = 0;
318pub const COGL_WINSYS_ID_STUB: CoglWinsysID = 1;
319pub const COGL_WINSYS_ID_GLX: CoglWinsysID = 2;
320pub const COGL_WINSYS_ID_EGL_XLIB: CoglWinsysID = 3;
321pub const COGL_WINSYS_ID_EGL_NULL: CoglWinsysID = 4;
322pub const COGL_WINSYS_ID_EGL_GDL: CoglWinsysID = 5;
323pub const COGL_WINSYS_ID_EGL_WAYLAND: CoglWinsysID = 6;
324pub const COGL_WINSYS_ID_EGL_KMS: CoglWinsysID = 7;
325pub const COGL_WINSYS_ID_EGL_ANDROID: CoglWinsysID = 8;
326pub const COGL_WINSYS_ID_EGL_MIR: CoglWinsysID = 9;
327pub const COGL_WINSYS_ID_WGL: CoglWinsysID = 10;
328pub const COGL_WINSYS_ID_SDL: CoglWinsysID = 11;
329
330// Constants
331pub const COGL_AFIRST_BIT: c_int = 64;
332pub const COGL_A_BIT: c_int = 16;
333pub const COGL_BGR_BIT: c_int = 32;
334pub const COGL_DEPTH_BIT: c_int = 256;
335pub const COGL_FIXED_0_5: c_int = 32768;
336pub const COGL_FIXED_1: c_int = 1;
337pub const COGL_FIXED_2_PI: c_int = 411775;
338pub const COGL_FIXED_BITS: c_int = 32;
339pub const COGL_FIXED_EPSILON: c_int = 1;
340pub const COGL_FIXED_MAX: c_int = 2147483647;
341pub const COGL_FIXED_MIN: c_int = -2147483648;
342pub const COGL_FIXED_PI: c_int = 205887;
343pub const COGL_FIXED_PI_2: c_int = 102944;
344pub const COGL_FIXED_PI_4: c_int = 51472;
345pub const COGL_FIXED_Q: c_int = -16;
346pub const COGL_PREMULT_BIT: c_int = 128;
347pub const COGL_RADIANS_TO_DEGREES: c_int = 3754936;
348pub const COGL_SQRTI_ARG_10_PERCENT: c_int = 5590;
349pub const COGL_SQRTI_ARG_5_PERCENT: c_int = 210;
350pub const COGL_SQRTI_ARG_MAX: c_int = 4194303;
351pub const COGL_STENCIL_BIT: c_int = 512;
352pub const COGL_TEXTURE_MAX_WASTE: c_int = 127;
353pub const COGL_VERSION_COMPONENT_BITS: c_int = 10;
354pub const COGL_VERSION_MAX_COMPONENT_VALUE: c_int = 0;
355
356// Flags
357pub type CoglBufferAccess = c_uint;
358pub const COGL_BUFFER_ACCESS_READ: CoglBufferAccess = 1;
359pub const COGL_BUFFER_ACCESS_WRITE: CoglBufferAccess = 2;
360pub const COGL_BUFFER_ACCESS_READ_WRITE: CoglBufferAccess = 3;
361
362pub type CoglBufferBit = c_uint;
363pub const COGL_BUFFER_BIT_COLOR: CoglBufferBit = 1;
364pub const COGL_BUFFER_BIT_DEPTH: CoglBufferBit = 2;
365pub const COGL_BUFFER_BIT_STENCIL: CoglBufferBit = 4;
366
367pub type CoglBufferMapHint = c_uint;
368pub const COGL_BUFFER_MAP_HINT_DISCARD: CoglBufferMapHint = 1;
369pub const COGL_BUFFER_MAP_HINT_DISCARD_RANGE: CoglBufferMapHint = 2;
370
371pub type CoglBufferTarget = c_uint;
372pub const COGL_WINDOW_BUFFER: CoglBufferTarget = 2;
373pub const COGL_OFFSCREEN_BUFFER: CoglBufferTarget = 4;
374
375pub type CoglColorMask = c_uint;
376pub const COGL_COLOR_MASK_NONE: CoglColorMask = 0;
377pub const COGL_COLOR_MASK_RED: CoglColorMask = 1;
378pub const COGL_COLOR_MASK_GREEN: CoglColorMask = 2;
379pub const COGL_COLOR_MASK_BLUE: CoglColorMask = 4;
380pub const COGL_COLOR_MASK_ALPHA: CoglColorMask = 8;
381pub const COGL_COLOR_MASK_ALL: CoglColorMask = 15;
382
383pub type CoglFeatureFlags = c_uint;
384pub const COGL_FEATURE_TEXTURE_RECTANGLE: CoglFeatureFlags = 2;
385pub const COGL_FEATURE_TEXTURE_NPOT: CoglFeatureFlags = 4;
386pub const COGL_FEATURE_TEXTURE_YUV: CoglFeatureFlags = 8;
387pub const COGL_FEATURE_TEXTURE_READ_PIXELS: CoglFeatureFlags = 16;
388pub const COGL_FEATURE_SHADERS_GLSL: CoglFeatureFlags = 32;
389pub const COGL_FEATURE_OFFSCREEN: CoglFeatureFlags = 64;
390pub const COGL_FEATURE_OFFSCREEN_MULTISAMPLE: CoglFeatureFlags = 128;
391pub const COGL_FEATURE_OFFSCREEN_BLIT: CoglFeatureFlags = 256;
392pub const COGL_FEATURE_FOUR_CLIP_PLANES: CoglFeatureFlags = 512;
393pub const COGL_FEATURE_STENCIL_BUFFER: CoglFeatureFlags = 1024;
394pub const COGL_FEATURE_VBOS: CoglFeatureFlags = 2048;
395pub const COGL_FEATURE_PBOS: CoglFeatureFlags = 4096;
396pub const COGL_FEATURE_UNSIGNED_INT_INDICES: CoglFeatureFlags = 8192;
397pub const COGL_FEATURE_DEPTH_RANGE: CoglFeatureFlags = 16384;
398pub const COGL_FEATURE_TEXTURE_NPOT_BASIC: CoglFeatureFlags = 32768;
399pub const COGL_FEATURE_TEXTURE_NPOT_MIPMAP: CoglFeatureFlags = 65536;
400pub const COGL_FEATURE_TEXTURE_NPOT_REPEAT: CoglFeatureFlags = 131072;
401pub const COGL_FEATURE_POINT_SPRITE: CoglFeatureFlags = 262144;
402pub const COGL_FEATURE_TEXTURE_3D: CoglFeatureFlags = 524288;
403pub const COGL_FEATURE_SHADERS_ARBFP: CoglFeatureFlags = 1048576;
404pub const COGL_FEATURE_MAP_BUFFER_FOR_READ: CoglFeatureFlags = 2097152;
405pub const COGL_FEATURE_MAP_BUFFER_FOR_WRITE: CoglFeatureFlags = 4194304;
406pub const COGL_FEATURE_ONSCREEN_MULTIPLE: CoglFeatureFlags = 8388608;
407pub const COGL_FEATURE_DEPTH_TEXTURE: CoglFeatureFlags = 16777216;
408
409pub type CoglReadPixelsFlags = c_uint;
410pub const COGL_READ_PIXELS_COLOR_BUFFER: CoglReadPixelsFlags = 1;
411
412pub type CoglRendererConstraint = c_uint;
413pub const COGL_RENDERER_CONSTRAINT_USES_X11: CoglRendererConstraint = 1;
414pub const COGL_RENDERER_CONSTRAINT_USES_XLIB: CoglRendererConstraint = 2;
415pub const COGL_RENDERER_CONSTRAINT_USES_EGL: CoglRendererConstraint = 4;
416pub const COGL_RENDERER_CONSTRAINT_SUPPORTS_COGL_GLES2: CoglRendererConstraint = 8;
417
418pub type CoglTextureFlags = c_uint;
419pub const COGL_TEXTURE_NONE: CoglTextureFlags = 0;
420pub const COGL_TEXTURE_NO_AUTO_MIPMAP: CoglTextureFlags = 1;
421pub const COGL_TEXTURE_NO_SLICING: CoglTextureFlags = 2;
422pub const COGL_TEXTURE_NO_ATLAS: CoglTextureFlags = 4;
423
424// Callbacks
425pub type CoglDebugObjectForeachTypeCallback =
426    Option<unsafe extern "C" fn(*const CoglDebugObjectTypeInfo, *mut c_void)>;
427pub type CoglFeatureCallback = Option<unsafe extern "C" fn(CoglFeatureID, *mut c_void)>;
428pub type CoglFenceCallback = Option<unsafe extern "C" fn(*mut CoglFence, *mut c_void)>;
429pub type CoglFrameCallback = Option<
430    unsafe extern "C" fn(*mut CoglOnscreen, CoglFrameEvent, *mut CoglFrameInfo, *mut c_void),
431>;
432pub type CoglFuncPtr = Option<unsafe extern "C" fn()>;
433pub type CoglMetaTextureCallback =
434    Option<unsafe extern "C" fn(*mut CoglTexture, *const c_float, *const c_float, *mut c_void)>;
435pub type CoglOnscreenDirtyCallback =
436    Option<unsafe extern "C" fn(*mut CoglOnscreen, *const CoglOnscreenDirtyInfo, *mut c_void)>;
437pub type CoglOnscreenResizeCallback =
438    Option<unsafe extern "C" fn(*mut CoglOnscreen, c_int, c_int, *mut c_void)>;
439pub type CoglOnscreenX11MaskCallback =
440    Option<unsafe extern "C" fn(*mut CoglOnscreen, u32, *mut c_void)>;
441pub type CoglOutputCallback = Option<unsafe extern "C" fn(*mut CoglOutput, *mut c_void)>;
442pub type CoglPipelineLayerCallback =
443    Option<unsafe extern "C" fn(*mut CoglPipeline, c_int, *mut c_void) -> CoglBool>;
444pub type CoglPrimitiveAttributeCallback =
445    Option<unsafe extern "C" fn(*mut CoglPrimitive, *mut CoglAttribute, *mut c_void) -> CoglBool>;
446pub type CoglSwapBuffersNotify = Option<unsafe extern "C" fn(*mut CoglFramebuffer, *mut c_void)>;
447// pub type CoglXlibFilterFunc = Option<unsafe extern "C" fn(*mut XEvent, *mut c_void) -> CoglFilterReturn>;
448
449// Records
450#[repr(C)]
451#[derive(Copy, Clone)]
452pub struct CoglColor {
453    pub private_member_red: u8,
454    pub private_member_green: u8,
455    pub private_member_blue: u8,
456    pub private_member_alpha: u8,
457    pub private_member_padding0: u32,
458    pub private_member_padding1: u32,
459    pub private_member_padding2: u32,
460}
461
462impl ::std::fmt::Debug for CoglColor {
463    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
464        f.debug_struct(&format!("CoglColor @ {:?}", self as *const _))
465            .finish()
466    }
467}
468
469#[repr(C)]
470#[derive(Copy, Clone)]
471pub struct CoglDebugObjectTypeInfo {
472    pub name: *const c_char,
473    pub instance_count: c_ulong,
474}
475
476impl ::std::fmt::Debug for CoglDebugObjectTypeInfo {
477    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
478        f.debug_struct(&format!("CoglDebugObjectTypeInfo @ {:?}", self as *const _))
479            .field("name", &self.name)
480            .field("instance_count", &self.instance_count)
481            .finish()
482    }
483}
484
485#[repr(C)]
486#[derive(Copy, Clone)]
487pub struct CoglDepthState {
488    pub private_member_magic: u32,
489    pub private_member_test_enabled: CoglBool,
490    pub private_member_test_function: CoglDepthTestFunction,
491    pub private_member_write_enabled: CoglBool,
492    pub private_member_range_near: c_float,
493    pub private_member_range_far: c_float,
494    pub private_member_padding0: u32,
495    pub private_member_padding1: u32,
496    pub private_member_padding2: u32,
497    pub private_member_padding3: u32,
498    pub private_member_padding4: u32,
499    pub private_member_padding5: u32,
500    pub private_member_padding6: u32,
501    pub private_member_padding7: u32,
502    pub private_member_padding8: u32,
503    pub private_member_padding9: u32,
504}
505
506impl ::std::fmt::Debug for CoglDepthState {
507    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
508        f.debug_struct(&format!("CoglDepthState @ {:?}", self as *const _))
509            .finish()
510    }
511}
512
513#[repr(C)]
514#[derive(Copy, Clone)]
515pub struct CoglEuler {
516    pub heading: c_float,
517    pub pitch: c_float,
518    pub roll: c_float,
519    pub padding0: c_float,
520    pub padding1: c_float,
521    pub padding2: c_float,
522    pub padding3: c_float,
523    pub padding4: c_float,
524}
525
526impl ::std::fmt::Debug for CoglEuler {
527    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
528        f.debug_struct(&format!("CoglEuler @ {:?}", self as *const _))
529            .field("heading", &self.heading)
530            .field("pitch", &self.pitch)
531            .field("roll", &self.roll)
532            .finish()
533    }
534}
535
536#[repr(C)]
537pub struct _CoglFence(c_void);
538
539pub type CoglFence = *mut _CoglFence;
540
541#[repr(C)]
542pub struct _CoglFenceClosure(c_void);
543
544pub type CoglFenceClosure = *mut _CoglFenceClosure;
545
546#[repr(C)]
547pub struct CoglFrameClosure(c_void);
548
549impl ::std::fmt::Debug for CoglFrameClosure {
550    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
551        f.debug_struct(&format!("CoglFrameClosure @ {:?}", self as *const _))
552            .finish()
553    }
554}
555
556#[repr(C)]
557#[derive(Copy, Clone)]
558pub struct CoglGtypeClass {
559    pub base_class: gobject::GTypeClass,
560    pub dummy: c_uint,
561}
562
563impl ::std::fmt::Debug for CoglGtypeClass {
564    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
565        f.debug_struct(&format!("CoglGtypeClass @ {:?}", self as *const _))
566            .field("base_class", &self.base_class)
567            .field("dummy", &self.dummy)
568            .finish()
569    }
570}
571
572#[repr(C)]
573#[derive(Copy, Clone)]
574pub struct CoglGtypeObject {
575    pub parent_instance: gobject::GTypeInstance,
576    pub dummy: c_uint,
577}
578
579impl ::std::fmt::Debug for CoglGtypeObject {
580    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
581        f.debug_struct(&format!("CoglGtypeObject @ {:?}", self as *const _))
582            .field("parent_instance", &self.parent_instance)
583            .field("dummy", &self.dummy)
584            .finish()
585    }
586}
587
588#[repr(C)]
589pub struct CoglKmsCrtc {
590    pub id: u32,
591    pub x: u32,
592    pub y: u32,
593    _truncated_record_marker: c_void,
594    // /*Ignored*/field mode has incomplete type
595}
596
597impl ::std::fmt::Debug for CoglKmsCrtc {
598    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
599        f.debug_struct(&format!("CoglKmsCrtc @ {:?}", self as *const _))
600            .field("id", &self.id)
601            .field("x", &self.x)
602            .field("y", &self.y)
603            .finish()
604    }
605}
606
607#[repr(C)]
608pub struct _CoglMaterial(c_void);
609
610pub type CoglMaterial = *mut _CoglMaterial;
611
612#[repr(C)]
613pub struct _CoglMaterialLayer(c_void);
614
615pub type CoglMaterialLayer = *mut _CoglMaterialLayer;
616
617#[repr(C)]
618#[derive(Copy, Clone)]
619pub struct CoglMatrix {
620    pub xx: c_float,
621    pub yx: c_float,
622    pub zx: c_float,
623    pub wx: c_float,
624    pub xy: c_float,
625    pub yy: c_float,
626    pub zy: c_float,
627    pub wy: c_float,
628    pub xz: c_float,
629    pub yz: c_float,
630    pub zz: c_float,
631    pub wz: c_float,
632    pub xw: c_float,
633    pub yw: c_float,
634    pub zw: c_float,
635    pub ww: c_float,
636    pub private_member_inv: [c_float; 16],
637    pub private_member_type: c_ulong,
638    pub private_member_flags: c_ulong,
639    pub private_member__padding3: c_ulong,
640}
641
642impl ::std::fmt::Debug for CoglMatrix {
643    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
644        f.debug_struct(&format!("CoglMatrix @ {:?}", self as *const _))
645            .field("xx", &self.xx)
646            .field("yx", &self.yx)
647            .field("zx", &self.zx)
648            .field("wx", &self.wx)
649            .field("xy", &self.xy)
650            .field("yy", &self.yy)
651            .field("zy", &self.zy)
652            .field("wy", &self.wy)
653            .field("xz", &self.xz)
654            .field("yz", &self.yz)
655            .field("zz", &self.zz)
656            .field("wz", &self.wz)
657            .field("xw", &self.xw)
658            .field("yw", &self.yw)
659            .field("zw", &self.zw)
660            .field("ww", &self.ww)
661            .finish()
662    }
663}
664
665#[repr(C)]
666pub struct CoglMatrixEntry(c_void);
667
668impl ::std::fmt::Debug for CoglMatrixEntry {
669    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
670        f.debug_struct(&format!("CoglMatrixEntry @ {:?}", self as *const _))
671            .finish()
672    }
673}
674
675#[repr(C)]
676pub struct CoglOffscreen(c_void);
677
678impl ::std::fmt::Debug for CoglOffscreen {
679    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
680        f.debug_struct(&format!("CoglOffscreen @ {:?}", self as *const _))
681            .finish()
682    }
683}
684
685#[repr(C)]
686pub struct CoglOnscreenDirtyClosure(c_void);
687
688impl ::std::fmt::Debug for CoglOnscreenDirtyClosure {
689    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
690        f.debug_struct(&format!(
691            "CoglOnscreenDirtyClosure @ {:?}",
692            self as *const _
693        ))
694        .finish()
695    }
696}
697
698#[repr(C)]
699#[derive(Copy, Clone)]
700pub struct CoglOnscreenDirtyInfo {
701    pub x: c_int,
702    pub y: c_int,
703    pub width: c_int,
704    pub height: c_int,
705}
706
707impl ::std::fmt::Debug for CoglOnscreenDirtyInfo {
708    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
709        f.debug_struct(&format!("CoglOnscreenDirtyInfo @ {:?}", self as *const _))
710            .field("x", &self.x)
711            .field("y", &self.y)
712            .field("width", &self.width)
713            .field("height", &self.height)
714            .finish()
715    }
716}
717
718#[repr(C)]
719pub struct CoglOnscreenResizeClosure(c_void);
720
721impl ::std::fmt::Debug for CoglOnscreenResizeClosure {
722    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
723        f.debug_struct(&format!(
724            "CoglOnscreenResizeClosure @ {:?}",
725            self as *const _
726        ))
727        .finish()
728    }
729}
730
731#[repr(C)]
732pub struct CoglPollFD {
733    pub fd: c_int,
734    _truncated_record_marker: c_void,
735    // /*Ignored*/field events has incomplete type
736}
737
738impl ::std::fmt::Debug for CoglPollFD {
739    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
740        f.debug_struct(&format!("CoglPollFD @ {:?}", self as *const _))
741            .field("fd", &self.fd)
742            .finish()
743    }
744}
745
746#[repr(C)]
747#[derive(Copy, Clone)]
748pub struct CoglQuaternion {
749    pub w: c_float,
750    pub x: c_float,
751    pub y: c_float,
752    pub z: c_float,
753    pub padding0: c_float,
754    pub padding1: c_float,
755    pub padding2: c_float,
756    pub padding3: c_float,
757}
758
759impl ::std::fmt::Debug for CoglQuaternion {
760    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
761        f.debug_struct(&format!("CoglQuaternion @ {:?}", self as *const _))
762            .field("w", &self.w)
763            .field("x", &self.x)
764            .field("y", &self.y)
765            .field("z", &self.z)
766            .finish()
767    }
768}
769
770#[repr(C)]
771#[derive(Copy, Clone)]
772pub struct CoglTextureVertex {
773    pub x: c_float,
774    pub y: c_float,
775    pub z: c_float,
776    pub tx: c_float,
777    pub ty: c_float,
778    pub color: CoglColor,
779}
780
781impl ::std::fmt::Debug for CoglTextureVertex {
782    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
783        f.debug_struct(&format!("CoglTextureVertex @ {:?}", self as *const _))
784            .field("x", &self.x)
785            .field("y", &self.y)
786            .field("z", &self.z)
787            .field("tx", &self.tx)
788            .field("ty", &self.ty)
789            .field("color", &self.color)
790            .finish()
791    }
792}
793
794#[repr(C)]
795#[derive(Copy, Clone)]
796pub struct CoglUserDataKey {
797    pub unused: c_int,
798}
799
800impl ::std::fmt::Debug for CoglUserDataKey {
801    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
802        f.debug_struct(&format!("CoglUserDataKey @ {:?}", self as *const _))
803            .field("unused", &self.unused)
804            .finish()
805    }
806}
807
808#[repr(C)]
809#[derive(Copy, Clone)]
810pub struct CoglVertexP2 {
811    pub x: c_float,
812    pub y: c_float,
813}
814
815impl ::std::fmt::Debug for CoglVertexP2 {
816    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
817        f.debug_struct(&format!("CoglVertexP2 @ {:?}", self as *const _))
818            .field("x", &self.x)
819            .field("y", &self.y)
820            .finish()
821    }
822}
823
824#[repr(C)]
825#[derive(Copy, Clone)]
826pub struct CoglVertexP2C4 {
827    pub x: c_float,
828    pub y: c_float,
829    pub r: u8,
830    pub g: u8,
831    pub b: u8,
832    pub a: u8,
833}
834
835impl ::std::fmt::Debug for CoglVertexP2C4 {
836    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
837        f.debug_struct(&format!("CoglVertexP2C4 @ {:?}", self as *const _))
838            .field("x", &self.x)
839            .field("y", &self.y)
840            .field("r", &self.r)
841            .field("g", &self.g)
842            .field("b", &self.b)
843            .field("a", &self.a)
844            .finish()
845    }
846}
847
848#[repr(C)]
849#[derive(Copy, Clone)]
850pub struct CoglVertexP2T2 {
851    pub x: c_float,
852    pub y: c_float,
853    pub s: c_float,
854    pub t: c_float,
855}
856
857impl ::std::fmt::Debug for CoglVertexP2T2 {
858    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
859        f.debug_struct(&format!("CoglVertexP2T2 @ {:?}", self as *const _))
860            .field("x", &self.x)
861            .field("y", &self.y)
862            .field("s", &self.s)
863            .field("t", &self.t)
864            .finish()
865    }
866}
867
868#[repr(C)]
869#[derive(Copy, Clone)]
870pub struct CoglVertexP2T2C4 {
871    pub x: c_float,
872    pub y: c_float,
873    pub s: c_float,
874    pub t: c_float,
875    pub r: u8,
876    pub g: u8,
877    pub b: u8,
878    pub a: u8,
879}
880
881impl ::std::fmt::Debug for CoglVertexP2T2C4 {
882    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
883        f.debug_struct(&format!("CoglVertexP2T2C4 @ {:?}", self as *const _))
884            .field("x", &self.x)
885            .field("y", &self.y)
886            .field("s", &self.s)
887            .field("t", &self.t)
888            .field("r", &self.r)
889            .field("g", &self.g)
890            .field("b", &self.b)
891            .field("a", &self.a)
892            .finish()
893    }
894}
895
896#[repr(C)]
897#[derive(Copy, Clone)]
898pub struct CoglVertexP3 {
899    pub x: c_float,
900    pub y: c_float,
901    pub z: c_float,
902}
903
904impl ::std::fmt::Debug for CoglVertexP3 {
905    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
906        f.debug_struct(&format!("CoglVertexP3 @ {:?}", self as *const _))
907            .field("x", &self.x)
908            .field("y", &self.y)
909            .field("z", &self.z)
910            .finish()
911    }
912}
913
914#[repr(C)]
915#[derive(Copy, Clone)]
916pub struct CoglVertexP3C4 {
917    pub x: c_float,
918    pub y: c_float,
919    pub z: c_float,
920    pub r: u8,
921    pub g: u8,
922    pub b: u8,
923    pub a: u8,
924}
925
926impl ::std::fmt::Debug for CoglVertexP3C4 {
927    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
928        f.debug_struct(&format!("CoglVertexP3C4 @ {:?}", self as *const _))
929            .field("x", &self.x)
930            .field("y", &self.y)
931            .field("z", &self.z)
932            .field("r", &self.r)
933            .field("g", &self.g)
934            .field("b", &self.b)
935            .field("a", &self.a)
936            .finish()
937    }
938}
939
940#[repr(C)]
941#[derive(Copy, Clone)]
942pub struct CoglVertexP3T2 {
943    pub x: c_float,
944    pub y: c_float,
945    pub z: c_float,
946    pub s: c_float,
947    pub t: c_float,
948}
949
950impl ::std::fmt::Debug for CoglVertexP3T2 {
951    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
952        f.debug_struct(&format!("CoglVertexP3T2 @ {:?}", self as *const _))
953            .field("x", &self.x)
954            .field("y", &self.y)
955            .field("z", &self.z)
956            .field("s", &self.s)
957            .field("t", &self.t)
958            .finish()
959    }
960}
961
962#[repr(C)]
963#[derive(Copy, Clone)]
964pub struct CoglVertexP3T2C4 {
965    pub x: c_float,
966    pub y: c_float,
967    pub z: c_float,
968    pub s: c_float,
969    pub t: c_float,
970    pub r: u8,
971    pub g: u8,
972    pub b: u8,
973    pub a: u8,
974}
975
976impl ::std::fmt::Debug for CoglVertexP3T2C4 {
977    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
978        f.debug_struct(&format!("CoglVertexP3T2C4 @ {:?}", self as *const _))
979            .field("x", &self.x)
980            .field("y", &self.y)
981            .field("z", &self.z)
982            .field("s", &self.s)
983            .field("t", &self.t)
984            .field("r", &self.r)
985            .field("g", &self.g)
986            .field("b", &self.b)
987            .field("a", &self.a)
988            .finish()
989    }
990}
991
992#[repr(C)]
993pub struct _CoglColorSizeCheck {
994    _truncated_record_marker: c_void,
995    // /*Ignored*/field compile_time_assert_CoglColor_size has empty c:type
996}
997
998impl ::std::fmt::Debug for _CoglColorSizeCheck {
999    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1000        f.debug_struct(&format!("_CoglColorSizeCheck @ {:?}", self as *const _))
1001            .finish()
1002    }
1003}
1004
1005#[repr(C)]
1006pub struct _CoglEulerSizeCheck {
1007    _truncated_record_marker: c_void,
1008    // /*Ignored*/field compile_time_assert_CoglEuler_size has empty c:type
1009}
1010
1011impl ::std::fmt::Debug for _CoglEulerSizeCheck {
1012    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1013        f.debug_struct(&format!("_CoglEulerSizeCheck @ {:?}", self as *const _))
1014            .finish()
1015    }
1016}
1017
1018#[repr(C)]
1019pub struct _CoglMatrixSizeCheck {
1020    _truncated_record_marker: c_void,
1021    // /*Ignored*/field compile_time_assert_CoglMatrix_size has empty c:type
1022}
1023
1024impl ::std::fmt::Debug for _CoglMatrixSizeCheck {
1025    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1026        f.debug_struct(&format!("_CoglMatrixSizeCheck @ {:?}", self as *const _))
1027            .finish()
1028    }
1029}
1030
1031#[repr(C)]
1032pub struct _CoglQuaternionSizeCheck {
1033    _truncated_record_marker: c_void,
1034    // /*Ignored*/field compile_time_assert_CoglQuaternion_size has empty c:type
1035}
1036
1037impl ::std::fmt::Debug for _CoglQuaternionSizeCheck {
1038    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1039        f.debug_struct(&format!(
1040            "_CoglQuaternionSizeCheck @ {:?}",
1041            self as *const _
1042        ))
1043        .finish()
1044    }
1045}
1046
1047#[repr(C)]
1048pub struct _CoglTextureVertexSizeCheck {
1049    _truncated_record_marker: c_void,
1050    // /*Ignored*/field compile_time_assert_CoglTextureVertex_size has empty c:type
1051}
1052
1053impl ::std::fmt::Debug for _CoglTextureVertexSizeCheck {
1054    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1055        f.debug_struct(&format!(
1056            "_CoglTextureVertexSizeCheck @ {:?}",
1057            self as *const _
1058        ))
1059        .finish()
1060    }
1061}
1062
1063// Classes
1064#[repr(C)]
1065pub struct CoglAtlasTexture(c_void);
1066
1067impl ::std::fmt::Debug for CoglAtlasTexture {
1068    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1069        f.debug_struct(&format!("CoglAtlasTexture @ {:?}", self as *const _))
1070            .finish()
1071    }
1072}
1073
1074#[repr(C)]
1075pub struct CoglAttribute(c_void);
1076
1077impl ::std::fmt::Debug for CoglAttribute {
1078    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1079        f.debug_struct(&format!("CoglAttribute @ {:?}", self as *const _))
1080            .finish()
1081    }
1082}
1083
1084#[repr(C)]
1085pub struct CoglAttributeBuffer(c_void);
1086
1087impl ::std::fmt::Debug for CoglAttributeBuffer {
1088    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1089        f.debug_struct(&format!("CoglAttributeBuffer @ {:?}", self as *const _))
1090            .finish()
1091    }
1092}
1093
1094#[repr(C)]
1095pub struct CoglBitmap(c_void);
1096
1097impl ::std::fmt::Debug for CoglBitmap {
1098    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1099        f.debug_struct(&format!("CoglBitmap @ {:?}", self as *const _))
1100            .finish()
1101    }
1102}
1103
1104#[repr(C)]
1105pub struct CoglContext(c_void);
1106
1107impl ::std::fmt::Debug for CoglContext {
1108    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1109        f.debug_struct(&format!("CoglContext @ {:?}", self as *const _))
1110            .finish()
1111    }
1112}
1113
1114#[repr(C)]
1115pub struct CoglDisplay(c_void);
1116
1117impl ::std::fmt::Debug for CoglDisplay {
1118    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1119        f.debug_struct(&format!("CoglDisplay @ {:?}", self as *const _))
1120            .finish()
1121    }
1122}
1123
1124#[repr(C)]
1125pub struct CoglFixed(c_void);
1126
1127impl ::std::fmt::Debug for CoglFixed {
1128    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1129        f.debug_struct(&format!("CoglFixed @ {:?}", self as *const _))
1130            .finish()
1131    }
1132}
1133
1134#[repr(C)]
1135pub struct CoglFrameInfo(c_void);
1136
1137impl ::std::fmt::Debug for CoglFrameInfo {
1138    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1139        f.debug_struct(&format!("CoglFrameInfo @ {:?}", self as *const _))
1140            .finish()
1141    }
1142}
1143
1144#[repr(C)]
1145pub struct CoglGLES2Context(c_void);
1146
1147impl ::std::fmt::Debug for CoglGLES2Context {
1148    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1149        f.debug_struct(&format!("CoglGLES2Context @ {:?}", self as *const _))
1150            .finish()
1151    }
1152}
1153
1154#[repr(C)]
1155pub struct CoglIndexBuffer(c_void);
1156
1157impl ::std::fmt::Debug for CoglIndexBuffer {
1158    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1159        f.debug_struct(&format!("CoglIndexBuffer @ {:?}", self as *const _))
1160            .finish()
1161    }
1162}
1163
1164#[repr(C)]
1165pub struct CoglIndices(c_void);
1166
1167impl ::std::fmt::Debug for CoglIndices {
1168    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1169        f.debug_struct(&format!("CoglIndices @ {:?}", self as *const _))
1170            .finish()
1171    }
1172}
1173
1174#[repr(C)]
1175pub struct CoglMatrixStack(c_void);
1176
1177impl ::std::fmt::Debug for CoglMatrixStack {
1178    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1179        f.debug_struct(&format!("CoglMatrixStack @ {:?}", self as *const _))
1180            .finish()
1181    }
1182}
1183
1184#[repr(C)]
1185pub struct CoglObject(c_void);
1186
1187impl ::std::fmt::Debug for CoglObject {
1188    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1189        f.debug_struct(&format!("CoglObject @ {:?}", self as *const _))
1190            .finish()
1191    }
1192}
1193
1194#[repr(C)]
1195pub struct CoglOnscreen(c_void);
1196
1197impl ::std::fmt::Debug for CoglOnscreen {
1198    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1199        f.debug_struct(&format!("CoglOnscreen @ {:?}", self as *const _))
1200            .finish()
1201    }
1202}
1203
1204#[repr(C)]
1205pub struct CoglOnscreenTemplate(c_void);
1206
1207impl ::std::fmt::Debug for CoglOnscreenTemplate {
1208    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1209        f.debug_struct(&format!("CoglOnscreenTemplate @ {:?}", self as *const _))
1210            .finish()
1211    }
1212}
1213
1214#[repr(C)]
1215pub struct CoglOutput(c_void);
1216
1217impl ::std::fmt::Debug for CoglOutput {
1218    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1219        f.debug_struct(&format!("CoglOutput @ {:?}", self as *const _))
1220            .finish()
1221    }
1222}
1223
1224#[repr(C)]
1225pub struct CoglPipeline(c_void);
1226
1227impl ::std::fmt::Debug for CoglPipeline {
1228    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1229        f.debug_struct(&format!("CoglPipeline @ {:?}", self as *const _))
1230            .finish()
1231    }
1232}
1233
1234#[repr(C)]
1235pub struct CoglPixelBuffer(c_void);
1236
1237impl ::std::fmt::Debug for CoglPixelBuffer {
1238    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1239        f.debug_struct(&format!("CoglPixelBuffer @ {:?}", self as *const _))
1240            .finish()
1241    }
1242}
1243
1244#[repr(C)]
1245pub struct CoglPrimitive(c_void);
1246
1247impl ::std::fmt::Debug for CoglPrimitive {
1248    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1249        f.debug_struct(&format!("CoglPrimitive @ {:?}", self as *const _))
1250            .finish()
1251    }
1252}
1253
1254#[repr(C)]
1255pub struct CoglRenderer(c_void);
1256
1257impl ::std::fmt::Debug for CoglRenderer {
1258    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1259        f.debug_struct(&format!("CoglRenderer @ {:?}", self as *const _))
1260            .finish()
1261    }
1262}
1263
1264#[repr(C)]
1265pub struct CoglSnippet(c_void);
1266
1267impl ::std::fmt::Debug for CoglSnippet {
1268    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1269        f.debug_struct(&format!("CoglSnippet @ {:?}", self as *const _))
1270            .finish()
1271    }
1272}
1273
1274#[repr(C)]
1275pub struct CoglSubTexture(c_void);
1276
1277impl ::std::fmt::Debug for CoglSubTexture {
1278    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1279        f.debug_struct(&format!("CoglSubTexture @ {:?}", self as *const _))
1280            .finish()
1281    }
1282}
1283
1284#[repr(C)]
1285pub struct CoglSwapChain(c_void);
1286
1287impl ::std::fmt::Debug for CoglSwapChain {
1288    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1289        f.debug_struct(&format!("CoglSwapChain @ {:?}", self as *const _))
1290            .finish()
1291    }
1292}
1293
1294#[repr(C)]
1295pub struct CoglTexture2D(c_void);
1296
1297impl ::std::fmt::Debug for CoglTexture2D {
1298    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1299        f.debug_struct(&format!("CoglTexture2D @ {:?}", self as *const _))
1300            .finish()
1301    }
1302}
1303
1304#[repr(C)]
1305pub struct CoglTexture2DSliced(c_void);
1306
1307impl ::std::fmt::Debug for CoglTexture2DSliced {
1308    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1309        f.debug_struct(&format!("CoglTexture2DSliced @ {:?}", self as *const _))
1310            .finish()
1311    }
1312}
1313
1314#[repr(C)]
1315pub struct CoglTexture3D(c_void);
1316
1317impl ::std::fmt::Debug for CoglTexture3D {
1318    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1319        f.debug_struct(&format!("CoglTexture3D @ {:?}", self as *const _))
1320            .finish()
1321    }
1322}
1323
1324#[repr(C)]
1325pub struct CoglTexturePixmapX11(c_void);
1326
1327impl ::std::fmt::Debug for CoglTexturePixmapX11 {
1328    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1329        f.debug_struct(&format!("CoglTexturePixmapX11 @ {:?}", self as *const _))
1330            .finish()
1331    }
1332}
1333
1334#[repr(C)]
1335pub struct CoglTextureRectangle(c_void);
1336
1337impl ::std::fmt::Debug for CoglTextureRectangle {
1338    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1339        f.debug_struct(&format!("CoglTextureRectangle @ {:?}", self as *const _))
1340            .finish()
1341    }
1342}
1343
1344// Interfaces
1345#[repr(C)]
1346pub struct CoglFramebuffer(c_void);
1347
1348impl ::std::fmt::Debug for CoglFramebuffer {
1349    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1350        write!(f, "CoglFramebuffer @ {:?}", self as *const _)
1351    }
1352}
1353
1354#[repr(C)]
1355pub struct CoglTexture(c_void);
1356
1357impl ::std::fmt::Debug for CoglTexture {
1358    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1359        write!(f, "CoglTexture @ {:?}", self as *const _)
1360    }
1361}
1362
1363extern "C" {
1364
1365    //=========================================================================
1366    // CoglAttributeType
1367    //=========================================================================
1368    pub fn cogl_attribute_type_get_type() -> GType;
1369
1370    //=========================================================================
1371    // CoglBitmapError
1372    //=========================================================================
1373    pub fn cogl_bitmap_error_get_type() -> GType;
1374    pub fn cogl_bitmap_error_quark() -> u32;
1375
1376    //=========================================================================
1377    // CoglBlendStringError
1378    //=========================================================================
1379    pub fn cogl_blend_string_error_get_type() -> GType;
1380    pub fn cogl_blend_string_error_quark() -> u32;
1381
1382    //=========================================================================
1383    // CoglDepthTestFunction
1384    //=========================================================================
1385    pub fn cogl_depth_test_function_get_type() -> GType;
1386
1387    //=========================================================================
1388    // CoglFilterReturn
1389    //=========================================================================
1390    pub fn cogl_filter_return_get_type() -> GType;
1391
1392    //=========================================================================
1393    // CoglFogMode
1394    //=========================================================================
1395    pub fn cogl_fog_mode_get_type() -> GType;
1396
1397    //=========================================================================
1398    // CoglIndicesType
1399    //=========================================================================
1400    pub fn cogl_indices_type_get_type() -> GType;
1401
1402    //=========================================================================
1403    // CoglMaterialAlphaFunc
1404    //=========================================================================
1405    pub fn cogl_material_alpha_func_get_type() -> GType;
1406
1407    //=========================================================================
1408    // CoglMaterialFilter
1409    //=========================================================================
1410    pub fn cogl_material_filter_get_type() -> GType;
1411
1412    //=========================================================================
1413    // CoglMaterialLayerType
1414    //=========================================================================
1415    pub fn cogl_material_layer_type_get_type() -> GType;
1416
1417    //=========================================================================
1418    // CoglMaterialWrapMode
1419    //=========================================================================
1420    pub fn cogl_material_wrap_mode_get_type() -> GType;
1421
1422    //=========================================================================
1423    // CoglPixelFormat
1424    //=========================================================================
1425    pub fn cogl_pixel_format_get_type() -> GType;
1426
1427    //=========================================================================
1428    // CoglRendererError
1429    //=========================================================================
1430    pub fn cogl_renderer_error_get_type() -> GType;
1431    pub fn cogl_renderer_error_quark() -> u32;
1432
1433    //=========================================================================
1434    // CoglShaderType
1435    //=========================================================================
1436    pub fn cogl_shader_type_get_type() -> GType;
1437
1438    //=========================================================================
1439    // CoglStereoMode
1440    //=========================================================================
1441    pub fn cogl_stereo_mode_get_type() -> GType;
1442
1443    //=========================================================================
1444    // CoglSystemError
1445    //=========================================================================
1446    pub fn cogl_system_error_get_type() -> GType;
1447
1448    //=========================================================================
1449    // CoglTextureComponents
1450    //=========================================================================
1451    pub fn cogl_texture_components_get_type() -> GType;
1452
1453    //=========================================================================
1454    // CoglTextureError
1455    //=========================================================================
1456    pub fn cogl_texture_error_get_type() -> GType;
1457    pub fn cogl_texture_error_quark() -> u32;
1458
1459    //=========================================================================
1460    // CoglTextureType
1461    //=========================================================================
1462    pub fn cogl_texture_type_get_type() -> GType;
1463
1464    //=========================================================================
1465    // CoglVerticesMode
1466    //=========================================================================
1467    pub fn cogl_vertices_mode_get_type() -> GType;
1468
1469    //=========================================================================
1470    // CoglWinding
1471    //=========================================================================
1472    pub fn cogl_winding_get_type() -> GType;
1473
1474    //=========================================================================
1475    // CoglWinsysFeature
1476    //=========================================================================
1477    pub fn cogl_winsys_feature_get_type() -> GType;
1478
1479    //=========================================================================
1480    // CoglBufferBit
1481    //=========================================================================
1482    pub fn cogl_buffer_bit_get_type() -> GType;
1483
1484    //=========================================================================
1485    // CoglBufferTarget
1486    //=========================================================================
1487    pub fn cogl_buffer_target_get_type() -> GType;
1488
1489    //=========================================================================
1490    // CoglColorMask
1491    //=========================================================================
1492    pub fn cogl_color_mask_get_type() -> GType;
1493
1494    //=========================================================================
1495    // CoglFeatureFlags
1496    //=========================================================================
1497    pub fn cogl_feature_flags_get_type() -> GType;
1498
1499    //=========================================================================
1500    // CoglReadPixelsFlags
1501    //=========================================================================
1502    pub fn cogl_read_pixels_flags_get_type() -> GType;
1503
1504    //=========================================================================
1505    // CoglTextureFlags
1506    //=========================================================================
1507    pub fn cogl_texture_flags_get_type() -> GType;
1508
1509    //=========================================================================
1510    // CoglColor
1511    //=========================================================================
1512    pub fn cogl_color_get_gtype() -> GType;
1513    pub fn cogl_color_new() -> *mut CoglColor;
1514    pub fn cogl_color_copy(color: *const CoglColor) -> *mut CoglColor;
1515    pub fn cogl_color_free(color: *mut CoglColor);
1516    pub fn cogl_color_get_alpha(color: *const CoglColor) -> c_float;
1517    pub fn cogl_color_get_alpha_byte(color: *const CoglColor) -> u8;
1518    pub fn cogl_color_get_alpha_float(color: *const CoglColor) -> c_float;
1519    pub fn cogl_color_get_blue(color: *const CoglColor) -> c_float;
1520    pub fn cogl_color_get_blue_byte(color: *const CoglColor) -> u8;
1521    pub fn cogl_color_get_blue_float(color: *const CoglColor) -> c_float;
1522    pub fn cogl_color_get_green(color: *const CoglColor) -> c_float;
1523    pub fn cogl_color_get_green_byte(color: *const CoglColor) -> u8;
1524    pub fn cogl_color_get_green_float(color: *const CoglColor) -> c_float;
1525    pub fn cogl_color_get_red(color: *const CoglColor) -> c_float;
1526    pub fn cogl_color_get_red_byte(color: *const CoglColor) -> u8;
1527    pub fn cogl_color_get_red_float(color: *const CoglColor) -> c_float;
1528    pub fn cogl_color_init_from_4f(
1529        color: *mut CoglColor,
1530        red: c_float,
1531        green: c_float,
1532        blue: c_float,
1533        alpha: c_float,
1534    );
1535    pub fn cogl_color_init_from_4fv(color: *mut CoglColor, color_array: *const c_float);
1536    pub fn cogl_color_init_from_4ub(color: *mut CoglColor, red: u8, green: u8, blue: u8, alpha: u8);
1537    pub fn cogl_color_premultiply(color: *mut CoglColor);
1538    pub fn cogl_color_set_alpha(color: *mut CoglColor, alpha: c_float);
1539    pub fn cogl_color_set_alpha_byte(color: *mut CoglColor, alpha: u8);
1540    pub fn cogl_color_set_alpha_float(color: *mut CoglColor, alpha: c_float);
1541    pub fn cogl_color_set_blue(color: *mut CoglColor, blue: c_float);
1542    pub fn cogl_color_set_blue_byte(color: *mut CoglColor, blue: u8);
1543    pub fn cogl_color_set_blue_float(color: *mut CoglColor, blue: c_float);
1544    pub fn cogl_color_set_from_4f(
1545        color: *mut CoglColor,
1546        red: c_float,
1547        green: c_float,
1548        blue: c_float,
1549        alpha: c_float,
1550    );
1551    pub fn cogl_color_set_from_4ub(color: *mut CoglColor, red: u8, green: u8, blue: u8, alpha: u8);
1552    pub fn cogl_color_set_green(color: *mut CoglColor, green: c_float);
1553    pub fn cogl_color_set_green_byte(color: *mut CoglColor, green: u8);
1554    pub fn cogl_color_set_green_float(color: *mut CoglColor, green: c_float);
1555    pub fn cogl_color_set_red(color: *mut CoglColor, red: c_float);
1556    pub fn cogl_color_set_red_byte(color: *mut CoglColor, red: u8);
1557    pub fn cogl_color_set_red_float(color: *mut CoglColor, red: c_float);
1558    pub fn cogl_color_to_hsl(
1559        color: *const CoglColor,
1560        hue: *mut c_float,
1561        saturation: *mut c_float,
1562        luminance: *mut c_float,
1563    );
1564    pub fn cogl_color_unpremultiply(color: *mut CoglColor);
1565    pub fn cogl_color_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
1566    pub fn cogl_color_init_from_hsl(
1567        color: *mut CoglColor,
1568        hue: c_float,
1569        saturation: c_float,
1570        luminance: c_float,
1571    );
1572
1573    //=========================================================================
1574    // CoglDepthState
1575    //=========================================================================
1576    pub fn cogl_depth_state_get_range(
1577        state: *mut CoglDepthState,
1578        near_val: *mut c_float,
1579        far_val: *mut c_float,
1580    );
1581    pub fn cogl_depth_state_get_test_enabled(state: *mut CoglDepthState) -> CoglBool;
1582    pub fn cogl_depth_state_get_test_function(state: *mut CoglDepthState) -> CoglDepthTestFunction;
1583    pub fn cogl_depth_state_get_write_enabled(state: *mut CoglDepthState) -> CoglBool;
1584    pub fn cogl_depth_state_init(state: *mut CoglDepthState);
1585    pub fn cogl_depth_state_set_range(
1586        state: *mut CoglDepthState,
1587        near_val: c_float,
1588        far_val: c_float,
1589    );
1590    pub fn cogl_depth_state_set_test_enabled(state: *mut CoglDepthState, enable: CoglBool);
1591    pub fn cogl_depth_state_set_test_function(
1592        state: *mut CoglDepthState,
1593        function: CoglDepthTestFunction,
1594    );
1595    pub fn cogl_depth_state_set_write_enabled(state: *mut CoglDepthState, enable: CoglBool);
1596
1597    //=========================================================================
1598    // CoglEuler
1599    //=========================================================================
1600    pub fn cogl_euler_get_gtype() -> GType;
1601    pub fn cogl_euler_copy(src: *const CoglEuler) -> *mut CoglEuler;
1602    pub fn cogl_euler_free(euler: *mut CoglEuler);
1603    pub fn cogl_euler_init(euler: *mut CoglEuler, heading: c_float, pitch: c_float, roll: c_float);
1604    pub fn cogl_euler_init_from_matrix(euler: *mut CoglEuler, matrix: *const CoglMatrix);
1605    pub fn cogl_euler_init_from_quaternion(
1606        euler: *mut CoglEuler,
1607        quaternion: *const CoglQuaternion,
1608    );
1609    pub fn cogl_euler_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
1610
1611    //=========================================================================
1612    // CoglFenceClosure
1613    //=========================================================================
1614    pub fn cogl_fence_closure_get_user_data(closure: *mut CoglFenceClosure) -> *mut c_void;
1615
1616    //=========================================================================
1617    // CoglFrameClosure
1618    //=========================================================================
1619    pub fn cogl_frame_closure_get_gtype() -> GType;
1620
1621    //=========================================================================
1622    // CoglMaterial
1623    //=========================================================================
1624    pub fn cogl_material_copy(source: *mut CoglMaterial) -> *mut CoglMaterial;
1625    pub fn cogl_material_get_ambient(material: *mut CoglMaterial, ambient: *mut CoglColor);
1626    pub fn cogl_material_get_color(material: *mut CoglMaterial, color: *mut CoglColor);
1627    pub fn cogl_material_get_diffuse(material: *mut CoglMaterial, diffuse: *mut CoglColor);
1628    pub fn cogl_material_get_emission(material: *mut CoglMaterial, emission: *mut CoglColor);
1629    pub fn cogl_material_get_layer_point_sprite_coords_enabled(
1630        material: *mut CoglMaterial,
1631        layer_index: c_int,
1632    ) -> CoglBool;
1633    pub fn cogl_material_get_layer_wrap_mode_p(
1634        material: *mut CoglMaterial,
1635        layer_index: c_int,
1636    ) -> CoglMaterialWrapMode;
1637    pub fn cogl_material_get_layer_wrap_mode_s(
1638        material: *mut CoglMaterial,
1639        layer_index: c_int,
1640    ) -> CoglMaterialWrapMode;
1641    pub fn cogl_material_get_layer_wrap_mode_t(
1642        material: *mut CoglMaterial,
1643        layer_index: c_int,
1644    ) -> CoglMaterialWrapMode;
1645    pub fn cogl_material_get_layers(material: *mut CoglMaterial) -> *const glib::GList;
1646    pub fn cogl_material_get_n_layers(material: *mut CoglMaterial) -> c_int;
1647    pub fn cogl_material_get_point_size(material: *mut CoglMaterial) -> c_float;
1648    pub fn cogl_material_get_shininess(material: *mut CoglMaterial) -> c_float;
1649    pub fn cogl_material_get_specular(material: *mut CoglMaterial, specular: *mut CoglColor);
1650    pub fn cogl_material_get_user_program(material: *mut CoglMaterial) -> CoglHandle;
1651    pub fn cogl_material_remove_layer(material: *mut CoglMaterial, layer_index: c_int);
1652    pub fn cogl_material_set_alpha_test_function(
1653        material: *mut CoglMaterial,
1654        alpha_func: CoglMaterialAlphaFunc,
1655        alpha_reference: c_float,
1656    );
1657    pub fn cogl_material_set_ambient(material: *mut CoglMaterial, ambient: *const CoglColor);
1658    pub fn cogl_material_set_ambient_and_diffuse(
1659        material: *mut CoglMaterial,
1660        color: *const CoglColor,
1661    );
1662    pub fn cogl_material_set_blend(
1663        material: *mut CoglMaterial,
1664        blend_string: *const c_char,
1665        error: *mut *mut glib::GError,
1666    ) -> CoglBool;
1667    pub fn cogl_material_set_blend_constant(
1668        material: *mut CoglMaterial,
1669        constant_color: *const CoglColor,
1670    );
1671    pub fn cogl_material_set_color(material: *mut CoglMaterial, color: *const CoglColor);
1672    pub fn cogl_material_set_color4f(
1673        material: *mut CoglMaterial,
1674        red: c_float,
1675        green: c_float,
1676        blue: c_float,
1677        alpha: c_float,
1678    );
1679    pub fn cogl_material_set_color4ub(
1680        material: *mut CoglMaterial,
1681        red: u8,
1682        green: u8,
1683        blue: u8,
1684        alpha: u8,
1685    );
1686    pub fn cogl_material_set_diffuse(material: *mut CoglMaterial, diffuse: *const CoglColor);
1687    pub fn cogl_material_set_emission(material: *mut CoglMaterial, emission: *const CoglColor);
1688    pub fn cogl_material_set_layer(
1689        material: *mut CoglMaterial,
1690        layer_index: c_int,
1691        texture: CoglHandle,
1692    );
1693    pub fn cogl_material_set_layer_combine(
1694        material: *mut CoglMaterial,
1695        layer_index: c_int,
1696        blend_string: *const c_char,
1697        error: *mut *mut glib::GError,
1698    ) -> CoglBool;
1699    pub fn cogl_material_set_layer_combine_constant(
1700        material: *mut CoglMaterial,
1701        layer_index: c_int,
1702        constant: *const CoglColor,
1703    );
1704    pub fn cogl_material_set_layer_filters(
1705        material: *mut CoglMaterial,
1706        layer_index: c_int,
1707        min_filter: CoglMaterialFilter,
1708        mag_filter: CoglMaterialFilter,
1709    );
1710    pub fn cogl_material_set_layer_matrix(
1711        material: *mut CoglMaterial,
1712        layer_index: c_int,
1713        matrix: *const CoglMatrix,
1714    );
1715    pub fn cogl_material_set_layer_point_sprite_coords_enabled(
1716        material: *mut CoglMaterial,
1717        layer_index: c_int,
1718        enable: CoglBool,
1719        error: *mut *mut glib::GError,
1720    ) -> CoglBool;
1721    pub fn cogl_material_set_layer_wrap_mode(
1722        material: *mut CoglMaterial,
1723        layer_index: c_int,
1724        mode: CoglMaterialWrapMode,
1725    );
1726    pub fn cogl_material_set_layer_wrap_mode_p(
1727        material: *mut CoglMaterial,
1728        layer_index: c_int,
1729        mode: CoglMaterialWrapMode,
1730    );
1731    pub fn cogl_material_set_layer_wrap_mode_s(
1732        material: *mut CoglMaterial,
1733        layer_index: c_int,
1734        mode: CoglMaterialWrapMode,
1735    );
1736    pub fn cogl_material_set_layer_wrap_mode_t(
1737        material: *mut CoglMaterial,
1738        layer_index: c_int,
1739        mode: CoglMaterialWrapMode,
1740    );
1741    pub fn cogl_material_set_point_size(material: *mut CoglMaterial, point_size: c_float);
1742    pub fn cogl_material_set_shininess(material: *mut CoglMaterial, shininess: c_float);
1743    pub fn cogl_material_set_specular(material: *mut CoglMaterial, specular: *const CoglColor);
1744    pub fn cogl_material_set_user_program(material: *mut CoglMaterial, program: CoglHandle);
1745    pub fn cogl_material_new() -> *mut CoglMaterial;
1746    pub fn cogl_material_ref(material: CoglHandle) -> CoglHandle;
1747    pub fn cogl_material_unref(material: CoglHandle);
1748
1749    //=========================================================================
1750    // CoglMaterialLayer
1751    //=========================================================================
1752    pub fn cogl_material_layer_get_mag_filter(layer: *mut CoglMaterialLayer) -> CoglMaterialFilter;
1753    pub fn cogl_material_layer_get_min_filter(layer: *mut CoglMaterialLayer) -> CoglMaterialFilter;
1754    pub fn cogl_material_layer_get_texture(layer: *mut CoglMaterialLayer) -> CoglHandle;
1755    pub fn cogl_material_layer_get_type(layer: *mut CoglMaterialLayer) -> CoglMaterialLayerType;
1756    pub fn cogl_material_layer_get_wrap_mode_p(
1757        layer: *mut CoglMaterialLayer,
1758    ) -> CoglMaterialWrapMode;
1759    pub fn cogl_material_layer_get_wrap_mode_s(
1760        layer: *mut CoglMaterialLayer,
1761    ) -> CoglMaterialWrapMode;
1762    pub fn cogl_material_layer_get_wrap_mode_t(
1763        layer: *mut CoglMaterialLayer,
1764    ) -> CoglMaterialWrapMode;
1765
1766    //=========================================================================
1767    // CoglMatrix
1768    //=========================================================================
1769    pub fn cogl_matrix_get_gtype() -> GType;
1770    pub fn cogl_matrix_copy(matrix: *const CoglMatrix) -> *mut CoglMatrix;
1771    pub fn cogl_matrix_free(matrix: *mut CoglMatrix);
1772    pub fn cogl_matrix_frustum(
1773        matrix: *mut CoglMatrix,
1774        left: c_float,
1775        right: c_float,
1776        bottom: c_float,
1777        top: c_float,
1778        z_near: c_float,
1779        z_far: c_float,
1780    );
1781    pub fn cogl_matrix_get_array(matrix: *const CoglMatrix) -> *const c_float;
1782    pub fn cogl_matrix_get_inverse(matrix: *const CoglMatrix, inverse: *mut CoglMatrix)
1783        -> CoglBool;
1784    pub fn cogl_matrix_init_from_array(matrix: *mut CoglMatrix, array: *const c_float);
1785    pub fn cogl_matrix_init_from_euler(matrix: *mut CoglMatrix, euler: *const CoglEuler);
1786    pub fn cogl_matrix_init_from_quaternion(
1787        matrix: *mut CoglMatrix,
1788        quaternion: *const CoglQuaternion,
1789    );
1790    pub fn cogl_matrix_init_identity(matrix: *mut CoglMatrix);
1791    pub fn cogl_matrix_init_translation(
1792        matrix: *mut CoglMatrix,
1793        tx: c_float,
1794        ty: c_float,
1795        tz: c_float,
1796    );
1797    pub fn cogl_matrix_is_identity(matrix: *const CoglMatrix) -> CoglBool;
1798    pub fn cogl_matrix_look_at(
1799        matrix: *mut CoglMatrix,
1800        eye_position_x: c_float,
1801        eye_position_y: c_float,
1802        eye_position_z: c_float,
1803        object_x: c_float,
1804        object_y: c_float,
1805        object_z: c_float,
1806        world_up_x: c_float,
1807        world_up_y: c_float,
1808        world_up_z: c_float,
1809    );
1810    pub fn cogl_matrix_multiply(
1811        result: *mut CoglMatrix,
1812        a: *const CoglMatrix,
1813        b: *const CoglMatrix,
1814    );
1815    pub fn cogl_matrix_ortho(
1816        matrix: *mut CoglMatrix,
1817        left: c_float,
1818        right: c_float,
1819        bottom: c_float,
1820        top: c_float,
1821        near: c_float,
1822        far: c_float,
1823    );
1824    pub fn cogl_matrix_orthographic(
1825        matrix: *mut CoglMatrix,
1826        x_1: c_float,
1827        y_1: c_float,
1828        x_2: c_float,
1829        y_2: c_float,
1830        near: c_float,
1831        far: c_float,
1832    );
1833    pub fn cogl_matrix_perspective(
1834        matrix: *mut CoglMatrix,
1835        fov_y: c_float,
1836        aspect: c_float,
1837        z_near: c_float,
1838        z_far: c_float,
1839    );
1840    pub fn cogl_matrix_project_points(
1841        matrix: *const CoglMatrix,
1842        n_components: c_int,
1843        stride_in: size_t,
1844        points_in: *mut c_void,
1845        stride_out: size_t,
1846        points_out: *mut c_void,
1847        n_points: c_int,
1848    );
1849    pub fn cogl_matrix_rotate(
1850        matrix: *mut CoglMatrix,
1851        angle: c_float,
1852        x: c_float,
1853        y: c_float,
1854        z: c_float,
1855    );
1856    pub fn cogl_matrix_rotate_euler(matrix: *mut CoglMatrix, euler: *const CoglEuler);
1857    pub fn cogl_matrix_rotate_quaternion(
1858        matrix: *mut CoglMatrix,
1859        quaternion: *const CoglQuaternion,
1860    );
1861    pub fn cogl_matrix_scale(matrix: *mut CoglMatrix, sx: c_float, sy: c_float, sz: c_float);
1862    pub fn cogl_matrix_transform_point(
1863        matrix: *const CoglMatrix,
1864        x: *mut c_float,
1865        y: *mut c_float,
1866        z: *mut c_float,
1867        w: *mut c_float,
1868    );
1869    pub fn cogl_matrix_transform_points(
1870        matrix: *const CoglMatrix,
1871        n_components: c_int,
1872        stride_in: size_t,
1873        points_in: *mut c_void,
1874        stride_out: size_t,
1875        points_out: *mut c_void,
1876        n_points: c_int,
1877    );
1878    pub fn cogl_matrix_translate(matrix: *mut CoglMatrix, x: c_float, y: c_float, z: c_float);
1879    pub fn cogl_matrix_transpose(matrix: *mut CoglMatrix);
1880    pub fn cogl_matrix_view_2d_in_frustum(
1881        matrix: *mut CoglMatrix,
1882        left: c_float,
1883        right: c_float,
1884        bottom: c_float,
1885        top: c_float,
1886        z_near: c_float,
1887        z_2d: c_float,
1888        width_2d: c_float,
1889        height_2d: c_float,
1890    );
1891    pub fn cogl_matrix_view_2d_in_perspective(
1892        matrix: *mut CoglMatrix,
1893        fov_y: c_float,
1894        aspect: c_float,
1895        z_near: c_float,
1896        z_2d: c_float,
1897        width_2d: c_float,
1898        height_2d: c_float,
1899    );
1900    pub fn cogl_matrix_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
1901
1902    //=========================================================================
1903    // CoglMatrixEntry
1904    //=========================================================================
1905    pub fn cogl_matrix_entry_get_gtype() -> GType;
1906    pub fn cogl_matrix_entry_calculate_translation(
1907        entry0: *mut CoglMatrixEntry,
1908        entry1: *mut CoglMatrixEntry,
1909        x: *mut c_float,
1910        y: *mut c_float,
1911        z: *mut c_float,
1912    ) -> CoglBool;
1913    pub fn cogl_matrix_entry_equal(
1914        entry0: *mut CoglMatrixEntry,
1915        entry1: *mut CoglMatrixEntry,
1916    ) -> CoglBool;
1917    pub fn cogl_matrix_entry_get(
1918        entry: *mut CoglMatrixEntry,
1919        matrix: *mut CoglMatrix,
1920    ) -> *mut CoglMatrix;
1921    pub fn cogl_matrix_entry_is_identity(entry: *mut CoglMatrixEntry) -> CoglBool;
1922    pub fn cogl_matrix_entry_ref(entry: *mut CoglMatrixEntry) -> *mut CoglMatrixEntry;
1923    pub fn cogl_matrix_entry_unref(entry: *mut CoglMatrixEntry);
1924
1925    //=========================================================================
1926    // CoglOnscreenDirtyClosure
1927    //=========================================================================
1928    pub fn cogl_onscreen_dirty_closure_get_gtype() -> GType;
1929
1930    //=========================================================================
1931    // CoglOnscreenResizeClosure
1932    //=========================================================================
1933    pub fn cogl_onscreen_resize_closure_get_gtype() -> GType;
1934
1935    //=========================================================================
1936    // CoglQuaternion
1937    //=========================================================================
1938    pub fn cogl_quaternion_get_gtype() -> GType;
1939    pub fn cogl_quaternion_copy(src: *const CoglQuaternion) -> *mut CoglQuaternion;
1940    pub fn cogl_quaternion_dot_product(
1941        a: *const CoglQuaternion,
1942        b: *const CoglQuaternion,
1943    ) -> c_float;
1944    pub fn cogl_quaternion_free(quaternion: *mut CoglQuaternion);
1945    pub fn cogl_quaternion_get_rotation_angle(quaternion: *const CoglQuaternion) -> c_float;
1946    pub fn cogl_quaternion_get_rotation_axis(
1947        quaternion: *const CoglQuaternion,
1948        vector3: *mut c_float,
1949    );
1950    pub fn cogl_quaternion_init(
1951        quaternion: *mut CoglQuaternion,
1952        angle: c_float,
1953        x: c_float,
1954        y: c_float,
1955        z: c_float,
1956    );
1957    pub fn cogl_quaternion_init_from_angle_vector(
1958        quaternion: *mut CoglQuaternion,
1959        angle: c_float,
1960        axis3f: *const c_float,
1961    );
1962    pub fn cogl_quaternion_init_from_array(quaternion: *mut CoglQuaternion, array: *const c_float);
1963    pub fn cogl_quaternion_init_from_euler(
1964        quaternion: *mut CoglQuaternion,
1965        euler: *const CoglEuler,
1966    );
1967    pub fn cogl_quaternion_init_from_matrix(
1968        quaternion: *mut CoglQuaternion,
1969        matrix: *const CoglMatrix,
1970    );
1971    pub fn cogl_quaternion_init_from_quaternion(
1972        quaternion: *mut CoglQuaternion,
1973        src: *mut CoglQuaternion,
1974    );
1975    pub fn cogl_quaternion_init_from_x_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
1976    pub fn cogl_quaternion_init_from_y_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
1977    pub fn cogl_quaternion_init_from_z_rotation(quaternion: *mut CoglQuaternion, angle: c_float);
1978    pub fn cogl_quaternion_init_identity(quaternion: *mut CoglQuaternion);
1979    pub fn cogl_quaternion_invert(quaternion: *mut CoglQuaternion);
1980    pub fn cogl_quaternion_multiply(
1981        result: *mut CoglQuaternion,
1982        left: *const CoglQuaternion,
1983        right: *const CoglQuaternion,
1984    );
1985    pub fn cogl_quaternion_nlerp(
1986        result: *mut CoglQuaternion,
1987        a: *const CoglQuaternion,
1988        b: *const CoglQuaternion,
1989        t: c_float,
1990    );
1991    pub fn cogl_quaternion_normalize(quaternion: *mut CoglQuaternion);
1992    pub fn cogl_quaternion_pow(quaternion: *mut CoglQuaternion, exponent: c_float);
1993    pub fn cogl_quaternion_slerp(
1994        result: *mut CoglQuaternion,
1995        a: *const CoglQuaternion,
1996        b: *const CoglQuaternion,
1997        t: c_float,
1998    );
1999    pub fn cogl_quaternion_squad(
2000        result: *mut CoglQuaternion,
2001        prev: *const CoglQuaternion,
2002        a: *const CoglQuaternion,
2003        b: *const CoglQuaternion,
2004        next: *const CoglQuaternion,
2005        t: c_float,
2006    );
2007    pub fn cogl_quaternion_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
2008
2009    //=========================================================================
2010    // CoglAtlasTexture
2011    //=========================================================================
2012    pub fn cogl_atlas_texture_get_gtype() -> GType;
2013    pub fn cogl_atlas_texture_new_from_bitmap(bmp: *mut CoglBitmap) -> *mut CoglAtlasTexture;
2014    pub fn cogl_atlas_texture_new_from_data(
2015        ctx: *mut CoglContext,
2016        width: c_int,
2017        height: c_int,
2018        format: CoglPixelFormat,
2019        rowstride: c_int,
2020        data: *const u8,
2021        error: *mut *mut glib::GError,
2022    ) -> *mut CoglAtlasTexture;
2023    pub fn cogl_atlas_texture_new_from_file(
2024        ctx: *mut CoglContext,
2025        filename: *const c_char,
2026        error: *mut *mut glib::GError,
2027    ) -> *mut CoglAtlasTexture;
2028    pub fn cogl_atlas_texture_new_with_size(
2029        ctx: *mut CoglContext,
2030        width: c_int,
2031        height: c_int,
2032    ) -> *mut CoglAtlasTexture;
2033
2034    //=========================================================================
2035    // CoglAttribute
2036    //=========================================================================
2037    pub fn cogl_attribute_get_gtype() -> GType;
2038    pub fn cogl_attribute_new(
2039        attribute_buffer: *mut CoglAttributeBuffer,
2040        name: *const c_char,
2041        stride: size_t,
2042        offset: size_t,
2043        components: c_int,
2044        type_: CoglAttributeType,
2045    ) -> *mut CoglAttribute;
2046    pub fn cogl_attribute_new_const_1f(
2047        context: *mut CoglContext,
2048        name: *const c_char,
2049        value: c_float,
2050    ) -> *mut CoglAttribute;
2051    pub fn cogl_attribute_new_const_2f(
2052        context: *mut CoglContext,
2053        name: *const c_char,
2054        component0: c_float,
2055        component1: c_float,
2056    ) -> *mut CoglAttribute;
2057    pub fn cogl_attribute_new_const_2fv(
2058        context: *mut CoglContext,
2059        name: *const c_char,
2060        value: *const c_float,
2061    ) -> *mut CoglAttribute;
2062    pub fn cogl_attribute_new_const_2x2fv(
2063        context: *mut CoglContext,
2064        name: *const c_char,
2065        matrix2x2: *const c_float,
2066        transpose: CoglBool,
2067    ) -> *mut CoglAttribute;
2068    pub fn cogl_attribute_new_const_3f(
2069        context: *mut CoglContext,
2070        name: *const c_char,
2071        component0: c_float,
2072        component1: c_float,
2073        component2: c_float,
2074    ) -> *mut CoglAttribute;
2075    pub fn cogl_attribute_new_const_3fv(
2076        context: *mut CoglContext,
2077        name: *const c_char,
2078        value: *const c_float,
2079    ) -> *mut CoglAttribute;
2080    pub fn cogl_attribute_new_const_3x3fv(
2081        context: *mut CoglContext,
2082        name: *const c_char,
2083        matrix3x3: *const c_float,
2084        transpose: CoglBool,
2085    ) -> *mut CoglAttribute;
2086    pub fn cogl_attribute_new_const_4f(
2087        context: *mut CoglContext,
2088        name: *const c_char,
2089        component0: c_float,
2090        component1: c_float,
2091        component2: c_float,
2092        component3: c_float,
2093    ) -> *mut CoglAttribute;
2094    pub fn cogl_attribute_new_const_4fv(
2095        context: *mut CoglContext,
2096        name: *const c_char,
2097        value: *const c_float,
2098    ) -> *mut CoglAttribute;
2099    pub fn cogl_attribute_new_const_4x4fv(
2100        context: *mut CoglContext,
2101        name: *const c_char,
2102        matrix4x4: *const c_float,
2103        transpose: CoglBool,
2104    ) -> *mut CoglAttribute;
2105    pub fn cogl_attribute_get_buffer(attribute: *mut CoglAttribute) -> *mut CoglAttributeBuffer;
2106    pub fn cogl_attribute_get_normalized(attribute: *mut CoglAttribute) -> CoglBool;
2107    pub fn cogl_attribute_set_buffer(
2108        attribute: *mut CoglAttribute,
2109        attribute_buffer: *mut CoglAttributeBuffer,
2110    );
2111    pub fn cogl_attribute_set_normalized(attribute: *mut CoglAttribute, normalized: CoglBool);
2112
2113    //=========================================================================
2114    // CoglAttributeBuffer
2115    //=========================================================================
2116    pub fn cogl_attribute_buffer_get_gtype() -> GType;
2117    pub fn cogl_attribute_buffer_new(
2118        context: *mut CoglContext,
2119        bytes: size_t,
2120        data: *mut c_void,
2121    ) -> *mut CoglAttributeBuffer;
2122    pub fn cogl_attribute_buffer_new_with_size(
2123        context: *mut CoglContext,
2124        bytes: size_t,
2125    ) -> *mut CoglAttributeBuffer;
2126
2127    //=========================================================================
2128    // CoglBitmap
2129    //=========================================================================
2130    pub fn cogl_bitmap_get_gtype() -> GType;
2131    pub fn cogl_bitmap_new_for_data(
2132        context: *mut CoglContext,
2133        width: c_int,
2134        height: c_int,
2135        format: CoglPixelFormat,
2136        rowstride: c_int,
2137        data: *mut u8,
2138    ) -> *mut CoglBitmap;
2139    pub fn cogl_bitmap_new_from_buffer(
2140        buffer: *mut CoglBuffer,
2141        format: CoglPixelFormat,
2142        width: c_int,
2143        height: c_int,
2144        rowstride: c_int,
2145        offset: c_int,
2146    ) -> *mut CoglBitmap;
2147    pub fn cogl_bitmap_new_from_file(
2148        filename: *const c_char,
2149        error: *mut *mut glib::GError,
2150    ) -> *mut CoglBitmap;
2151    pub fn cogl_bitmap_new_with_size(
2152        context: *mut CoglContext,
2153        width: c_uint,
2154        height: c_uint,
2155        format: CoglPixelFormat,
2156    ) -> *mut CoglBitmap;
2157    pub fn cogl_bitmap_get_size_from_file(
2158        filename: *const c_char,
2159        width: *mut c_int,
2160        height: *mut c_int,
2161    ) -> CoglBool;
2162    pub fn cogl_bitmap_get_buffer(bitmap: *mut CoglBitmap) -> *mut CoglPixelBuffer;
2163    pub fn cogl_bitmap_get_format(bitmap: *mut CoglBitmap) -> CoglPixelFormat;
2164    pub fn cogl_bitmap_get_height(bitmap: *mut CoglBitmap) -> c_int;
2165    pub fn cogl_bitmap_get_rowstride(bitmap: *mut CoglBitmap) -> c_int;
2166    pub fn cogl_bitmap_get_width(bitmap: *mut CoglBitmap) -> c_int;
2167
2168    //=========================================================================
2169    // CoglContext
2170    //=========================================================================
2171    pub fn cogl_context_get_gtype() -> GType;
2172    pub fn cogl_context_new(
2173        display: *mut CoglDisplay,
2174        error: *mut *mut glib::GError,
2175    ) -> *mut CoglContext;
2176    pub fn cogl_context_get_display(context: *mut CoglContext) -> *mut CoglDisplay;
2177    pub fn cogl_context_get_renderer(context: *mut CoglContext) -> *mut CoglRenderer;
2178
2179    //=========================================================================
2180    // CoglDisplay
2181    //=========================================================================
2182    pub fn cogl_display_get_gtype() -> GType;
2183    pub fn cogl_display_new(
2184        renderer: *mut CoglRenderer,
2185        onscreen_template: *mut CoglOnscreenTemplate,
2186    ) -> *mut CoglDisplay;
2187    pub fn cogl_display_get_renderer(display: *mut CoglDisplay) -> *mut CoglRenderer;
2188    pub fn cogl_display_set_onscreen_template(
2189        display: *mut CoglDisplay,
2190        onscreen_template: *mut CoglOnscreenTemplate,
2191    );
2192    pub fn cogl_display_setup(display: *mut CoglDisplay, error: *mut *mut glib::GError)
2193        -> CoglBool;
2194
2195    //=========================================================================
2196    // CoglFixed
2197    //=========================================================================
2198    pub fn cogl_fixed_get_type() -> GType;
2199    pub fn cogl_fixed_log2(x: c_uint) -> CoglFixed;
2200    pub fn cogl_fixed_pow(x: c_uint, y: CoglFixed) -> c_uint;
2201    pub fn cogl_fixed_atan(a: CoglFixed) -> CoglFixed;
2202    pub fn cogl_fixed_atan2(a: CoglFixed, b: CoglFixed) -> CoglFixed;
2203    pub fn cogl_fixed_cos(angle: CoglFixed) -> CoglFixed;
2204    pub fn cogl_fixed_pow2(x: CoglFixed) -> c_uint;
2205    pub fn cogl_fixed_sin(angle: CoglFixed) -> CoglFixed;
2206    pub fn cogl_fixed_sqrt(x: CoglFixed) -> CoglFixed;
2207    pub fn cogl_fixed_tan(angle: CoglFixed) -> CoglFixed;
2208
2209    //=========================================================================
2210    // CoglFrameInfo
2211    //=========================================================================
2212    pub fn cogl_frame_info_get_gtype() -> GType;
2213    pub fn cogl_frame_info_get_frame_counter(info: *mut CoglFrameInfo) -> i64;
2214    pub fn cogl_frame_info_get_output(info: *mut CoglFrameInfo) -> *mut CoglOutput;
2215    pub fn cogl_frame_info_get_presentation_time(info: *mut CoglFrameInfo) -> i64;
2216    pub fn cogl_frame_info_get_refresh_rate(info: *mut CoglFrameInfo) -> c_float;
2217
2218    //=========================================================================
2219    // CoglGLES2Context
2220    //=========================================================================
2221    pub fn cogl_gles2_context_get_gtype() -> GType;
2222    pub fn cogl_gles2_context_new(
2223        ctx: *mut CoglContext,
2224        error: *mut *mut glib::GError,
2225    ) -> *mut CoglGLES2Context;
2226    //pub fn cogl_gles2_context_get_vtable(gles2_ctx: *mut CoglGLES2Context) -> /*Ignored*/*const CoglGLES2Vtable;
2227
2228    //=========================================================================
2229    // CoglIndexBuffer
2230    //=========================================================================
2231    pub fn cogl_index_buffer_get_gtype() -> GType;
2232    pub fn cogl_index_buffer_new(context: *mut CoglContext, bytes: size_t) -> *mut CoglIndexBuffer;
2233
2234    //=========================================================================
2235    // CoglIndices
2236    //=========================================================================
2237    pub fn cogl_indices_get_gtype() -> GType;
2238    pub fn cogl_indices_new(
2239        context: *mut CoglContext,
2240        type_: CoglIndicesType,
2241        indices_data: *mut c_void,
2242        n_indices: c_int,
2243    ) -> *mut CoglIndices;
2244    pub fn cogl_indices_new_for_buffer(
2245        type_: CoglIndicesType,
2246        buffer: *mut CoglIndexBuffer,
2247        offset: size_t,
2248    ) -> *mut CoglIndices;
2249    pub fn cogl_indices_get_buffer(indices: *mut CoglIndices) -> *mut CoglIndexBuffer;
2250    pub fn cogl_indices_get_offset(indices: *mut CoglIndices) -> size_t;
2251    pub fn cogl_indices_get_type(indices: *mut CoglIndices) -> CoglIndicesType;
2252    pub fn cogl_indices_set_offset(indices: *mut CoglIndices, offset: size_t);
2253
2254    //=========================================================================
2255    // CoglMatrixStack
2256    //=========================================================================
2257    pub fn cogl_matrix_stack_get_gtype() -> GType;
2258    pub fn cogl_matrix_stack_new(ctx: *mut CoglContext) -> *mut CoglMatrixStack;
2259    pub fn cogl_matrix_stack_frustum(
2260        stack: *mut CoglMatrixStack,
2261        left: c_float,
2262        right: c_float,
2263        bottom: c_float,
2264        top: c_float,
2265        z_near: c_float,
2266        z_far: c_float,
2267    );
2268    pub fn cogl_matrix_stack_get(
2269        stack: *mut CoglMatrixStack,
2270        matrix: *mut CoglMatrix,
2271    ) -> *mut CoglMatrix;
2272    pub fn cogl_matrix_stack_get_entry(stack: *mut CoglMatrixStack) -> *mut CoglMatrixEntry;
2273    pub fn cogl_matrix_stack_get_inverse(
2274        stack: *mut CoglMatrixStack,
2275        inverse: *mut CoglMatrix,
2276    ) -> CoglBool;
2277    pub fn cogl_matrix_stack_load_identity(stack: *mut CoglMatrixStack);
2278    pub fn cogl_matrix_stack_multiply(stack: *mut CoglMatrixStack, matrix: *const CoglMatrix);
2279    pub fn cogl_matrix_stack_orthographic(
2280        stack: *mut CoglMatrixStack,
2281        x_1: c_float,
2282        y_1: c_float,
2283        x_2: c_float,
2284        y_2: c_float,
2285        near: c_float,
2286        far: c_float,
2287    );
2288    pub fn cogl_matrix_stack_perspective(
2289        stack: *mut CoglMatrixStack,
2290        fov_y: c_float,
2291        aspect: c_float,
2292        z_near: c_float,
2293        z_far: c_float,
2294    );
2295    pub fn cogl_matrix_stack_pop(stack: *mut CoglMatrixStack);
2296    pub fn cogl_matrix_stack_push(stack: *mut CoglMatrixStack);
2297    pub fn cogl_matrix_stack_rotate(
2298        stack: *mut CoglMatrixStack,
2299        angle: c_float,
2300        x: c_float,
2301        y: c_float,
2302        z: c_float,
2303    );
2304    pub fn cogl_matrix_stack_rotate_euler(stack: *mut CoglMatrixStack, euler: *const CoglEuler);
2305    pub fn cogl_matrix_stack_rotate_quaternion(
2306        stack: *mut CoglMatrixStack,
2307        quaternion: *const CoglQuaternion,
2308    );
2309    pub fn cogl_matrix_stack_scale(stack: *mut CoglMatrixStack, x: c_float, y: c_float, z: c_float);
2310    pub fn cogl_matrix_stack_set(stack: *mut CoglMatrixStack, matrix: *const CoglMatrix);
2311    pub fn cogl_matrix_stack_translate(
2312        stack: *mut CoglMatrixStack,
2313        x: c_float,
2314        y: c_float,
2315        z: c_float,
2316    );
2317
2318    //=========================================================================
2319    // CoglObject
2320    //=========================================================================
2321    pub fn cogl_object_get_gtype() -> GType;
2322    pub fn cogl_object_ref(object: *mut c_void) -> *mut c_void;
2323    pub fn cogl_object_unref(object: *mut c_void);
2324    pub fn cogl_object_value_get_object(value: *const gobject::GValue) -> gpointer;
2325    pub fn cogl_object_value_set_object(value: *mut gobject::GValue, object: gpointer);
2326    pub fn cogl_object_get_user_data(
2327        object: *mut CoglObject,
2328        key: *mut CoglUserDataKey,
2329    ) -> *mut c_void;
2330    pub fn cogl_object_set_user_data(
2331        object: *mut CoglObject,
2332        key: *mut CoglUserDataKey,
2333        user_data: *mut c_void,
2334        destroy: CoglUserDataDestroyCallback,
2335    );
2336
2337    //=========================================================================
2338    // CoglOffscreen
2339    //=========================================================================
2340    pub fn cogl_offscreen_get_gtype() -> GType;
2341    pub fn cogl_offscreen_new_to_texture(texture: *mut CoglTexture) -> *mut CoglOffscreen;
2342    pub fn cogl_offscreen_new_with_texture(texture: *mut CoglTexture) -> *mut CoglOffscreen;
2343    pub fn cogl_offscreen_ref(offscreen: *mut c_void) -> *mut c_void;
2344    pub fn cogl_offscreen_unref(offscreen: *mut c_void);
2345
2346    //=========================================================================
2347    // CoglOnscreen
2348    //=========================================================================
2349    pub fn cogl_onscreen_get_gtype() -> GType;
2350    pub fn cogl_onscreen_new(
2351        context: *mut CoglContext,
2352        width: c_int,
2353        height: c_int,
2354    ) -> *mut CoglOnscreen;
2355    pub fn cogl_onscreen_add_dirty_callback(
2356        onscreen: *mut CoglOnscreen,
2357        callback: CoglOnscreenDirtyCallback,
2358        user_data: *mut c_void,
2359        destroy: CoglUserDataDestroyCallback,
2360    ) -> *mut CoglOnscreenDirtyClosure;
2361    pub fn cogl_onscreen_add_frame_callback(
2362        onscreen: *mut CoglOnscreen,
2363        callback: CoglFrameCallback,
2364        user_data: *mut c_void,
2365        destroy: CoglUserDataDestroyCallback,
2366    ) -> *mut CoglFrameClosure;
2367    pub fn cogl_onscreen_add_resize_callback(
2368        onscreen: *mut CoglOnscreen,
2369        callback: CoglOnscreenResizeCallback,
2370        user_data: *mut c_void,
2371        destroy: CoglUserDataDestroyCallback,
2372    ) -> *mut CoglOnscreenResizeClosure;
2373    pub fn cogl_onscreen_add_swap_buffers_callback(
2374        onscreen: *mut CoglOnscreen,
2375        callback: CoglSwapBuffersNotify,
2376        user_data: *mut c_void,
2377    ) -> c_uint;
2378    pub fn cogl_onscreen_get_buffer_age(onscreen: *mut CoglOnscreen) -> c_int;
2379    pub fn cogl_onscreen_get_frame_counter(onscreen: *mut CoglOnscreen) -> i64;
2380    pub fn cogl_onscreen_get_resizable(onscreen: *mut CoglOnscreen) -> CoglBool;
2381    pub fn cogl_onscreen_hide(onscreen: *mut CoglOnscreen);
2382    pub fn cogl_onscreen_remove_dirty_callback(
2383        onscreen: *mut CoglOnscreen,
2384        closure: *mut CoglOnscreenDirtyClosure,
2385    );
2386    pub fn cogl_onscreen_remove_frame_callback(
2387        onscreen: *mut CoglOnscreen,
2388        closure: *mut CoglFrameClosure,
2389    );
2390    pub fn cogl_onscreen_remove_resize_callback(
2391        onscreen: *mut CoglOnscreen,
2392        closure: *mut CoglOnscreenResizeClosure,
2393    );
2394    pub fn cogl_onscreen_remove_swap_buffers_callback(onscreen: *mut CoglOnscreen, id: c_uint);
2395    pub fn cogl_onscreen_set_resizable(onscreen: *mut CoglOnscreen, resizable: CoglBool);
2396    pub fn cogl_onscreen_set_swap_throttled(onscreen: *mut CoglOnscreen, throttled: CoglBool);
2397    pub fn cogl_onscreen_show(onscreen: *mut CoglOnscreen);
2398    pub fn cogl_onscreen_swap_buffers(onscreen: *mut CoglOnscreen);
2399    pub fn cogl_onscreen_swap_buffers_with_damage(
2400        onscreen: *mut CoglOnscreen,
2401        rectangles: *const c_int,
2402        n_rectangles: c_int,
2403    );
2404    pub fn cogl_onscreen_swap_region(
2405        onscreen: *mut CoglOnscreen,
2406        rectangles: *const c_int,
2407        n_rectangles: c_int,
2408    );
2409
2410    //=========================================================================
2411    // CoglOnscreenTemplate
2412    //=========================================================================
2413    pub fn cogl_onscreen_template_get_gtype() -> GType;
2414    pub fn cogl_onscreen_template_new(swap_chain: *mut CoglSwapChain) -> *mut CoglOnscreenTemplate;
2415    pub fn cogl_onscreen_template_set_samples_per_pixel(
2416        onscreen_template: *mut CoglOnscreenTemplate,
2417        n: c_int,
2418    );
2419    pub fn cogl_onscreen_template_set_stereo_enabled(
2420        onscreen_template: *mut CoglOnscreenTemplate,
2421        enabled: CoglBool,
2422    );
2423    pub fn cogl_onscreen_template_set_swap_throttled(
2424        onscreen_template: *mut CoglOnscreenTemplate,
2425        throttled: CoglBool,
2426    );
2427
2428    //=========================================================================
2429    // CoglOutput
2430    //=========================================================================
2431    pub fn cogl_output_get_gtype() -> GType;
2432    pub fn cogl_output_get_height(output: *mut CoglOutput) -> c_int;
2433    pub fn cogl_output_get_mm_height(output: *mut CoglOutput) -> c_int;
2434    pub fn cogl_output_get_mm_width(output: *mut CoglOutput) -> c_int;
2435    pub fn cogl_output_get_refresh_rate(output: *mut CoglOutput) -> c_float;
2436    pub fn cogl_output_get_subpixel_order(output: *mut CoglOutput) -> CoglSubpixelOrder;
2437    pub fn cogl_output_get_width(output: *mut CoglOutput) -> c_int;
2438    pub fn cogl_output_get_x(output: *mut CoglOutput) -> c_int;
2439    pub fn cogl_output_get_y(output: *mut CoglOutput) -> c_int;
2440
2441    //=========================================================================
2442    // CoglPipeline
2443    //=========================================================================
2444    pub fn cogl_pipeline_get_gtype() -> GType;
2445    pub fn cogl_pipeline_new(context: *mut CoglContext) -> *mut CoglPipeline;
2446    pub fn cogl_pipeline_add_layer_snippet(
2447        pipeline: *mut CoglPipeline,
2448        layer: c_int,
2449        snippet: *mut CoglSnippet,
2450    );
2451    pub fn cogl_pipeline_add_snippet(pipeline: *mut CoglPipeline, snippet: *mut CoglSnippet);
2452    pub fn cogl_pipeline_copy(source: *mut CoglPipeline) -> *mut CoglPipeline;
2453    pub fn cogl_pipeline_foreach_layer(
2454        pipeline: *mut CoglPipeline,
2455        callback: CoglPipelineLayerCallback,
2456        user_data: *mut c_void,
2457    );
2458    pub fn cogl_pipeline_get_alpha_test_function(
2459        pipeline: *mut CoglPipeline,
2460    ) -> CoglPipelineAlphaFunc;
2461    pub fn cogl_pipeline_get_alpha_test_reference(pipeline: *mut CoglPipeline) -> c_float;
2462    pub fn cogl_pipeline_get_ambient(pipeline: *mut CoglPipeline, ambient: *mut CoglColor);
2463    pub fn cogl_pipeline_get_color(pipeline: *mut CoglPipeline, color: *mut CoglColor);
2464    pub fn cogl_pipeline_get_color_mask(pipeline: *mut CoglPipeline) -> CoglColorMask;
2465    pub fn cogl_pipeline_get_cull_face_mode(
2466        pipeline: *mut CoglPipeline,
2467    ) -> CoglPipelineCullFaceMode;
2468    pub fn cogl_pipeline_get_depth_state(
2469        pipeline: *mut CoglPipeline,
2470        state_out: *mut CoglDepthState,
2471    );
2472    pub fn cogl_pipeline_get_diffuse(pipeline: *mut CoglPipeline, diffuse: *mut CoglColor);
2473    pub fn cogl_pipeline_get_emission(pipeline: *mut CoglPipeline, emission: *mut CoglColor);
2474    pub fn cogl_pipeline_get_front_face_winding(pipeline: *mut CoglPipeline) -> CoglWinding;
2475    pub fn cogl_pipeline_get_layer_mag_filter(
2476        pipeline: *mut CoglPipeline,
2477        layer_index: c_int,
2478    ) -> CoglPipelineFilter;
2479    pub fn cogl_pipeline_get_layer_min_filter(
2480        pipeline: *mut CoglPipeline,
2481        layer_index: c_int,
2482    ) -> CoglPipelineFilter;
2483    pub fn cogl_pipeline_get_layer_point_sprite_coords_enabled(
2484        pipeline: *mut CoglPipeline,
2485        layer_index: c_int,
2486    ) -> CoglBool;
2487    pub fn cogl_pipeline_get_layer_texture(
2488        pipeline: *mut CoglPipeline,
2489        layer_index: c_int,
2490    ) -> *mut CoglTexture;
2491    pub fn cogl_pipeline_get_layer_wrap_mode_p(
2492        pipeline: *mut CoglPipeline,
2493        layer_index: c_int,
2494    ) -> CoglPipelineWrapMode;
2495    pub fn cogl_pipeline_get_layer_wrap_mode_s(
2496        pipeline: *mut CoglPipeline,
2497        layer_index: c_int,
2498    ) -> CoglPipelineWrapMode;
2499    pub fn cogl_pipeline_get_layer_wrap_mode_t(
2500        pipeline: *mut CoglPipeline,
2501        layer_index: c_int,
2502    ) -> CoglPipelineWrapMode;
2503    pub fn cogl_pipeline_get_n_layers(pipeline: *mut CoglPipeline) -> c_int;
2504    pub fn cogl_pipeline_get_per_vertex_point_size(pipeline: *mut CoglPipeline) -> CoglBool;
2505    pub fn cogl_pipeline_get_point_size(pipeline: *mut CoglPipeline) -> c_float;
2506    pub fn cogl_pipeline_get_shininess(pipeline: *mut CoglPipeline) -> c_float;
2507    pub fn cogl_pipeline_get_specular(pipeline: *mut CoglPipeline, specular: *mut CoglColor);
2508    pub fn cogl_pipeline_get_uniform_location(
2509        pipeline: *mut CoglPipeline,
2510        uniform_name: *const c_char,
2511    ) -> c_int;
2512    pub fn cogl_pipeline_get_user_program(pipeline: *mut CoglPipeline) -> CoglHandle;
2513    pub fn cogl_pipeline_remove_layer(pipeline: *mut CoglPipeline, layer_index: c_int);
2514    pub fn cogl_pipeline_set_alpha_test_function(
2515        pipeline: *mut CoglPipeline,
2516        alpha_func: CoglPipelineAlphaFunc,
2517        alpha_reference: c_float,
2518    );
2519    pub fn cogl_pipeline_set_ambient(pipeline: *mut CoglPipeline, ambient: *const CoglColor);
2520    pub fn cogl_pipeline_set_ambient_and_diffuse(
2521        pipeline: *mut CoglPipeline,
2522        color: *const CoglColor,
2523    );
2524    pub fn cogl_pipeline_set_blend(
2525        pipeline: *mut CoglPipeline,
2526        blend_string: *const c_char,
2527        error: *mut *mut glib::GError,
2528    ) -> CoglBool;
2529    pub fn cogl_pipeline_set_blend_constant(
2530        pipeline: *mut CoglPipeline,
2531        constant_color: *const CoglColor,
2532    );
2533    pub fn cogl_pipeline_set_color(pipeline: *mut CoglPipeline, color: *const CoglColor);
2534    pub fn cogl_pipeline_set_color4f(
2535        pipeline: *mut CoglPipeline,
2536        red: c_float,
2537        green: c_float,
2538        blue: c_float,
2539        alpha: c_float,
2540    );
2541    pub fn cogl_pipeline_set_color4ub(
2542        pipeline: *mut CoglPipeline,
2543        red: u8,
2544        green: u8,
2545        blue: u8,
2546        alpha: u8,
2547    );
2548    pub fn cogl_pipeline_set_color_mask(pipeline: *mut CoglPipeline, color_mask: CoglColorMask);
2549    pub fn cogl_pipeline_set_cull_face_mode(
2550        pipeline: *mut CoglPipeline,
2551        cull_face_mode: CoglPipelineCullFaceMode,
2552    );
2553    pub fn cogl_pipeline_set_depth_state(
2554        pipeline: *mut CoglPipeline,
2555        state: *const CoglDepthState,
2556        error: *mut *mut glib::GError,
2557    ) -> CoglBool;
2558    pub fn cogl_pipeline_set_diffuse(pipeline: *mut CoglPipeline, diffuse: *const CoglColor);
2559    pub fn cogl_pipeline_set_emission(pipeline: *mut CoglPipeline, emission: *const CoglColor);
2560    pub fn cogl_pipeline_set_front_face_winding(
2561        pipeline: *mut CoglPipeline,
2562        front_winding: CoglWinding,
2563    );
2564    pub fn cogl_pipeline_set_layer_combine(
2565        pipeline: *mut CoglPipeline,
2566        layer_index: c_int,
2567        blend_string: *const c_char,
2568        error: *mut *mut glib::GError,
2569    ) -> CoglBool;
2570    pub fn cogl_pipeline_set_layer_combine_constant(
2571        pipeline: *mut CoglPipeline,
2572        layer_index: c_int,
2573        constant: *const CoglColor,
2574    );
2575    pub fn cogl_pipeline_set_layer_filters(
2576        pipeline: *mut CoglPipeline,
2577        layer_index: c_int,
2578        min_filter: CoglPipelineFilter,
2579        mag_filter: CoglPipelineFilter,
2580    );
2581    pub fn cogl_pipeline_set_layer_matrix(
2582        pipeline: *mut CoglPipeline,
2583        layer_index: c_int,
2584        matrix: *const CoglMatrix,
2585    );
2586    pub fn cogl_pipeline_set_layer_null_texture(
2587        pipeline: *mut CoglPipeline,
2588        layer_index: c_int,
2589        texture_type: CoglTextureType,
2590    );
2591    pub fn cogl_pipeline_set_layer_point_sprite_coords_enabled(
2592        pipeline: *mut CoglPipeline,
2593        layer_index: c_int,
2594        enable: CoglBool,
2595        error: *mut *mut glib::GError,
2596    ) -> CoglBool;
2597    pub fn cogl_pipeline_set_layer_texture(
2598        pipeline: *mut CoglPipeline,
2599        layer_index: c_int,
2600        texture: *mut CoglTexture,
2601    );
2602    pub fn cogl_pipeline_set_layer_wrap_mode(
2603        pipeline: *mut CoglPipeline,
2604        layer_index: c_int,
2605        mode: CoglPipelineWrapMode,
2606    );
2607    pub fn cogl_pipeline_set_layer_wrap_mode_p(
2608        pipeline: *mut CoglPipeline,
2609        layer_index: c_int,
2610        mode: CoglPipelineWrapMode,
2611    );
2612    pub fn cogl_pipeline_set_layer_wrap_mode_s(
2613        pipeline: *mut CoglPipeline,
2614        layer_index: c_int,
2615        mode: CoglPipelineWrapMode,
2616    );
2617    pub fn cogl_pipeline_set_layer_wrap_mode_t(
2618        pipeline: *mut CoglPipeline,
2619        layer_index: c_int,
2620        mode: CoglPipelineWrapMode,
2621    );
2622    pub fn cogl_pipeline_set_per_vertex_point_size(
2623        pipeline: *mut CoglPipeline,
2624        enable: CoglBool,
2625        error: *mut *mut glib::GError,
2626    ) -> CoglBool;
2627    pub fn cogl_pipeline_set_point_size(pipeline: *mut CoglPipeline, point_size: c_float);
2628    pub fn cogl_pipeline_set_shininess(pipeline: *mut CoglPipeline, shininess: c_float);
2629    pub fn cogl_pipeline_set_specular(pipeline: *mut CoglPipeline, specular: *const CoglColor);
2630    pub fn cogl_pipeline_set_uniform_1f(
2631        pipeline: *mut CoglPipeline,
2632        uniform_location: c_int,
2633        value: c_float,
2634    );
2635    pub fn cogl_pipeline_set_uniform_1i(
2636        pipeline: *mut CoglPipeline,
2637        uniform_location: c_int,
2638        value: c_int,
2639    );
2640    pub fn cogl_pipeline_set_uniform_float(
2641        pipeline: *mut CoglPipeline,
2642        uniform_location: c_int,
2643        n_components: c_int,
2644        count: c_int,
2645        value: *const c_float,
2646    );
2647    pub fn cogl_pipeline_set_uniform_int(
2648        pipeline: *mut CoglPipeline,
2649        uniform_location: c_int,
2650        n_components: c_int,
2651        count: c_int,
2652        value: *const c_int,
2653    );
2654    pub fn cogl_pipeline_set_uniform_matrix(
2655        pipeline: *mut CoglPipeline,
2656        uniform_location: c_int,
2657        dimensions: c_int,
2658        count: c_int,
2659        transpose: CoglBool,
2660        value: *const c_float,
2661    );
2662    pub fn cogl_pipeline_set_user_program(pipeline: *mut CoglPipeline, program: CoglHandle);
2663
2664    //=========================================================================
2665    // CoglPixelBuffer
2666    //=========================================================================
2667    pub fn cogl_pixel_buffer_get_gtype() -> GType;
2668    pub fn cogl_pixel_buffer_new(
2669        context: *mut CoglContext,
2670        size: size_t,
2671        data: *mut c_void,
2672    ) -> *mut CoglPixelBuffer;
2673
2674    //=========================================================================
2675    // CoglPrimitive
2676    //=========================================================================
2677    pub fn cogl_primitive_get_gtype() -> GType;
2678    pub fn cogl_primitive_new(mode: CoglVerticesMode, n_vertices: c_int, ...)
2679        -> *mut CoglPrimitive;
2680    pub fn cogl_primitive_new_p2(
2681        context: *mut CoglContext,
2682        mode: CoglVerticesMode,
2683        n_vertices: c_int,
2684        data: *const CoglVertexP2,
2685    ) -> *mut CoglPrimitive;
2686    pub fn cogl_primitive_new_p2c4(
2687        context: *mut CoglContext,
2688        mode: CoglVerticesMode,
2689        n_vertices: c_int,
2690        data: *const CoglVertexP2C4,
2691    ) -> *mut CoglPrimitive;
2692    pub fn cogl_primitive_new_p2t2(
2693        context: *mut CoglContext,
2694        mode: CoglVerticesMode,
2695        n_vertices: c_int,
2696        data: *const CoglVertexP2T2,
2697    ) -> *mut CoglPrimitive;
2698    pub fn cogl_primitive_new_p2t2c4(
2699        context: *mut CoglContext,
2700        mode: CoglVerticesMode,
2701        n_vertices: c_int,
2702        data: *const CoglVertexP2T2C4,
2703    ) -> *mut CoglPrimitive;
2704    pub fn cogl_primitive_new_p3(
2705        context: *mut CoglContext,
2706        mode: CoglVerticesMode,
2707        n_vertices: c_int,
2708        data: *const CoglVertexP3,
2709    ) -> *mut CoglPrimitive;
2710    pub fn cogl_primitive_new_p3c4(
2711        context: *mut CoglContext,
2712        mode: CoglVerticesMode,
2713        n_vertices: c_int,
2714        data: *const CoglVertexP3C4,
2715    ) -> *mut CoglPrimitive;
2716    pub fn cogl_primitive_new_p3t2(
2717        context: *mut CoglContext,
2718        mode: CoglVerticesMode,
2719        n_vertices: c_int,
2720        data: *const CoglVertexP3T2,
2721    ) -> *mut CoglPrimitive;
2722    pub fn cogl_primitive_new_p3t2c4(
2723        context: *mut CoglContext,
2724        mode: CoglVerticesMode,
2725        n_vertices: c_int,
2726        data: *const CoglVertexP3T2C4,
2727    ) -> *mut CoglPrimitive;
2728    pub fn cogl_primitive_new_with_attributes(
2729        mode: CoglVerticesMode,
2730        n_vertices: c_int,
2731        attributes: *mut *mut CoglAttribute,
2732        n_attributes: c_int,
2733    ) -> *mut CoglPrimitive;
2734    pub fn cogl_primitive_texture_set_auto_mipmap(
2735        primitive_texture: *mut CoglPrimitiveTexture,
2736        value: CoglBool,
2737    );
2738    pub fn cogl_primitive_copy(primitive: *mut CoglPrimitive) -> *mut CoglPrimitive;
2739    pub fn cogl_primitive_draw(
2740        primitive: *mut CoglPrimitive,
2741        framebuffer: *mut CoglFramebuffer,
2742        pipeline: *mut CoglPipeline,
2743    );
2744    pub fn cogl_primitive_foreach_attribute(
2745        primitive: *mut CoglPrimitive,
2746        callback: CoglPrimitiveAttributeCallback,
2747        user_data: *mut c_void,
2748    );
2749    pub fn cogl_primitive_get_first_vertex(primitive: *mut CoglPrimitive) -> c_int;
2750    pub fn cogl_primitive_get_indices(primitive: *mut CoglPrimitive) -> *mut CoglIndices;
2751    pub fn cogl_primitive_get_mode(primitive: *mut CoglPrimitive) -> CoglVerticesMode;
2752    pub fn cogl_primitive_get_n_vertices(primitive: *mut CoglPrimitive) -> c_int;
2753    pub fn cogl_primitive_set_attributes(
2754        primitive: *mut CoglPrimitive,
2755        attributes: *mut *mut CoglAttribute,
2756        n_attributes: c_int,
2757    );
2758    pub fn cogl_primitive_set_first_vertex(primitive: *mut CoglPrimitive, first_vertex: c_int);
2759    pub fn cogl_primitive_set_indices(
2760        primitive: *mut CoglPrimitive,
2761        indices: *mut CoglIndices,
2762        n_indices: c_int,
2763    );
2764    pub fn cogl_primitive_set_mode(primitive: *mut CoglPrimitive, mode: CoglVerticesMode);
2765    pub fn cogl_primitive_set_n_vertices(primitive: *mut CoglPrimitive, n_vertices: c_int);
2766
2767    //=========================================================================
2768    // CoglRenderer
2769    //=========================================================================
2770    pub fn cogl_renderer_get_gtype() -> GType;
2771    pub fn cogl_renderer_new() -> *mut CoglRenderer;
2772    pub fn cogl_renderer_add_constraint(
2773        renderer: *mut CoglRenderer,
2774        constraint: CoglRendererConstraint,
2775    );
2776    pub fn cogl_renderer_check_onscreen_template(
2777        renderer: *mut CoglRenderer,
2778        onscreen_template: *mut CoglOnscreenTemplate,
2779        error: *mut *mut glib::GError,
2780    ) -> CoglBool;
2781    pub fn cogl_renderer_connect(
2782        renderer: *mut CoglRenderer,
2783        error: *mut *mut glib::GError,
2784    ) -> CoglBool;
2785    pub fn cogl_renderer_foreach_output(
2786        renderer: *mut CoglRenderer,
2787        callback: CoglOutputCallback,
2788        user_data: *mut c_void,
2789    );
2790    pub fn cogl_renderer_get_driver(renderer: *mut CoglRenderer) -> CoglDriver;
2791    pub fn cogl_renderer_get_n_fragment_texture_units(renderer: *mut CoglRenderer) -> c_int;
2792    pub fn cogl_renderer_get_winsys_id(renderer: *mut CoglRenderer) -> CoglWinsysID;
2793    pub fn cogl_renderer_remove_constraint(
2794        renderer: *mut CoglRenderer,
2795        constraint: CoglRendererConstraint,
2796    );
2797    pub fn cogl_renderer_set_driver(renderer: *mut CoglRenderer, driver: CoglDriver);
2798    pub fn cogl_renderer_set_winsys_id(renderer: *mut CoglRenderer, winsys_id: CoglWinsysID);
2799
2800    //=========================================================================
2801    // CoglSnippet
2802    //=========================================================================
2803    pub fn cogl_snippet_get_gtype() -> GType;
2804    pub fn cogl_snippet_new(
2805        hook: CoglSnippetHook,
2806        declarations: *const c_char,
2807        post: *const c_char,
2808    ) -> *mut CoglSnippet;
2809    pub fn cogl_snippet_get_declarations(snippet: *mut CoglSnippet) -> *const c_char;
2810    pub fn cogl_snippet_get_hook(snippet: *mut CoglSnippet) -> CoglSnippetHook;
2811    pub fn cogl_snippet_get_post(snippet: *mut CoglSnippet) -> *const c_char;
2812    pub fn cogl_snippet_get_pre(snippet: *mut CoglSnippet) -> *const c_char;
2813    pub fn cogl_snippet_get_replace(snippet: *mut CoglSnippet) -> *const c_char;
2814    pub fn cogl_snippet_set_declarations(snippet: *mut CoglSnippet, declarations: *const c_char);
2815    pub fn cogl_snippet_set_post(snippet: *mut CoglSnippet, post: *const c_char);
2816    pub fn cogl_snippet_set_pre(snippet: *mut CoglSnippet, pre: *const c_char);
2817    pub fn cogl_snippet_set_replace(snippet: *mut CoglSnippet, replace: *const c_char);
2818
2819    //=========================================================================
2820    // CoglSubTexture
2821    //=========================================================================
2822    pub fn cogl_sub_texture_get_gtype() -> GType;
2823    pub fn cogl_sub_texture_new(
2824        ctx: *mut CoglContext,
2825        parent_texture: *mut CoglTexture,
2826        sub_x: c_int,
2827        sub_y: c_int,
2828        sub_width: c_int,
2829        sub_height: c_int,
2830    ) -> *mut CoglSubTexture;
2831    pub fn cogl_sub_texture_get_parent(sub_texture: *mut CoglSubTexture) -> *mut CoglTexture;
2832
2833    //=========================================================================
2834    // CoglSwapChain
2835    //=========================================================================
2836    pub fn cogl_swap_chain_get_gtype() -> GType;
2837    pub fn cogl_swap_chain_new() -> *mut CoglSwapChain;
2838    pub fn cogl_swap_chain_set_has_alpha(swap_chain: *mut CoglSwapChain, has_alpha: CoglBool);
2839    pub fn cogl_swap_chain_set_length(swap_chain: *mut CoglSwapChain, length: c_int);
2840
2841    //=========================================================================
2842    // CoglTexture2D
2843    //=========================================================================
2844    pub fn cogl_texture_2d_get_gtype() -> GType;
2845    pub fn cogl_texture_2d_gl_new_from_foreign(
2846        ctx: *mut CoglContext,
2847        gl_handle: c_uint,
2848        width: c_int,
2849        height: c_int,
2850        format: CoglPixelFormat,
2851    ) -> *mut CoglTexture2D;
2852    pub fn cogl_texture_2d_new_from_bitmap(bitmap: *mut CoglBitmap) -> *mut CoglTexture2D;
2853    pub fn cogl_texture_2d_new_from_data(
2854        ctx: *mut CoglContext,
2855        width: c_int,
2856        height: c_int,
2857        format: CoglPixelFormat,
2858        rowstride: c_int,
2859        data: *const u8,
2860        error: *mut *mut glib::GError,
2861    ) -> *mut CoglTexture2D;
2862    pub fn cogl_texture_2d_new_from_file(
2863        ctx: *mut CoglContext,
2864        filename: *const c_char,
2865        error: *mut *mut glib::GError,
2866    ) -> *mut CoglTexture2D;
2867    pub fn cogl_texture_2d_new_with_size(
2868        ctx: *mut CoglContext,
2869        width: c_int,
2870        height: c_int,
2871    ) -> *mut CoglTexture2D;
2872
2873    //=========================================================================
2874    // CoglTexture2DSliced
2875    //=========================================================================
2876    pub fn cogl_texture_2d_sliced_get_gtype() -> GType;
2877    pub fn cogl_texture_2d_sliced_new_from_bitmap(
2878        bmp: *mut CoglBitmap,
2879        max_waste: c_int,
2880    ) -> *mut CoglTexture2DSliced;
2881    pub fn cogl_texture_2d_sliced_new_from_data(
2882        ctx: *mut CoglContext,
2883        width: c_int,
2884        height: c_int,
2885        max_waste: c_int,
2886        format: CoglPixelFormat,
2887        rowstride: c_int,
2888        data: *const u8,
2889        error: *mut *mut glib::GError,
2890    ) -> *mut CoglTexture2DSliced;
2891    pub fn cogl_texture_2d_sliced_new_from_file(
2892        ctx: *mut CoglContext,
2893        filename: *const c_char,
2894        max_waste: c_int,
2895        error: *mut *mut glib::GError,
2896    ) -> *mut CoglTexture2DSliced;
2897    pub fn cogl_texture_2d_sliced_new_with_size(
2898        ctx: *mut CoglContext,
2899        width: c_int,
2900        height: c_int,
2901        max_waste: c_int,
2902    ) -> *mut CoglTexture2DSliced;
2903
2904    //=========================================================================
2905    // CoglTexture3D
2906    //=========================================================================
2907    pub fn cogl_texture_3d_get_gtype() -> GType;
2908    pub fn cogl_texture_3d_new_from_bitmap(
2909        bitmap: *mut CoglBitmap,
2910        height: c_int,
2911        depth: c_int,
2912    ) -> *mut CoglTexture3D;
2913    pub fn cogl_texture_3d_new_from_data(
2914        context: *mut CoglContext,
2915        width: c_int,
2916        height: c_int,
2917        depth: c_int,
2918        format: CoglPixelFormat,
2919        rowstride: c_int,
2920        image_stride: c_int,
2921        data: *const u8,
2922        error: *mut *mut glib::GError,
2923    ) -> *mut CoglTexture3D;
2924    pub fn cogl_texture_3d_new_with_size(
2925        context: *mut CoglContext,
2926        width: c_int,
2927        height: c_int,
2928        depth: c_int,
2929    ) -> *mut CoglTexture3D;
2930
2931    //=========================================================================
2932    // CoglTexturePixmapX11
2933    //=========================================================================
2934    pub fn cogl_texture_pixmap_x11_get_gtype() -> GType;
2935    pub fn cogl_texture_pixmap_x11_new(
2936        context: *mut CoglContext,
2937        pixmap: u32,
2938        automatic_updates: CoglBool,
2939        error: *mut *mut glib::GError,
2940    ) -> *mut CoglTexturePixmapX11;
2941    pub fn cogl_texture_pixmap_x11_new_left(
2942        context: *mut CoglContext,
2943        pixmap: u32,
2944        automatic_updates: CoglBool,
2945        error: *mut *mut glib::GError,
2946    ) -> *mut CoglTexturePixmapX11;
2947    pub fn cogl_texture_pixmap_x11_error_quark() -> u32;
2948    pub fn cogl_texture_pixmap_x11_is_using_tfp_extension(
2949        texture: *mut CoglTexturePixmapX11,
2950    ) -> CoglBool;
2951    pub fn cogl_texture_pixmap_x11_new_right(
2952        left_texture: *mut CoglTexturePixmapX11,
2953    ) -> *mut CoglTexturePixmapX11;
2954    pub fn cogl_texture_pixmap_x11_set_damage_object(
2955        texture: *mut CoglTexturePixmapX11,
2956        damage: u32,
2957        report_level: CoglTexturePixmapX11ReportLevel,
2958    );
2959    pub fn cogl_texture_pixmap_x11_update_area(
2960        texture: *mut CoglTexturePixmapX11,
2961        x: c_int,
2962        y: c_int,
2963        width: c_int,
2964        height: c_int,
2965    );
2966
2967    //=========================================================================
2968    // CoglTextureRectangle
2969    //=========================================================================
2970    pub fn cogl_texture_rectangle_get_gtype() -> GType;
2971    pub fn cogl_texture_rectangle_new_from_bitmap(
2972        bitmap: *mut CoglBitmap,
2973    ) -> *mut CoglTextureRectangle;
2974    pub fn cogl_texture_rectangle_new_from_foreign(
2975        ctx: *mut CoglContext,
2976        gl_handle: c_uint,
2977        width: c_int,
2978        height: c_int,
2979        format: CoglPixelFormat,
2980    ) -> *mut CoglTextureRectangle;
2981    pub fn cogl_texture_rectangle_new_with_size(
2982        ctx: *mut CoglContext,
2983        width: c_int,
2984        height: c_int,
2985    ) -> *mut CoglTextureRectangle;
2986
2987    //=========================================================================
2988    // CoglFramebuffer
2989    //=========================================================================
2990    pub fn cogl_framebuffer_get_gtype() -> GType;
2991    pub fn cogl_framebuffer_error_quark() -> u32;
2992    pub fn cogl_framebuffer_add_fence_callback(
2993        framebuffer: *mut CoglFramebuffer,
2994        callback: CoglFenceCallback,
2995        user_data: *mut c_void,
2996    ) -> *mut CoglFenceClosure;
2997    pub fn cogl_framebuffer_allocate(
2998        framebuffer: *mut CoglFramebuffer,
2999        error: *mut *mut glib::GError,
3000    ) -> CoglBool;
3001    pub fn cogl_framebuffer_cancel_fence_callback(
3002        framebuffer: *mut CoglFramebuffer,
3003        closure: *mut CoglFenceClosure,
3004    );
3005    pub fn cogl_framebuffer_clear(
3006        framebuffer: *mut CoglFramebuffer,
3007        buffers: c_ulong,
3008        color: *const CoglColor,
3009    );
3010    pub fn cogl_framebuffer_clear4f(
3011        framebuffer: *mut CoglFramebuffer,
3012        buffers: c_ulong,
3013        red: c_float,
3014        green: c_float,
3015        blue: c_float,
3016        alpha: c_float,
3017    );
3018    pub fn cogl_framebuffer_discard_buffers(framebuffer: *mut CoglFramebuffer, buffers: c_ulong);
3019    pub fn cogl_framebuffer_draw_attributes(
3020        framebuffer: *mut CoglFramebuffer,
3021        pipeline: *mut CoglPipeline,
3022        mode: CoglVerticesMode,
3023        first_vertex: c_int,
3024        n_vertices: c_int,
3025        attributes: *mut *mut CoglAttribute,
3026        n_attributes: c_int,
3027    );
3028    pub fn cogl_framebuffer_draw_indexed_attributes(
3029        framebuffer: *mut CoglFramebuffer,
3030        pipeline: *mut CoglPipeline,
3031        mode: CoglVerticesMode,
3032        first_vertex: c_int,
3033        n_vertices: c_int,
3034        indices: *mut CoglIndices,
3035        attributes: *mut *mut CoglAttribute,
3036        n_attributes: c_int,
3037    );
3038    pub fn cogl_framebuffer_draw_multitextured_rectangle(
3039        framebuffer: *mut CoglFramebuffer,
3040        pipeline: *mut CoglPipeline,
3041        x_1: c_float,
3042        y_1: c_float,
3043        x_2: c_float,
3044        y_2: c_float,
3045        tex_coords: *const c_float,
3046        tex_coords_len: c_int,
3047    );
3048    pub fn cogl_framebuffer_draw_primitive(
3049        framebuffer: *mut CoglFramebuffer,
3050        pipeline: *mut CoglPipeline,
3051        primitive: *mut CoglPrimitive,
3052    );
3053    pub fn cogl_framebuffer_draw_rectangle(
3054        framebuffer: *mut CoglFramebuffer,
3055        pipeline: *mut CoglPipeline,
3056        x_1: c_float,
3057        y_1: c_float,
3058        x_2: c_float,
3059        y_2: c_float,
3060    );
3061    pub fn cogl_framebuffer_draw_rectangles(
3062        framebuffer: *mut CoglFramebuffer,
3063        pipeline: *mut CoglPipeline,
3064        coordinates: *const c_float,
3065        n_rectangles: c_uint,
3066    );
3067    pub fn cogl_framebuffer_draw_textured_rectangle(
3068        framebuffer: *mut CoglFramebuffer,
3069        pipeline: *mut CoglPipeline,
3070        x_1: c_float,
3071        y_1: c_float,
3072        x_2: c_float,
3073        y_2: c_float,
3074        s_1: c_float,
3075        t_1: c_float,
3076        s_2: c_float,
3077        t_2: c_float,
3078    );
3079    pub fn cogl_framebuffer_draw_textured_rectangles(
3080        framebuffer: *mut CoglFramebuffer,
3081        pipeline: *mut CoglPipeline,
3082        coordinates: *const c_float,
3083        n_rectangles: c_uint,
3084    );
3085    pub fn cogl_framebuffer_finish(framebuffer: *mut CoglFramebuffer);
3086    pub fn cogl_framebuffer_frustum(
3087        framebuffer: *mut CoglFramebuffer,
3088        left: c_float,
3089        right: c_float,
3090        bottom: c_float,
3091        top: c_float,
3092        z_near: c_float,
3093        z_far: c_float,
3094    );
3095    pub fn cogl_framebuffer_get_alpha_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
3096    pub fn cogl_framebuffer_get_blue_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
3097    pub fn cogl_framebuffer_get_color_mask(framebuffer: *mut CoglFramebuffer) -> CoglColorMask;
3098    pub fn cogl_framebuffer_get_context(framebuffer: *mut CoglFramebuffer) -> *mut CoglContext;
3099    pub fn cogl_framebuffer_get_depth_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
3100    pub fn cogl_framebuffer_get_depth_texture(
3101        framebuffer: *mut CoglFramebuffer,
3102    ) -> *mut CoglTexture;
3103    pub fn cogl_framebuffer_get_depth_texture_enabled(
3104        framebuffer: *mut CoglFramebuffer,
3105    ) -> CoglBool;
3106    pub fn cogl_framebuffer_get_depth_write_enabled(framebuffer: *mut CoglFramebuffer) -> CoglBool;
3107    pub fn cogl_framebuffer_get_dither_enabled(framebuffer: *mut CoglFramebuffer) -> CoglBool;
3108    pub fn cogl_framebuffer_get_green_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
3109    pub fn cogl_framebuffer_get_height(framebuffer: *mut CoglFramebuffer) -> c_int;
3110    pub fn cogl_framebuffer_get_is_stereo(framebuffer: *mut CoglFramebuffer) -> CoglBool;
3111    pub fn cogl_framebuffer_get_modelview_matrix(
3112        framebuffer: *mut CoglFramebuffer,
3113        matrix: *mut CoglMatrix,
3114    );
3115    pub fn cogl_framebuffer_get_projection_matrix(
3116        framebuffer: *mut CoglFramebuffer,
3117        matrix: *mut CoglMatrix,
3118    );
3119    pub fn cogl_framebuffer_get_red_bits(framebuffer: *mut CoglFramebuffer) -> c_int;
3120    pub fn cogl_framebuffer_get_samples_per_pixel(framebuffer: *mut CoglFramebuffer) -> c_int;
3121    pub fn cogl_framebuffer_get_stereo_mode(framebuffer: *mut CoglFramebuffer) -> CoglStereoMode;
3122    pub fn cogl_framebuffer_get_viewport4fv(
3123        framebuffer: *mut CoglFramebuffer,
3124        viewport: *mut [c_float; 4],
3125    );
3126    pub fn cogl_framebuffer_get_viewport_height(framebuffer: *mut CoglFramebuffer) -> c_float;
3127    pub fn cogl_framebuffer_get_viewport_width(framebuffer: *mut CoglFramebuffer) -> c_float;
3128    pub fn cogl_framebuffer_get_viewport_x(framebuffer: *mut CoglFramebuffer) -> c_float;
3129    pub fn cogl_framebuffer_get_viewport_y(framebuffer: *mut CoglFramebuffer) -> c_float;
3130    pub fn cogl_framebuffer_get_width(framebuffer: *mut CoglFramebuffer) -> c_int;
3131    pub fn cogl_framebuffer_identity_matrix(framebuffer: *mut CoglFramebuffer);
3132    pub fn cogl_framebuffer_orthographic(
3133        framebuffer: *mut CoglFramebuffer,
3134        x_1: c_float,
3135        y_1: c_float,
3136        x_2: c_float,
3137        y_2: c_float,
3138        near: c_float,
3139        far: c_float,
3140    );
3141    pub fn cogl_framebuffer_perspective(
3142        framebuffer: *mut CoglFramebuffer,
3143        fov_y: c_float,
3144        aspect: c_float,
3145        z_near: c_float,
3146        z_far: c_float,
3147    );
3148    pub fn cogl_framebuffer_pop_clip(framebuffer: *mut CoglFramebuffer);
3149    pub fn cogl_framebuffer_pop_matrix(framebuffer: *mut CoglFramebuffer);
3150    pub fn cogl_framebuffer_push_matrix(framebuffer: *mut CoglFramebuffer);
3151    pub fn cogl_framebuffer_push_primitive_clip(
3152        framebuffer: *mut CoglFramebuffer,
3153        primitive: *mut CoglPrimitive,
3154        bounds_x1: c_float,
3155        bounds_y1: c_float,
3156        bounds_x2: c_float,
3157        bounds_y2: c_float,
3158    );
3159    pub fn cogl_framebuffer_push_rectangle_clip(
3160        framebuffer: *mut CoglFramebuffer,
3161        x_1: c_float,
3162        y_1: c_float,
3163        x_2: c_float,
3164        y_2: c_float,
3165    );
3166    pub fn cogl_framebuffer_push_scissor_clip(
3167        framebuffer: *mut CoglFramebuffer,
3168        x: c_int,
3169        y: c_int,
3170        width: c_int,
3171        height: c_int,
3172    );
3173    pub fn cogl_framebuffer_read_pixels(
3174        framebuffer: *mut CoglFramebuffer,
3175        x: c_int,
3176        y: c_int,
3177        width: c_int,
3178        height: c_int,
3179        format: CoglPixelFormat,
3180        pixels: *mut u8,
3181    ) -> CoglBool;
3182    pub fn cogl_framebuffer_read_pixels_into_bitmap(
3183        framebuffer: *mut CoglFramebuffer,
3184        x: c_int,
3185        y: c_int,
3186        source: CoglReadPixelsFlags,
3187        bitmap: *mut CoglBitmap,
3188    ) -> CoglBool;
3189    pub fn cogl_framebuffer_resolve_samples(framebuffer: *mut CoglFramebuffer);
3190    pub fn cogl_framebuffer_resolve_samples_region(
3191        framebuffer: *mut CoglFramebuffer,
3192        x: c_int,
3193        y: c_int,
3194        width: c_int,
3195        height: c_int,
3196    );
3197    pub fn cogl_framebuffer_rotate(
3198        framebuffer: *mut CoglFramebuffer,
3199        angle: c_float,
3200        x: c_float,
3201        y: c_float,
3202        z: c_float,
3203    );
3204    pub fn cogl_framebuffer_rotate_euler(
3205        framebuffer: *mut CoglFramebuffer,
3206        euler: *const CoglEuler,
3207    );
3208    pub fn cogl_framebuffer_rotate_quaternion(
3209        framebuffer: *mut CoglFramebuffer,
3210        quaternion: *const CoglQuaternion,
3211    );
3212    pub fn cogl_framebuffer_scale(
3213        framebuffer: *mut CoglFramebuffer,
3214        x: c_float,
3215        y: c_float,
3216        z: c_float,
3217    );
3218    pub fn cogl_framebuffer_set_color_mask(
3219        framebuffer: *mut CoglFramebuffer,
3220        color_mask: CoglColorMask,
3221    );
3222    pub fn cogl_framebuffer_set_depth_texture_enabled(
3223        framebuffer: *mut CoglFramebuffer,
3224        enabled: CoglBool,
3225    );
3226    pub fn cogl_framebuffer_set_depth_write_enabled(
3227        framebuffer: *mut CoglFramebuffer,
3228        depth_write_enabled: CoglBool,
3229    );
3230    pub fn cogl_framebuffer_set_dither_enabled(
3231        framebuffer: *mut CoglFramebuffer,
3232        dither_enabled: CoglBool,
3233    );
3234    pub fn cogl_framebuffer_set_modelview_matrix(
3235        framebuffer: *mut CoglFramebuffer,
3236        matrix: *const CoglMatrix,
3237    );
3238    pub fn cogl_framebuffer_set_projection_matrix(
3239        framebuffer: *mut CoglFramebuffer,
3240        matrix: *const CoglMatrix,
3241    );
3242    pub fn cogl_framebuffer_set_samples_per_pixel(
3243        framebuffer: *mut CoglFramebuffer,
3244        samples_per_pixel: c_int,
3245    );
3246    pub fn cogl_framebuffer_set_stereo_mode(
3247        framebuffer: *mut CoglFramebuffer,
3248        stereo_mode: CoglStereoMode,
3249    );
3250    pub fn cogl_framebuffer_set_viewport(
3251        framebuffer: *mut CoglFramebuffer,
3252        x: c_float,
3253        y: c_float,
3254        width: c_float,
3255        height: c_float,
3256    );
3257    pub fn cogl_framebuffer_transform(framebuffer: *mut CoglFramebuffer, matrix: *const CoglMatrix);
3258    pub fn cogl_framebuffer_translate(
3259        framebuffer: *mut CoglFramebuffer,
3260        x: c_float,
3261        y: c_float,
3262        z: c_float,
3263    );
3264    pub fn cogl_framebuffer_vdraw_attributes(
3265        framebuffer: *mut CoglFramebuffer,
3266        pipeline: *mut CoglPipeline,
3267        mode: CoglVerticesMode,
3268        first_vertex: c_int,
3269        n_vertices: c_int,
3270        ...
3271    );
3272    pub fn cogl_framebuffer_vdraw_indexed_attributes(
3273        framebuffer: *mut CoglFramebuffer,
3274        pipeline: *mut CoglPipeline,
3275        mode: CoglVerticesMode,
3276        first_vertex: c_int,
3277        n_vertices: c_int,
3278        indices: *mut CoglIndices,
3279        ...
3280    );
3281
3282    //=========================================================================
3283    // CoglTexture
3284    //=========================================================================
3285    pub fn cogl_texture_get_gtype() -> GType;
3286    pub fn cogl_texture_allocate(
3287        texture: *mut CoglTexture,
3288        error: *mut *mut glib::GError,
3289    ) -> CoglBool;
3290    pub fn cogl_texture_get_components(texture: *mut CoglTexture) -> CoglTextureComponents;
3291    pub fn cogl_texture_get_data(
3292        texture: *mut CoglTexture,
3293        format: CoglPixelFormat,
3294        rowstride: c_uint,
3295        data: *mut u8,
3296    ) -> c_int;
3297    pub fn cogl_texture_get_gl_texture(
3298        texture: *mut CoglTexture,
3299        out_gl_handle: *mut c_uint,
3300        out_gl_target: *mut c_uint,
3301    ) -> CoglBool;
3302    pub fn cogl_texture_get_height(texture: *mut CoglTexture) -> c_uint;
3303    pub fn cogl_texture_get_max_waste(texture: *mut CoglTexture) -> c_int;
3304    pub fn cogl_texture_get_premultiplied(texture: *mut CoglTexture) -> CoglBool;
3305    pub fn cogl_texture_get_width(texture: *mut CoglTexture) -> c_uint;
3306    pub fn cogl_texture_is_sliced(texture: *mut CoglTexture) -> CoglBool;
3307    pub fn cogl_texture_set_components(
3308        texture: *mut CoglTexture,
3309        components: CoglTextureComponents,
3310    );
3311    pub fn cogl_texture_set_data(
3312        texture: *mut CoglTexture,
3313        format: CoglPixelFormat,
3314        rowstride: c_int,
3315        data: *const u8,
3316        level: c_int,
3317        error: *mut *mut glib::GError,
3318    ) -> CoglBool;
3319    pub fn cogl_texture_set_premultiplied(texture: *mut CoglTexture, premultiplied: CoglBool);
3320    pub fn cogl_texture_set_region(
3321        texture: *mut CoglTexture,
3322        src_x: c_int,
3323        src_y: c_int,
3324        dst_x: c_int,
3325        dst_y: c_int,
3326        dst_width: c_uint,
3327        dst_height: c_uint,
3328        width: c_int,
3329        height: c_int,
3330        format: CoglPixelFormat,
3331        rowstride: c_uint,
3332        data: *const u8,
3333    ) -> CoglBool;
3334    pub fn cogl_texture_set_region_from_bitmap(
3335        texture: *mut CoglTexture,
3336        src_x: c_int,
3337        src_y: c_int,
3338        dst_x: c_int,
3339        dst_y: c_int,
3340        dst_width: c_uint,
3341        dst_height: c_uint,
3342        bitmap: *mut CoglBitmap,
3343    ) -> CoglBool;
3344    pub fn cogl_texture_ref(texture: *mut c_void) -> *mut c_void;
3345    pub fn cogl_texture_unref(texture: *mut c_void);
3346
3347    //=========================================================================
3348    // Other functions
3349    //=========================================================================
3350    pub fn cogl_angle_cos(angle: CoglAngle) -> CoglFixed;
3351    pub fn cogl_angle_sin(angle: CoglAngle) -> CoglFixed;
3352    pub fn cogl_angle_tan(angle: CoglAngle) -> CoglFixed;
3353    pub fn cogl_begin_gl();
3354    pub fn cogl_buffer_get_size(buffer: *mut CoglBuffer) -> c_uint;
3355    pub fn cogl_buffer_get_update_hint(buffer: *mut CoglBuffer) -> CoglBufferUpdateHint;
3356    pub fn cogl_buffer_map(
3357        buffer: *mut CoglBuffer,
3358        access: CoglBufferAccess,
3359        hints: CoglBufferMapHint,
3360    ) -> *mut c_void;
3361    pub fn cogl_buffer_map_range(
3362        buffer: *mut CoglBuffer,
3363        offset: size_t,
3364        size: size_t,
3365        access: CoglBufferAccess,
3366        hints: CoglBufferMapHint,
3367        error: *mut *mut glib::GError,
3368    ) -> *mut c_void;
3369    pub fn cogl_buffer_set_data(
3370        buffer: *mut CoglBuffer,
3371        offset: size_t,
3372        data: *mut c_void,
3373        size: size_t,
3374    ) -> CoglBool;
3375    pub fn cogl_buffer_set_update_hint(buffer: *mut CoglBuffer, hint: CoglBufferUpdateHint);
3376    pub fn cogl_buffer_unmap(buffer: *mut CoglBuffer);
3377    pub fn cogl_check_extension(name: *const c_char, ext: *const c_char) -> CoglBool;
3378    pub fn cogl_clear(color: *const CoglColor, buffers: c_ulong);
3379    pub fn cogl_clip_ensure();
3380    pub fn cogl_clip_pop();
3381    pub fn cogl_clip_push(x_offset: c_float, y_offset: c_float, width: c_float, height: c_float);
3382    pub fn cogl_clip_push_primitive(
3383        primitive: *mut c_void,
3384        bounds_x1: c_float,
3385        bounds_y1: c_float,
3386        bounds_x2: c_float,
3387        bounds_y2: c_float,
3388    );
3389    pub fn cogl_clip_push_rectangle(x0: c_float, y0: c_float, x1: c_float, y1: c_float);
3390    pub fn cogl_clip_push_window_rect(
3391        x_offset: c_float,
3392        y_offset: c_float,
3393        width: c_float,
3394        height: c_float,
3395    );
3396    pub fn cogl_clip_push_window_rectangle(
3397        x_offset: c_int,
3398        y_offset: c_int,
3399        width: c_int,
3400        height: c_int,
3401    );
3402    pub fn cogl_clip_stack_restore();
3403    pub fn cogl_clip_stack_save();
3404    pub fn cogl_clutter_check_extension_CLUTTER(
3405        name: *const c_char,
3406        ext: *const c_char,
3407    ) -> CoglBool;
3408    pub fn cogl_clutter_winsys_has_feature_CLUTTER(feature: CoglWinsysFeature) -> CoglBool;
3409    pub fn cogl_clutter_winsys_xlib_get_visual_info_CLUTTER();
3410    pub fn cogl_create_program() -> CoglHandle;
3411    pub fn cogl_create_shader(shader_type: CoglShaderType) -> CoglHandle;
3412    pub fn cogl_debug_matrix_entry_print(entry: *mut CoglMatrixEntry);
3413    pub fn cogl_debug_matrix_print(matrix: *const CoglMatrix);
3414    pub fn cogl_debug_object_foreach_type(
3415        func: CoglDebugObjectForeachTypeCallback,
3416        user_data: *mut c_void,
3417    );
3418    pub fn cogl_debug_object_print_instances();
3419    pub fn cogl_disable_fog();
3420    pub fn cogl_double_to_fixed(value: c_double) -> CoglFixed;
3421    pub fn cogl_double_to_int(value: c_double) -> c_int;
3422    pub fn cogl_double_to_uint(value: c_double) -> c_uint;
3423    pub fn cogl_egl_context_get_egl_context(context: *mut CoglContext);
3424    pub fn cogl_egl_context_get_egl_display(context: *mut CoglContext);
3425    pub fn cogl_end_gl();
3426    pub fn cogl_error_copy(error: *mut glib::GError) -> *mut glib::GError;
3427    pub fn cogl_error_free(error: *mut glib::GError);
3428    pub fn cogl_error_matches(error: *mut glib::GError, domain: u32, code: c_int) -> CoglBool;
3429    pub fn cogl_features_available(features: CoglFeatureFlags) -> CoglBool;
3430    pub fn cogl_flush();
3431    pub fn cogl_foreach_feature(
3432        context: *mut CoglContext,
3433        callback: CoglFeatureCallback,
3434        user_data: *mut c_void,
3435    );
3436    pub fn cogl_framebuffer_get_color_format(framebuffer: *mut c_void) -> CoglPixelFormat;
3437    pub fn cogl_frustum(
3438        left: c_float,
3439        right: c_float,
3440        bottom: c_float,
3441        top: c_float,
3442        z_near: c_float,
3443        z_far: c_float,
3444    );
3445    pub fn cogl_get_backface_culling_enabled() -> CoglBool;
3446    pub fn cogl_get_bitmasks(
3447        red: *mut c_int,
3448        green: *mut c_int,
3449        blue: *mut c_int,
3450        alpha: *mut c_int,
3451    );
3452    pub fn cogl_get_clock_time(context: *mut CoglContext) -> i64;
3453    pub fn cogl_get_depth_test_enabled() -> CoglBool;
3454    pub fn cogl_get_draw_framebuffer() -> *mut CoglFramebuffer;
3455    pub fn cogl_get_features() -> CoglFeatureFlags;
3456    pub fn cogl_get_modelview_matrix(matrix: *mut CoglMatrix);
3457    pub fn cogl_get_option_group() -> *mut glib::GOptionGroup;
3458    pub fn cogl_get_proc_address(name: *const c_char) -> CoglFuncPtr;
3459    pub fn cogl_get_projection_matrix(matrix: *mut CoglMatrix);
3460    pub fn cogl_get_rectangle_indices(
3461        context: *mut CoglContext,
3462        n_rectangles: c_int,
3463    ) -> *mut CoglIndices;
3464    pub fn cogl_get_source() -> *mut c_void;
3465    pub fn cogl_get_static_identity_quaternion() -> *const CoglQuaternion;
3466    pub fn cogl_get_static_zero_quaternion() -> *const CoglQuaternion;
3467    pub fn cogl_get_viewport(v: *mut [c_float; 4]);
3468    //pub fn cogl_gles2_get_current_vtable() -> /*Ignored*/*mut CoglGLES2Vtable;
3469    pub fn cogl_gles2_texture_2d_new_from_handle(
3470        ctx: *mut CoglContext,
3471        gles2_ctx: *mut CoglGLES2Context,
3472        handle: c_uint,
3473        width: c_int,
3474        height: c_int,
3475        format: CoglPixelFormat,
3476    ) -> *mut CoglTexture2D;
3477    pub fn cogl_gles2_texture_get_handle(
3478        texture: *mut CoglTexture,
3479        handle: *mut c_uint,
3480        target: *mut c_uint,
3481    ) -> CoglBool;
3482    pub fn cogl_glib_renderer_source_new(
3483        renderer: *mut CoglRenderer,
3484        priority: c_int,
3485    ) -> *mut glib::GSource;
3486    pub fn cogl_glib_source_new(context: *mut CoglContext, priority: c_int) -> *mut glib::GSource;
3487    pub fn cogl_glx_context_get_glx_context(context: *mut CoglContext);
3488    pub fn cogl_gtype_matrix_get_type() -> GType;
3489    pub fn cogl_handle_get_type() -> GType;
3490    pub fn cogl_handle_ref(handle: CoglHandle) -> CoglHandle;
3491    pub fn cogl_handle_unref(handle: CoglHandle);
3492    pub fn cogl_has_feature(context: *mut CoglContext, feature: CoglFeatureID) -> CoglBool;
3493    pub fn cogl_has_features(context: *mut CoglContext, ...) -> CoglBool;
3494    pub fn cogl_is_atlas_texture(object: *mut c_void) -> CoglBool;
3495    pub fn cogl_is_attribute(object: *mut c_void) -> CoglBool;
3496    pub fn cogl_is_attribute_buffer(object: *mut c_void) -> CoglBool;
3497    pub fn cogl_is_bitmap(object: *mut c_void) -> CoglBool;
3498    pub fn cogl_is_buffer(object: *mut c_void) -> CoglBool;
3499    pub fn cogl_is_context(object: *mut c_void) -> CoglBool;
3500    pub fn cogl_is_display(object: *mut c_void) -> CoglBool;
3501    pub fn cogl_is_frame_info(object: *mut c_void) -> CoglBool;
3502    pub fn cogl_is_framebuffer(object: *mut c_void) -> CoglBool;
3503    pub fn cogl_is_gles2_context(object: *mut c_void) -> CoglBool;
3504    pub fn cogl_is_index_buffer(object: *mut c_void) -> CoglBool;
3505    pub fn cogl_is_indices(object: *mut c_void) -> CoglBool;
3506    pub fn cogl_is_matrix_stack(object: *mut c_void) -> CoglBool;
3507    pub fn cogl_is_material(handle: CoglHandle) -> CoglBool;
3508    pub fn cogl_is_offscreen(object: *mut c_void) -> CoglBool;
3509    pub fn cogl_is_onscreen(object: *mut c_void) -> CoglBool;
3510    pub fn cogl_is_onscreen_template(object: *mut c_void) -> CoglBool;
3511    pub fn cogl_is_output(object: *mut c_void) -> CoglBool;
3512    pub fn cogl_is_pipeline(object: *mut c_void) -> CoglBool;
3513    pub fn cogl_is_pixel_buffer(object: *mut c_void) -> CoglBool;
3514    pub fn cogl_is_primitive(object: *mut c_void) -> CoglBool;
3515    pub fn cogl_is_primitive_texture(object: *mut c_void) -> CoglBool;
3516    pub fn cogl_is_program(handle: CoglHandle) -> CoglBool;
3517    pub fn cogl_is_renderer(object: *mut c_void) -> CoglBool;
3518    pub fn cogl_is_shader(handle: CoglHandle) -> CoglBool;
3519    pub fn cogl_is_snippet(object: *mut c_void) -> CoglBool;
3520    pub fn cogl_is_sub_texture(object: *mut c_void) -> CoglBool;
3521    pub fn cogl_is_swap_chain(object: *mut c_void) -> CoglBool;
3522    pub fn cogl_is_texture(object: *mut c_void) -> CoglBool;
3523    pub fn cogl_is_texture_2d(object: *mut c_void) -> CoglBool;
3524    pub fn cogl_is_texture_2d_sliced(object: *mut c_void) -> CoglBool;
3525    pub fn cogl_is_texture_3d(object: *mut c_void) -> CoglBool;
3526    pub fn cogl_is_texture_pixmap_x11(object: *mut c_void) -> CoglBool;
3527    pub fn cogl_is_texture_rectangle(object: *mut c_void) -> CoglBool;
3528    pub fn cogl_is_vertex_buffer(handle: CoglHandle) -> CoglBool;
3529    pub fn cogl_is_vertex_buffer_indices(handle: CoglHandle) -> CoglBool;
3530    pub fn cogl_kms_display_queue_modes_reset(display: *mut CoglDisplay);
3531    pub fn cogl_kms_display_set_ignore_crtc(display: *mut CoglDisplay, id: u32, ignore: CoglBool);
3532    pub fn cogl_kms_display_set_layout(
3533        display: *mut CoglDisplay,
3534        width: c_int,
3535        height: c_int,
3536        crtcs: *mut *mut CoglKmsCrtc,
3537        n_crtcs: c_int,
3538        error: *mut *mut glib::GError,
3539    ) -> CoglBool;
3540
3541    // FIXME:
3542    // pub fn cogl_kms_renderer_get_gbm(renderer: *mut CoglRenderer) -> *mut gbm_device;
3543
3544    pub fn cogl_kms_renderer_get_kms_fd(renderer: *mut CoglRenderer) -> c_int;
3545    pub fn cogl_kms_renderer_set_kms_fd(renderer: *mut CoglRenderer, fd: c_int);
3546    pub fn cogl_meta_texture_foreach_in_region(
3547        meta_texture: *mut CoglMetaTexture,
3548        tx_1: c_float,
3549        ty_1: c_float,
3550        tx_2: c_float,
3551        ty_2: c_float,
3552        wrap_s: CoglPipelineWrapMode,
3553        wrap_t: CoglPipelineWrapMode,
3554        callback: CoglMetaTextureCallback,
3555        user_data: *mut c_void,
3556    );
3557    pub fn cogl_onscreen_clutter_backend_set_size_CLUTTER(width: c_int, height: c_int);
3558    pub fn cogl_ortho(
3559        left: c_float,
3560        right: c_float,
3561        bottom: c_float,
3562        top: c_float,
3563        near: c_float,
3564        far: c_float,
3565    );
3566    pub fn cogl_perspective(fovy: c_float, aspect: c_float, z_near: c_float, z_far: c_float);
3567    pub fn cogl_poll_renderer_dispatch(
3568        renderer: *mut CoglRenderer,
3569        poll_fds: *const CoglPollFD,
3570        n_poll_fds: c_int,
3571    );
3572    pub fn cogl_poll_renderer_get_info(
3573        renderer: *mut CoglRenderer,
3574        poll_fds: *mut *mut CoglPollFD,
3575        n_poll_fds: *mut c_int,
3576        timeout: *mut i64,
3577    ) -> c_int;
3578    pub fn cogl_polygon(
3579        vertices: *const CoglTextureVertex,
3580        n_vertices: c_uint,
3581        use_color: CoglBool,
3582    );
3583    pub fn cogl_pop_draw_buffer();
3584    pub fn cogl_pop_gles2_context(ctx: *mut CoglContext);
3585    pub fn cogl_pop_framebuffer();
3586    pub fn cogl_pop_matrix();
3587    pub fn cogl_pop_source();
3588    pub fn cogl_program_attach_shader(program_handle: CoglHandle, shader_handle: CoglHandle);
3589    pub fn cogl_program_get_uniform_location(
3590        handle: CoglHandle,
3591        uniform_name: *const c_char,
3592    ) -> c_int;
3593    pub fn cogl_program_link(handle: CoglHandle);
3594    pub fn cogl_program_ref(handle: CoglHandle) -> CoglHandle;
3595    pub fn cogl_program_set_uniform_1f(
3596        program: CoglHandle,
3597        uniform_location: c_int,
3598        value: c_float,
3599    );
3600    pub fn cogl_program_set_uniform_1i(program: CoglHandle, uniform_location: c_int, value: c_int);
3601    pub fn cogl_program_set_uniform_float(
3602        program: CoglHandle,
3603        uniform_location: c_int,
3604        n_components: c_int,
3605        count: c_int,
3606        value: *const c_float,
3607    );
3608    pub fn cogl_program_set_uniform_int(
3609        program: CoglHandle,
3610        uniform_location: c_int,
3611        n_components: c_int,
3612        count: c_int,
3613        value: *const c_int,
3614    );
3615    pub fn cogl_program_set_uniform_matrix(
3616        program: CoglHandle,
3617        uniform_location: c_int,
3618        dimensions: c_int,
3619        count: c_int,
3620        transpose: CoglBool,
3621        value: *const c_float,
3622    );
3623    pub fn cogl_program_uniform_1f(uniform_no: c_int, value: c_float);
3624    pub fn cogl_program_uniform_1i(uniform_no: c_int, value: c_int);
3625    pub fn cogl_program_uniform_float(
3626        uniform_no: c_int,
3627        size: c_int,
3628        count: c_int,
3629        value: *const c_float,
3630    );
3631    pub fn cogl_program_uniform_int(
3632        uniform_no: c_int,
3633        size: c_int,
3634        count: c_int,
3635        value: *const c_int,
3636    );
3637    pub fn cogl_program_uniform_matrix(
3638        uniform_no: c_int,
3639        size: c_int,
3640        count: c_int,
3641        transpose: CoglBool,
3642        value: *const c_float,
3643    );
3644    pub fn cogl_program_unref(handle: CoglHandle);
3645    pub fn cogl_program_use(handle: CoglHandle);
3646    pub fn cogl_push_draw_buffer();
3647    pub fn cogl_push_framebuffer(buffer: *mut c_void);
3648    pub fn cogl_push_gles2_context(
3649        ctx: *mut CoglContext,
3650        gles2_ctx: *mut CoglGLES2Context,
3651        read_buffer: *mut CoglFramebuffer,
3652        write_buffer: *mut CoglFramebuffer,
3653        error: *mut *mut glib::GError,
3654    ) -> CoglBool;
3655    pub fn cogl_push_matrix();
3656    pub fn cogl_push_source(material: *mut c_void);
3657    pub fn cogl_read_pixels(
3658        x: c_int,
3659        y: c_int,
3660        width: c_int,
3661        height: c_int,
3662        source: CoglReadPixelsFlags,
3663        format: CoglPixelFormat,
3664        pixels: *mut u8,
3665    );
3666    pub fn cogl_rectangle(x_1: c_float, y_1: c_float, x_2: c_float, y_2: c_float);
3667    pub fn cogl_rectangle_with_multitexture_coords(
3668        x1: c_float,
3669        y1: c_float,
3670        x2: c_float,
3671        y2: c_float,
3672        tex_coords: *const c_float,
3673        tex_coords_len: c_int,
3674    );
3675    pub fn cogl_rectangle_with_texture_coords(
3676        x1: c_float,
3677        y1: c_float,
3678        x2: c_float,
3679        y2: c_float,
3680        tx1: c_float,
3681        ty1: c_float,
3682        tx2: c_float,
3683        ty2: c_float,
3684    );
3685    pub fn cogl_rectangles(verts: *const c_float, n_rects: c_uint);
3686    pub fn cogl_rectangles_with_texture_coords(verts: *const c_float, n_rects: c_uint);
3687    pub fn cogl_rotate(angle: c_float, x: c_float, y: c_float, z: c_float);
3688    pub fn cogl_scale(x: c_float, y: c_float, z: c_float);
3689    pub fn cogl_set_backface_culling_enabled(setting: CoglBool);
3690    pub fn cogl_set_depth_test_enabled(setting: CoglBool);
3691    pub fn cogl_set_draw_buffer(target: CoglBufferTarget, offscreen: CoglHandle);
3692    pub fn cogl_set_fog(
3693        fog_color: *const CoglColor,
3694        mode: CoglFogMode,
3695        density: c_float,
3696        z_near: c_float,
3697        z_far: c_float,
3698    );
3699    pub fn cogl_set_framebuffer(buffer: *mut c_void);
3700    pub fn cogl_set_modelview_matrix(matrix: *mut CoglMatrix);
3701    pub fn cogl_set_projection_matrix(matrix: *mut CoglMatrix);
3702    pub fn cogl_set_source(material: *mut c_void);
3703    pub fn cogl_set_source_color(color: *const CoglColor);
3704    pub fn cogl_set_source_color4f(red: c_float, green: c_float, blue: c_float, alpha: c_float);
3705    pub fn cogl_set_source_color4ub(red: u8, green: u8, blue: u8, alpha: u8);
3706    pub fn cogl_set_source_texture(texture: *mut CoglTexture);
3707    pub fn cogl_set_viewport(x: c_int, y: c_int, width: c_int, height: c_int);
3708    pub fn cogl_shader_compile(handle: CoglHandle);
3709    pub fn cogl_shader_get_info_log(handle: CoglHandle) -> *mut c_char;
3710    pub fn cogl_shader_get_type(handle: CoglHandle) -> CoglShaderType;
3711    pub fn cogl_shader_is_compiled(handle: CoglHandle) -> CoglBool;
3712    pub fn cogl_shader_ref(handle: CoglHandle) -> CoglHandle;
3713    pub fn cogl_shader_source(shader: CoglHandle, source: *const c_char);
3714    pub fn cogl_shader_unref(handle: CoglHandle);
3715    pub fn cogl_sqrti(x: c_int) -> c_int;
3716    pub fn cogl_transform(matrix: *const CoglMatrix);
3717    pub fn cogl_translate(x: c_float, y: c_float, z: c_float);
3718    pub fn cogl_vector3_add(result: *mut c_float, a: *const c_float, b: *const c_float);
3719    pub fn cogl_vector3_copy(vector: *const c_float) -> *mut c_float;
3720    pub fn cogl_vector3_cross_product(result: *mut c_float, u: *const c_float, v: *const c_float);
3721    pub fn cogl_vector3_distance(a: *const c_float, b: *const c_float) -> c_float;
3722    pub fn cogl_vector3_divide_scalar(vector: *mut c_float, scalar: c_float);
3723    pub fn cogl_vector3_dot_product(a: *const c_float, b: *const c_float) -> c_float;
3724    pub fn cogl_vector3_equal(v1: *mut c_void, v2: *mut c_void) -> CoglBool;
3725    pub fn cogl_vector3_equal_with_epsilon(
3726        vector0: *const c_float,
3727        vector1: *const c_float,
3728        epsilon: c_float,
3729    ) -> CoglBool;
3730    pub fn cogl_vector3_free(vector: *mut c_float);
3731    pub fn cogl_vector3_init(vector: *mut c_float, x: c_float, y: c_float, z: c_float);
3732    pub fn cogl_vector3_init_zero(vector: *mut c_float);
3733    pub fn cogl_vector3_invert(vector: *mut c_float);
3734    pub fn cogl_vector3_magnitude(vector: *const c_float) -> c_float;
3735    pub fn cogl_vector3_multiply_scalar(vector: *mut c_float, scalar: c_float);
3736    pub fn cogl_vector3_normalize(vector: *mut c_float);
3737    pub fn cogl_vector3_subtract(result: *mut c_float, a: *const c_float, b: *const c_float);
3738    pub fn cogl_vertex_buffer_add(
3739        handle: CoglHandle,
3740        attribute_name: *const c_char,
3741        n_components: u8,
3742        type_: CoglAttributeType,
3743        normalized: CoglBool,
3744        stride: u16,
3745        pointer: *mut c_void,
3746    );
3747    pub fn cogl_vertex_buffer_delete(handle: CoglHandle, attribute_name: *const c_char);
3748    pub fn cogl_vertex_buffer_disable(handle: CoglHandle, attribute_name: *const c_char);
3749    pub fn cogl_vertex_buffer_draw(
3750        handle: CoglHandle,
3751        mode: CoglVerticesMode,
3752        first: c_int,
3753        count: c_int,
3754    );
3755    pub fn cogl_vertex_buffer_draw_elements(
3756        handle: CoglHandle,
3757        mode: CoglVerticesMode,
3758        indices: CoglHandle,
3759        min_index: c_int,
3760        max_index: c_int,
3761        indices_offset: c_int,
3762        count: c_int,
3763    );
3764    pub fn cogl_vertex_buffer_enable(handle: CoglHandle, attribute_name: *const c_char);
3765    pub fn cogl_vertex_buffer_get_n_vertices(handle: CoglHandle) -> c_uint;
3766    pub fn cogl_vertex_buffer_indices_get_for_quads(n_indices: c_uint) -> CoglHandle;
3767    pub fn cogl_vertex_buffer_indices_get_type(indices: CoglHandle) -> CoglIndicesType;
3768    pub fn cogl_vertex_buffer_indices_new(
3769        indices_type: CoglIndicesType,
3770        indices_array: *mut c_void,
3771        indices_len: c_int,
3772    ) -> CoglHandle;
3773    pub fn cogl_vertex_buffer_new(n_vertices: c_uint) -> CoglHandle;
3774    pub fn cogl_vertex_buffer_ref(handle: CoglHandle) -> CoglHandle;
3775    pub fn cogl_vertex_buffer_submit(handle: CoglHandle);
3776    pub fn cogl_vertex_buffer_unref(handle: CoglHandle);
3777    pub fn cogl_viewport(width: c_uint, height: c_uint);
3778
3779    // FIXME:
3780    // pub fn cogl_wayland_display_set_compositor_display(display: *mut CoglDisplay, wayland_display: *mut wl_display);
3781    // pub fn cogl_wayland_onscreen_get_shell_surface(onscreen: *mut CoglOnscreen) -> *mut wl_shell_surface;
3782    // pub fn cogl_wayland_onscreen_get_surface(onscreen: *mut CoglOnscreen) -> *mut wl_surface;
3783    // pub fn cogl_wayland_onscreen_resize(onscreen: *mut CoglOnscreen, width: c_int, height: c_int, offset_x: c_int, offset_y: c_int);
3784    // pub fn cogl_wayland_onscreen_set_foreign_surface(onscreen: *mut CoglOnscreen, surface: *mut wl_surface);
3785    // pub fn cogl_wayland_renderer_get_display(renderer: *mut CoglRenderer) -> *mut wl_display;
3786    // pub fn cogl_wayland_renderer_set_event_dispatch_enabled(renderer: *mut CoglRenderer, enable: CoglBool);
3787    // pub fn cogl_wayland_renderer_set_foreign_display(renderer: *mut CoglRenderer, display: *mut wl_display);
3788    // pub fn cogl_wayland_texture_2d_new_from_buffer(ctx: *mut CoglContext, buffer: *mut wl_resource, error: *mut *mut glib::GError) -> *mut CoglTexture2D;
3789    // pub fn cogl_wayland_texture_set_region_from_shm_buffer(texture: *mut CoglTexture, src_x: c_int, src_y: c_int, width: c_int, height: c_int, shm_buffer: *mut wl_shm_buffer, dst_x: c_int, dst_y: c_int, level: c_int, error: *mut *mut glib::GError) -> CoglBool;
3790
3791    pub fn cogl_x11_onscreen_get_visual_xid(onscreen: *mut CoglOnscreen) -> u32;
3792    pub fn cogl_x11_onscreen_get_window_xid(onscreen: *mut CoglOnscreen) -> u32;
3793    pub fn cogl_x11_onscreen_set_foreign_window_xid(
3794        onscreen: *mut CoglOnscreen,
3795        xid: u32,
3796        update: CoglOnscreenX11MaskCallback,
3797        user_data: *mut c_void,
3798    );
3799    pub fn cogl_xlib_get_display();
3800    pub fn cogl_xlib_handle_event(xevent: *mut c_void) -> CoglFilterReturn;
3801    pub fn cogl_xlib_set_display(display: *mut c_void);
3802    // pub fn cogl_xlib_renderer_add_filter(renderer: *mut c_void, func: CoglXlibFilterFunc, data: *mut c_void);
3803    pub fn cogl_xlib_renderer_get_display(renderer: *mut c_void);
3804    pub fn cogl_xlib_renderer_get_foreign_display(renderer: *mut c_void);
3805    pub fn cogl_xlib_renderer_get_visual_info(renderer: *mut c_void);
3806    pub fn cogl_xlib_renderer_handle_event(
3807        renderer: *mut c_void,
3808        event: *mut c_void,
3809    ) -> CoglFilterReturn;
3810    // pub fn cogl_xlib_renderer_remove_filter(renderer: *mut c_void, func: CoglXlibFilterFunc, data: *mut c_void);
3811    pub fn cogl_xlib_renderer_set_event_retrieval_enabled(renderer: *mut c_void, enable: CoglBool);
3812    pub fn cogl_xlib_renderer_set_foreign_display(renderer: *mut c_void, display: *mut c_void);
3813}