graphene_sys/
lib.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
6#![allow(
7    clippy::approx_constant,
8    clippy::type_complexity,
9    clippy::unreadable_literal,
10    clippy::upper_case_acronyms
11)]
12#![cfg_attr(docsrs, feature(doc_cfg))]
13
14use glib_sys as glib;
15
16#[cfg(unix)]
17#[allow(unused_imports)]
18use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
19#[allow(unused_imports)]
20use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
21#[allow(unused_imports)]
22use std::ffi::{
23    c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
24};
25
26#[allow(unused_imports)]
27use glib::{gboolean, gconstpointer, gpointer, GType};
28
29// Enums
30pub type graphene_euler_order_t = c_int;
31pub const GRAPHENE_EULER_ORDER_DEFAULT: graphene_euler_order_t = -1;
32pub const GRAPHENE_EULER_ORDER_XYZ: graphene_euler_order_t = 0;
33pub const GRAPHENE_EULER_ORDER_YZX: graphene_euler_order_t = 1;
34pub const GRAPHENE_EULER_ORDER_ZXY: graphene_euler_order_t = 2;
35pub const GRAPHENE_EULER_ORDER_XZY: graphene_euler_order_t = 3;
36pub const GRAPHENE_EULER_ORDER_YXZ: graphene_euler_order_t = 4;
37pub const GRAPHENE_EULER_ORDER_ZYX: graphene_euler_order_t = 5;
38pub const GRAPHENE_EULER_ORDER_SXYZ: graphene_euler_order_t = 6;
39pub const GRAPHENE_EULER_ORDER_SXYX: graphene_euler_order_t = 7;
40pub const GRAPHENE_EULER_ORDER_SXZY: graphene_euler_order_t = 8;
41pub const GRAPHENE_EULER_ORDER_SXZX: graphene_euler_order_t = 9;
42pub const GRAPHENE_EULER_ORDER_SYZX: graphene_euler_order_t = 10;
43pub const GRAPHENE_EULER_ORDER_SYZY: graphene_euler_order_t = 11;
44pub const GRAPHENE_EULER_ORDER_SYXZ: graphene_euler_order_t = 12;
45pub const GRAPHENE_EULER_ORDER_SYXY: graphene_euler_order_t = 13;
46pub const GRAPHENE_EULER_ORDER_SZXY: graphene_euler_order_t = 14;
47pub const GRAPHENE_EULER_ORDER_SZXZ: graphene_euler_order_t = 15;
48pub const GRAPHENE_EULER_ORDER_SZYX: graphene_euler_order_t = 16;
49pub const GRAPHENE_EULER_ORDER_SZYZ: graphene_euler_order_t = 17;
50pub const GRAPHENE_EULER_ORDER_RZYX: graphene_euler_order_t = 18;
51pub const GRAPHENE_EULER_ORDER_RXYX: graphene_euler_order_t = 19;
52pub const GRAPHENE_EULER_ORDER_RYZX: graphene_euler_order_t = 20;
53pub const GRAPHENE_EULER_ORDER_RXZX: graphene_euler_order_t = 21;
54pub const GRAPHENE_EULER_ORDER_RXZY: graphene_euler_order_t = 22;
55pub const GRAPHENE_EULER_ORDER_RYZY: graphene_euler_order_t = 23;
56pub const GRAPHENE_EULER_ORDER_RZXY: graphene_euler_order_t = 24;
57pub const GRAPHENE_EULER_ORDER_RYXY: graphene_euler_order_t = 25;
58pub const GRAPHENE_EULER_ORDER_RYXZ: graphene_euler_order_t = 26;
59pub const GRAPHENE_EULER_ORDER_RZXZ: graphene_euler_order_t = 27;
60pub const GRAPHENE_EULER_ORDER_RXYZ: graphene_euler_order_t = 28;
61pub const GRAPHENE_EULER_ORDER_RZYZ: graphene_euler_order_t = 29;
62
63pub type graphene_ray_intersection_kind_t = c_int;
64pub const GRAPHENE_RAY_INTERSECTION_KIND_NONE: graphene_ray_intersection_kind_t = 0;
65pub const GRAPHENE_RAY_INTERSECTION_KIND_ENTER: graphene_ray_intersection_kind_t = 1;
66pub const GRAPHENE_RAY_INTERSECTION_KIND_LEAVE: graphene_ray_intersection_kind_t = 2;
67
68// Constants
69pub const GRAPHENE_VEC2_LEN: c_int = 2;
70pub const GRAPHENE_VEC3_LEN: c_int = 3;
71pub const GRAPHENE_VEC4_LEN: c_int = 4;
72
73// Records
74#[derive(Copy, Clone)]
75#[repr(C)]
76pub struct graphene_box2d_t {
77    pub minmax: graphene_vec4_t,
78}
79
80impl ::std::fmt::Debug for graphene_box2d_t {
81    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
82        f.debug_struct(&format!("graphene_box2d_t @ {self:p}"))
83            .finish()
84    }
85}
86
87#[derive(Copy, Clone)]
88#[repr(C)]
89pub struct graphene_box_t {
90    pub min: graphene_vec3_t,
91    pub max: graphene_vec3_t,
92}
93
94impl ::std::fmt::Debug for graphene_box_t {
95    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
96        f.debug_struct(&format!("graphene_box_t @ {self:p}"))
97            .finish()
98    }
99}
100
101#[derive(Copy, Clone)]
102#[repr(C)]
103pub struct graphene_euler_t {
104    pub angles: graphene_vec3_t,
105    pub order: graphene_euler_order_t,
106}
107
108impl ::std::fmt::Debug for graphene_euler_t {
109    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
110        f.debug_struct(&format!("graphene_euler_t @ {self:p}"))
111            .finish()
112    }
113}
114
115#[derive(Copy, Clone)]
116#[repr(C)]
117pub struct graphene_frustum_t {
118    pub planes: [graphene_plane_t; 6],
119}
120
121impl ::std::fmt::Debug for graphene_frustum_t {
122    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
123        f.debug_struct(&format!("graphene_frustum_t @ {self:p}"))
124            .finish()
125    }
126}
127
128#[repr(align(16))]
129#[derive(Copy, Clone)]
130#[repr(C)]
131pub struct graphene_matrix_t {
132    pub value: graphene_simd4x4f_t,
133}
134
135impl ::std::fmt::Debug for graphene_matrix_t {
136    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
137        f.debug_struct(&format!("graphene_matrix_t @ {self:p}"))
138            .finish()
139    }
140}
141
142#[derive(Copy, Clone)]
143#[repr(C)]
144pub struct graphene_plane_t {
145    pub normal: graphene_vec3_t,
146    pub constant: c_float,
147}
148
149impl ::std::fmt::Debug for graphene_plane_t {
150    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
151        f.debug_struct(&format!("graphene_plane_t @ {self:p}"))
152            .finish()
153    }
154}
155
156#[derive(Copy, Clone)]
157#[repr(C)]
158pub struct graphene_point3d_t {
159    pub x: c_float,
160    pub y: c_float,
161    pub z: c_float,
162}
163
164impl ::std::fmt::Debug for graphene_point3d_t {
165    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
166        f.debug_struct(&format!("graphene_point3d_t @ {self:p}"))
167            .field("x", &self.x)
168            .field("y", &self.y)
169            .field("z", &self.z)
170            .finish()
171    }
172}
173
174#[derive(Copy, Clone)]
175#[repr(C)]
176pub struct graphene_point_t {
177    pub x: c_float,
178    pub y: c_float,
179}
180
181impl ::std::fmt::Debug for graphene_point_t {
182    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
183        f.debug_struct(&format!("graphene_point_t @ {self:p}"))
184            .field("x", &self.x)
185            .field("y", &self.y)
186            .finish()
187    }
188}
189
190#[derive(Copy, Clone)]
191#[repr(C)]
192pub struct graphene_quad_t {
193    pub points: [graphene_point_t; 4],
194}
195
196impl ::std::fmt::Debug for graphene_quad_t {
197    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
198        f.debug_struct(&format!("graphene_quad_t @ {self:p}"))
199            .finish()
200    }
201}
202
203#[derive(Copy, Clone)]
204#[repr(C)]
205pub struct graphene_quaternion_t {
206    pub x: c_float,
207    pub y: c_float,
208    pub z: c_float,
209    pub w: c_float,
210}
211
212impl ::std::fmt::Debug for graphene_quaternion_t {
213    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
214        f.debug_struct(&format!("graphene_quaternion_t @ {self:p}"))
215            .finish()
216    }
217}
218
219#[derive(Copy, Clone)]
220#[repr(C)]
221pub struct graphene_ray_t {
222    pub origin: graphene_vec3_t,
223    pub direction: graphene_vec3_t,
224}
225
226impl ::std::fmt::Debug for graphene_ray_t {
227    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
228        f.debug_struct(&format!("graphene_ray_t @ {self:p}"))
229            .finish()
230    }
231}
232
233#[derive(Copy, Clone)]
234#[repr(C)]
235pub struct graphene_rect_t {
236    pub origin: graphene_point_t,
237    pub size: graphene_size_t,
238}
239
240impl ::std::fmt::Debug for graphene_rect_t {
241    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
242        f.debug_struct(&format!("graphene_rect_t @ {self:p}"))
243            .field("origin", &self.origin)
244            .field("size", &self.size)
245            .finish()
246    }
247}
248
249#[repr(align(16))]
250#[derive(Copy, Clone)]
251#[repr(C)]
252pub struct graphene_simd4f_t {
253    pub x: c_float,
254    pub y: c_float,
255    pub z: c_float,
256    pub w: c_float,
257}
258
259impl ::std::fmt::Debug for graphene_simd4f_t {
260    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
261        f.debug_struct(&format!("graphene_simd4f_t @ {self:p}"))
262            .finish()
263    }
264}
265
266#[repr(align(16))]
267#[derive(Copy, Clone)]
268#[repr(C)]
269pub struct graphene_simd4x4f_t {
270    pub x: graphene_simd4f_t,
271    pub y: graphene_simd4f_t,
272    pub z: graphene_simd4f_t,
273    pub w: graphene_simd4f_t,
274}
275
276impl ::std::fmt::Debug for graphene_simd4x4f_t {
277    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
278        f.debug_struct(&format!("graphene_simd4x4f_t @ {self:p}"))
279            .finish()
280    }
281}
282
283#[derive(Copy, Clone)]
284#[repr(C)]
285pub struct graphene_size_t {
286    pub width: c_float,
287    pub height: c_float,
288}
289
290impl ::std::fmt::Debug for graphene_size_t {
291    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
292        f.debug_struct(&format!("graphene_size_t @ {self:p}"))
293            .field("width", &self.width)
294            .field("height", &self.height)
295            .finish()
296    }
297}
298
299#[derive(Copy, Clone)]
300#[repr(C)]
301pub struct graphene_sphere_t {
302    pub center: graphene_vec3_t,
303    pub radius: c_float,
304}
305
306impl ::std::fmt::Debug for graphene_sphere_t {
307    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
308        f.debug_struct(&format!("graphene_sphere_t @ {self:p}"))
309            .finish()
310    }
311}
312
313#[derive(Copy, Clone)]
314#[repr(C)]
315pub struct graphene_triangle_t {
316    pub a: graphene_vec3_t,
317    pub b: graphene_vec3_t,
318    pub c: graphene_vec3_t,
319}
320
321impl ::std::fmt::Debug for graphene_triangle_t {
322    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
323        f.debug_struct(&format!("graphene_triangle_t @ {self:p}"))
324            .finish()
325    }
326}
327
328#[repr(align(16))]
329#[derive(Copy, Clone)]
330#[repr(C)]
331pub struct graphene_vec2_t {
332    pub value: graphene_simd4f_t,
333}
334
335impl ::std::fmt::Debug for graphene_vec2_t {
336    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
337        f.debug_struct(&format!("graphene_vec2_t @ {self:p}"))
338            .finish()
339    }
340}
341
342#[repr(align(16))]
343#[derive(Copy, Clone)]
344#[repr(C)]
345pub struct graphene_vec3_t {
346    pub value: graphene_simd4f_t,
347}
348
349impl ::std::fmt::Debug for graphene_vec3_t {
350    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
351        f.debug_struct(&format!("graphene_vec3_t @ {self:p}"))
352            .finish()
353    }
354}
355
356#[repr(align(16))]
357#[derive(Copy, Clone)]
358#[repr(C)]
359pub struct graphene_vec4_t {
360    pub value: graphene_simd4f_t,
361}
362
363impl ::std::fmt::Debug for graphene_vec4_t {
364    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
365        f.debug_struct(&format!("graphene_vec4_t @ {self:p}"))
366            .finish()
367    }
368}
369
370extern "C" {
371
372    //=========================================================================
373    // graphene_box2d_t
374    //=========================================================================
375    #[cfg(feature = "v1_12")]
376    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
377    pub fn graphene_box2d_get_type() -> GType;
378    #[cfg(feature = "v1_12")]
379    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
380    pub fn graphene_box2d_alloc() -> *mut graphene_box2d_t;
381    #[cfg(feature = "v1_12")]
382    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
383    pub fn graphene_box2d_contains_box(
384        a: *const graphene_box2d_t,
385        b: *const graphene_box2d_t,
386    ) -> bool;
387    #[cfg(feature = "v1_12")]
388    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
389    pub fn graphene_box2d_contains_point(
390        box_: *const graphene_box2d_t,
391        point: *const graphene_point_t,
392    ) -> bool;
393    #[cfg(feature = "v1_12")]
394    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
395    pub fn graphene_box2d_contains_rect(
396        box_: *const graphene_box2d_t,
397        rect: *const graphene_rect_t,
398    ) -> bool;
399    #[cfg(feature = "v1_12")]
400    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
401    pub fn graphene_box2d_equal(a: *const graphene_box2d_t, b: *const graphene_box2d_t) -> bool;
402    #[cfg(feature = "v1_12")]
403    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
404    pub fn graphene_box2d_expand(
405        box_: *const graphene_box2d_t,
406        point: *const graphene_point_t,
407        res: *mut graphene_box2d_t,
408    );
409    #[cfg(feature = "v1_12")]
410    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
411    pub fn graphene_box2d_expand_scalar(
412        box_: *const graphene_box2d_t,
413        scalar: c_float,
414        res: *mut graphene_box2d_t,
415    );
416    #[cfg(feature = "v1_12")]
417    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
418    pub fn graphene_box2d_expand_vec2(
419        box_: *const graphene_box2d_t,
420        vec: *const graphene_vec2_t,
421        res: *mut graphene_box2d_t,
422    );
423    #[cfg(feature = "v1_12")]
424    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
425    pub fn graphene_box2d_free(box_: *mut graphene_box2d_t);
426    #[cfg(feature = "v1_12")]
427    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
428    pub fn graphene_box2d_get_center(box_: *const graphene_box2d_t, center: *mut graphene_point_t);
429    #[cfg(feature = "v1_12")]
430    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
431    pub fn graphene_box2d_get_height(box_: *const graphene_box2d_t) -> c_float;
432    #[cfg(feature = "v1_12")]
433    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
434    pub fn graphene_box2d_get_max(box_: *const graphene_box2d_t, max: *mut graphene_point_t);
435    #[cfg(feature = "v1_12")]
436    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
437    pub fn graphene_box2d_get_min(box_: *const graphene_box2d_t, min: *mut graphene_point_t);
438    #[cfg(feature = "v1_12")]
439    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
440    pub fn graphene_box2d_get_minmax(
441        box_: *const graphene_box2d_t,
442        min: *mut graphene_point_t,
443        max: *mut graphene_point_t,
444    );
445    #[cfg(feature = "v1_12")]
446    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
447    pub fn graphene_box2d_get_size(box_: *const graphene_box2d_t, size: *mut graphene_vec2_t);
448    #[cfg(feature = "v1_12")]
449    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
450    pub fn graphene_box2d_get_vertices(
451        box_: *const graphene_box2d_t,
452        vertices: *mut [graphene_vec2_t; 4],
453    );
454    #[cfg(feature = "v1_12")]
455    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
456    pub fn graphene_box2d_get_width(box_: *const graphene_box2d_t) -> c_float;
457    #[cfg(feature = "v1_12")]
458    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
459    pub fn graphene_box2d_init(
460        box_: *mut graphene_box2d_t,
461        min: *const graphene_point_t,
462        max: *const graphene_point_t,
463    ) -> *mut graphene_box2d_t;
464    #[cfg(feature = "v1_12")]
465    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
466    pub fn graphene_box2d_init_from_box(
467        box_: *mut graphene_box2d_t,
468        src: *const graphene_box2d_t,
469    ) -> *mut graphene_box2d_t;
470    #[cfg(feature = "v1_12")]
471    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
472    pub fn graphene_box2d_init_from_points(
473        box_: *mut graphene_box2d_t,
474        n_points: c_uint,
475        points: *const graphene_point_t,
476    ) -> *mut graphene_box2d_t;
477    #[cfg(feature = "v1_12")]
478    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
479    pub fn graphene_box2d_init_from_rect(
480        box_: *mut graphene_box2d_t,
481        src: *const graphene_rect_t,
482    ) -> *mut graphene_box2d_t;
483    #[cfg(feature = "v1_12")]
484    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
485    pub fn graphene_box2d_init_from_vec2(
486        box_: *mut graphene_box2d_t,
487        min: *const graphene_vec2_t,
488        max: *const graphene_vec2_t,
489    ) -> *mut graphene_box2d_t;
490    #[cfg(feature = "v1_12")]
491    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
492    pub fn graphene_box2d_init_from_vectors(
493        box_: *mut graphene_box2d_t,
494        n_vectors: c_uint,
495        vectors: *const graphene_vec2_t,
496    ) -> *mut graphene_box2d_t;
497    #[cfg(feature = "v1_12")]
498    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
499    pub fn graphene_box2d_intersection(
500        a: *const graphene_box2d_t,
501        b: *const graphene_box2d_t,
502        res: *mut graphene_box2d_t,
503    ) -> bool;
504    #[cfg(feature = "v1_12")]
505    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
506    pub fn graphene_box2d_intersects(
507        a: *const graphene_box2d_t,
508        b: *const graphene_box2d_t,
509    ) -> bool;
510    #[cfg(feature = "v1_12")]
511    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
512    pub fn graphene_box2d_scale_offset(
513        box_: *const graphene_box2d_t,
514        scale: *const graphene_vec2_t,
515        offset: *const graphene_point_t,
516        res: *mut graphene_box2d_t,
517    );
518    #[cfg(feature = "v1_12")]
519    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
520    pub fn graphene_box2d_to_float(box_: *const graphene_box2d_t, v: *mut [c_float; 4]);
521    #[cfg(feature = "v1_12")]
522    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
523    pub fn graphene_box2d_to_rect(box_: *const graphene_box2d_t, rect: *mut graphene_rect_t);
524    #[cfg(feature = "v1_12")]
525    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
526    pub fn graphene_box2d_union(
527        a: *const graphene_box2d_t,
528        b: *const graphene_box2d_t,
529        res: *mut graphene_box2d_t,
530    );
531    #[cfg(feature = "v1_12")]
532    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
533    pub fn graphene_box2d_empty() -> *const graphene_box2d_t;
534    #[cfg(feature = "v1_12")]
535    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
536    pub fn graphene_box2d_infinite() -> *const graphene_box2d_t;
537    #[cfg(feature = "v1_12")]
538    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
539    pub fn graphene_box2d_minus_one() -> *const graphene_box2d_t;
540    #[cfg(feature = "v1_12")]
541    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
542    pub fn graphene_box2d_one() -> *const graphene_box2d_t;
543    #[cfg(feature = "v1_12")]
544    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
545    pub fn graphene_box2d_one_minus_one() -> *const graphene_box2d_t;
546    #[cfg(feature = "v1_12")]
547    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
548    pub fn graphene_box2d_zero() -> *const graphene_box2d_t;
549
550    //=========================================================================
551    // graphene_box_t
552    //=========================================================================
553    pub fn graphene_box_get_type() -> GType;
554    pub fn graphene_box_alloc() -> *mut graphene_box_t;
555    pub fn graphene_box_contains_box(a: *const graphene_box_t, b: *const graphene_box_t) -> bool;
556    pub fn graphene_box_contains_point(
557        box_: *const graphene_box_t,
558        point: *const graphene_point3d_t,
559    ) -> bool;
560    pub fn graphene_box_equal(a: *const graphene_box_t, b: *const graphene_box_t) -> bool;
561    pub fn graphene_box_expand(
562        box_: *const graphene_box_t,
563        point: *const graphene_point3d_t,
564        res: *mut graphene_box_t,
565    );
566    pub fn graphene_box_expand_scalar(
567        box_: *const graphene_box_t,
568        scalar: c_float,
569        res: *mut graphene_box_t,
570    );
571    pub fn graphene_box_expand_vec3(
572        box_: *const graphene_box_t,
573        vec: *const graphene_vec3_t,
574        res: *mut graphene_box_t,
575    );
576    pub fn graphene_box_free(box_: *mut graphene_box_t);
577    pub fn graphene_box_get_bounding_sphere(
578        box_: *const graphene_box_t,
579        sphere: *mut graphene_sphere_t,
580    );
581    pub fn graphene_box_get_center(box_: *const graphene_box_t, center: *mut graphene_point3d_t);
582    pub fn graphene_box_get_depth(box_: *const graphene_box_t) -> c_float;
583    pub fn graphene_box_get_height(box_: *const graphene_box_t) -> c_float;
584    pub fn graphene_box_get_max(box_: *const graphene_box_t, max: *mut graphene_point3d_t);
585    pub fn graphene_box_get_min(box_: *const graphene_box_t, min: *mut graphene_point3d_t);
586    #[cfg(feature = "v1_12")]
587    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
588    pub fn graphene_box_get_minmax(
589        box_: *const graphene_box_t,
590        min: *mut graphene_point3d_t,
591        max: *mut graphene_point3d_t,
592    );
593    pub fn graphene_box_get_size(box_: *const graphene_box_t, size: *mut graphene_vec3_t);
594    pub fn graphene_box_get_vertices(
595        box_: *const graphene_box_t,
596        vertices: *mut [graphene_vec3_t; 8],
597    );
598    pub fn graphene_box_get_width(box_: *const graphene_box_t) -> c_float;
599    pub fn graphene_box_init(
600        box_: *mut graphene_box_t,
601        min: *const graphene_point3d_t,
602        max: *const graphene_point3d_t,
603    ) -> *mut graphene_box_t;
604    pub fn graphene_box_init_from_box(
605        box_: *mut graphene_box_t,
606        src: *const graphene_box_t,
607    ) -> *mut graphene_box_t;
608    pub fn graphene_box_init_from_points(
609        box_: *mut graphene_box_t,
610        n_points: c_uint,
611        points: *const graphene_point3d_t,
612    ) -> *mut graphene_box_t;
613    pub fn graphene_box_init_from_vec3(
614        box_: *mut graphene_box_t,
615        min: *const graphene_vec3_t,
616        max: *const graphene_vec3_t,
617    ) -> *mut graphene_box_t;
618    pub fn graphene_box_init_from_vectors(
619        box_: *mut graphene_box_t,
620        n_vectors: c_uint,
621        vectors: *const graphene_vec3_t,
622    ) -> *mut graphene_box_t;
623    pub fn graphene_box_intersection(
624        a: *const graphene_box_t,
625        b: *const graphene_box_t,
626        res: *mut graphene_box_t,
627    ) -> bool;
628    pub fn graphene_box_union(
629        a: *const graphene_box_t,
630        b: *const graphene_box_t,
631        res: *mut graphene_box_t,
632    );
633    pub fn graphene_box_empty() -> *const graphene_box_t;
634    pub fn graphene_box_infinite() -> *const graphene_box_t;
635    pub fn graphene_box_minus_one() -> *const graphene_box_t;
636    pub fn graphene_box_one() -> *const graphene_box_t;
637    pub fn graphene_box_one_minus_one() -> *const graphene_box_t;
638    pub fn graphene_box_zero() -> *const graphene_box_t;
639
640    //=========================================================================
641    // graphene_euler_t
642    //=========================================================================
643    pub fn graphene_euler_get_type() -> GType;
644    pub fn graphene_euler_alloc() -> *mut graphene_euler_t;
645    pub fn graphene_euler_equal(a: *const graphene_euler_t, b: *const graphene_euler_t) -> bool;
646    pub fn graphene_euler_free(e: *mut graphene_euler_t);
647    pub fn graphene_euler_get_alpha(e: *const graphene_euler_t) -> c_float;
648    pub fn graphene_euler_get_beta(e: *const graphene_euler_t) -> c_float;
649    pub fn graphene_euler_get_gamma(e: *const graphene_euler_t) -> c_float;
650    pub fn graphene_euler_get_order(e: *const graphene_euler_t) -> graphene_euler_order_t;
651    pub fn graphene_euler_get_x(e: *const graphene_euler_t) -> c_float;
652    pub fn graphene_euler_get_y(e: *const graphene_euler_t) -> c_float;
653    pub fn graphene_euler_get_z(e: *const graphene_euler_t) -> c_float;
654    pub fn graphene_euler_init(
655        e: *mut graphene_euler_t,
656        x: c_float,
657        y: c_float,
658        z: c_float,
659    ) -> *mut graphene_euler_t;
660    pub fn graphene_euler_init_from_euler(
661        e: *mut graphene_euler_t,
662        src: *const graphene_euler_t,
663    ) -> *mut graphene_euler_t;
664    pub fn graphene_euler_init_from_matrix(
665        e: *mut graphene_euler_t,
666        m: *const graphene_matrix_t,
667        order: graphene_euler_order_t,
668    ) -> *mut graphene_euler_t;
669    pub fn graphene_euler_init_from_quaternion(
670        e: *mut graphene_euler_t,
671        q: *const graphene_quaternion_t,
672        order: graphene_euler_order_t,
673    ) -> *mut graphene_euler_t;
674    pub fn graphene_euler_init_from_radians(
675        e: *mut graphene_euler_t,
676        x: c_float,
677        y: c_float,
678        z: c_float,
679        order: graphene_euler_order_t,
680    ) -> *mut graphene_euler_t;
681    pub fn graphene_euler_init_from_vec3(
682        e: *mut graphene_euler_t,
683        v: *const graphene_vec3_t,
684        order: graphene_euler_order_t,
685    ) -> *mut graphene_euler_t;
686    pub fn graphene_euler_init_with_order(
687        e: *mut graphene_euler_t,
688        x: c_float,
689        y: c_float,
690        z: c_float,
691        order: graphene_euler_order_t,
692    ) -> *mut graphene_euler_t;
693    pub fn graphene_euler_reorder(
694        e: *const graphene_euler_t,
695        order: graphene_euler_order_t,
696        res: *mut graphene_euler_t,
697    );
698    pub fn graphene_euler_to_matrix(e: *const graphene_euler_t, res: *mut graphene_matrix_t);
699    pub fn graphene_euler_to_quaternion(
700        e: *const graphene_euler_t,
701        res: *mut graphene_quaternion_t,
702    );
703    pub fn graphene_euler_to_vec3(e: *const graphene_euler_t, res: *mut graphene_vec3_t);
704
705    //=========================================================================
706    // graphene_frustum_t
707    //=========================================================================
708    pub fn graphene_frustum_get_type() -> GType;
709    pub fn graphene_frustum_alloc() -> *mut graphene_frustum_t;
710    pub fn graphene_frustum_contains_point(
711        f: *const graphene_frustum_t,
712        point: *const graphene_point3d_t,
713    ) -> bool;
714    pub fn graphene_frustum_equal(
715        a: *const graphene_frustum_t,
716        b: *const graphene_frustum_t,
717    ) -> bool;
718    pub fn graphene_frustum_free(f: *mut graphene_frustum_t);
719    pub fn graphene_frustum_get_planes(
720        f: *const graphene_frustum_t,
721        planes: *mut [graphene_plane_t; 6],
722    );
723    pub fn graphene_frustum_init(
724        f: *mut graphene_frustum_t,
725        p0: *const graphene_plane_t,
726        p1: *const graphene_plane_t,
727        p2: *const graphene_plane_t,
728        p3: *const graphene_plane_t,
729        p4: *const graphene_plane_t,
730        p5: *const graphene_plane_t,
731    ) -> *mut graphene_frustum_t;
732    pub fn graphene_frustum_init_from_frustum(
733        f: *mut graphene_frustum_t,
734        src: *const graphene_frustum_t,
735    ) -> *mut graphene_frustum_t;
736    pub fn graphene_frustum_init_from_matrix(
737        f: *mut graphene_frustum_t,
738        matrix: *const graphene_matrix_t,
739    ) -> *mut graphene_frustum_t;
740    pub fn graphene_frustum_intersects_box(
741        f: *const graphene_frustum_t,
742        box_: *const graphene_box_t,
743    ) -> bool;
744    pub fn graphene_frustum_intersects_sphere(
745        f: *const graphene_frustum_t,
746        sphere: *const graphene_sphere_t,
747    ) -> bool;
748
749    //=========================================================================
750    // graphene_matrix_t
751    //=========================================================================
752    pub fn graphene_matrix_get_type() -> GType;
753    pub fn graphene_matrix_alloc() -> *mut graphene_matrix_t;
754    pub fn graphene_matrix_decompose(
755        m: *const graphene_matrix_t,
756        translate: *mut graphene_vec3_t,
757        scale: *mut graphene_vec3_t,
758        rotate: *mut graphene_quaternion_t,
759        shear: *mut graphene_vec3_t,
760        perspective: *mut graphene_vec4_t,
761    ) -> bool;
762    pub fn graphene_matrix_determinant(m: *const graphene_matrix_t) -> c_float;
763    pub fn graphene_matrix_equal(a: *const graphene_matrix_t, b: *const graphene_matrix_t) -> bool;
764    pub fn graphene_matrix_equal_fast(
765        a: *const graphene_matrix_t,
766        b: *const graphene_matrix_t,
767    ) -> bool;
768    pub fn graphene_matrix_free(m: *mut graphene_matrix_t);
769    pub fn graphene_matrix_get_row(
770        m: *const graphene_matrix_t,
771        index_: c_uint,
772        res: *mut graphene_vec4_t,
773    );
774    pub fn graphene_matrix_get_value(
775        m: *const graphene_matrix_t,
776        row: c_uint,
777        col: c_uint,
778    ) -> c_float;
779    pub fn graphene_matrix_get_x_scale(m: *const graphene_matrix_t) -> c_float;
780    pub fn graphene_matrix_get_x_translation(m: *const graphene_matrix_t) -> c_float;
781    pub fn graphene_matrix_get_y_scale(m: *const graphene_matrix_t) -> c_float;
782    pub fn graphene_matrix_get_y_translation(m: *const graphene_matrix_t) -> c_float;
783    pub fn graphene_matrix_get_z_scale(m: *const graphene_matrix_t) -> c_float;
784    pub fn graphene_matrix_get_z_translation(m: *const graphene_matrix_t) -> c_float;
785    pub fn graphene_matrix_init_from_2d(
786        m: *mut graphene_matrix_t,
787        xx: c_double,
788        yx: c_double,
789        xy: c_double,
790        yy: c_double,
791        x_0: c_double,
792        y_0: c_double,
793    ) -> *mut graphene_matrix_t;
794    pub fn graphene_matrix_init_from_float(
795        m: *mut graphene_matrix_t,
796        v: *const [c_float; 16],
797    ) -> *mut graphene_matrix_t;
798    pub fn graphene_matrix_init_from_matrix(
799        m: *mut graphene_matrix_t,
800        src: *const graphene_matrix_t,
801    ) -> *mut graphene_matrix_t;
802    pub fn graphene_matrix_init_from_vec4(
803        m: *mut graphene_matrix_t,
804        v0: *const graphene_vec4_t,
805        v1: *const graphene_vec4_t,
806        v2: *const graphene_vec4_t,
807        v3: *const graphene_vec4_t,
808    ) -> *mut graphene_matrix_t;
809    pub fn graphene_matrix_init_frustum(
810        m: *mut graphene_matrix_t,
811        left: c_float,
812        right: c_float,
813        bottom: c_float,
814        top: c_float,
815        z_near: c_float,
816        z_far: c_float,
817    ) -> *mut graphene_matrix_t;
818    pub fn graphene_matrix_init_identity(m: *mut graphene_matrix_t) -> *mut graphene_matrix_t;
819    pub fn graphene_matrix_init_look_at(
820        m: *mut graphene_matrix_t,
821        eye: *const graphene_vec3_t,
822        center: *const graphene_vec3_t,
823        up: *const graphene_vec3_t,
824    ) -> *mut graphene_matrix_t;
825    pub fn graphene_matrix_init_ortho(
826        m: *mut graphene_matrix_t,
827        left: c_float,
828        right: c_float,
829        top: c_float,
830        bottom: c_float,
831        z_near: c_float,
832        z_far: c_float,
833    ) -> *mut graphene_matrix_t;
834    pub fn graphene_matrix_init_perspective(
835        m: *mut graphene_matrix_t,
836        fovy: c_float,
837        aspect: c_float,
838        z_near: c_float,
839        z_far: c_float,
840    ) -> *mut graphene_matrix_t;
841    pub fn graphene_matrix_init_rotate(
842        m: *mut graphene_matrix_t,
843        angle: c_float,
844        axis: *const graphene_vec3_t,
845    ) -> *mut graphene_matrix_t;
846    pub fn graphene_matrix_init_scale(
847        m: *mut graphene_matrix_t,
848        x: c_float,
849        y: c_float,
850        z: c_float,
851    ) -> *mut graphene_matrix_t;
852    pub fn graphene_matrix_init_skew(
853        m: *mut graphene_matrix_t,
854        x_skew: c_float,
855        y_skew: c_float,
856    ) -> *mut graphene_matrix_t;
857    pub fn graphene_matrix_init_translate(
858        m: *mut graphene_matrix_t,
859        p: *const graphene_point3d_t,
860    ) -> *mut graphene_matrix_t;
861    pub fn graphene_matrix_interpolate(
862        a: *const graphene_matrix_t,
863        b: *const graphene_matrix_t,
864        factor: c_double,
865        res: *mut graphene_matrix_t,
866    );
867    pub fn graphene_matrix_inverse(
868        m: *const graphene_matrix_t,
869        res: *mut graphene_matrix_t,
870    ) -> bool;
871    pub fn graphene_matrix_is_2d(m: *const graphene_matrix_t) -> bool;
872    pub fn graphene_matrix_is_backface_visible(m: *const graphene_matrix_t) -> bool;
873    pub fn graphene_matrix_is_identity(m: *const graphene_matrix_t) -> bool;
874    pub fn graphene_matrix_is_singular(m: *const graphene_matrix_t) -> bool;
875    pub fn graphene_matrix_multiply(
876        a: *const graphene_matrix_t,
877        b: *const graphene_matrix_t,
878        res: *mut graphene_matrix_t,
879    );
880    pub fn graphene_matrix_near(
881        a: *const graphene_matrix_t,
882        b: *const graphene_matrix_t,
883        epsilon: c_float,
884    ) -> bool;
885    pub fn graphene_matrix_normalize(m: *const graphene_matrix_t, res: *mut graphene_matrix_t);
886    pub fn graphene_matrix_perspective(
887        m: *const graphene_matrix_t,
888        depth: c_float,
889        res: *mut graphene_matrix_t,
890    );
891    pub fn graphene_matrix_print(m: *const graphene_matrix_t);
892    pub fn graphene_matrix_project_point(
893        m: *const graphene_matrix_t,
894        p: *const graphene_point_t,
895        res: *mut graphene_point_t,
896    );
897    pub fn graphene_matrix_project_rect(
898        m: *const graphene_matrix_t,
899        r: *const graphene_rect_t,
900        res: *mut graphene_quad_t,
901    );
902    pub fn graphene_matrix_project_rect_bounds(
903        m: *const graphene_matrix_t,
904        r: *const graphene_rect_t,
905        res: *mut graphene_rect_t,
906    );
907    pub fn graphene_matrix_rotate(
908        m: *mut graphene_matrix_t,
909        angle: c_float,
910        axis: *const graphene_vec3_t,
911    );
912    pub fn graphene_matrix_rotate_euler(m: *mut graphene_matrix_t, e: *const graphene_euler_t);
913    pub fn graphene_matrix_rotate_quaternion(
914        m: *mut graphene_matrix_t,
915        q: *const graphene_quaternion_t,
916    );
917    pub fn graphene_matrix_rotate_x(m: *mut graphene_matrix_t, angle: c_float);
918    pub fn graphene_matrix_rotate_y(m: *mut graphene_matrix_t, angle: c_float);
919    pub fn graphene_matrix_rotate_z(m: *mut graphene_matrix_t, angle: c_float);
920    pub fn graphene_matrix_scale(
921        m: *mut graphene_matrix_t,
922        factor_x: c_float,
923        factor_y: c_float,
924        factor_z: c_float,
925    );
926    pub fn graphene_matrix_skew_xy(m: *mut graphene_matrix_t, factor: c_float);
927    pub fn graphene_matrix_skew_xz(m: *mut graphene_matrix_t, factor: c_float);
928    pub fn graphene_matrix_skew_yz(m: *mut graphene_matrix_t, factor: c_float);
929    pub fn graphene_matrix_to_2d(
930        m: *const graphene_matrix_t,
931        xx: *mut c_double,
932        yx: *mut c_double,
933        xy: *mut c_double,
934        yy: *mut c_double,
935        x_0: *mut c_double,
936        y_0: *mut c_double,
937    ) -> bool;
938    pub fn graphene_matrix_to_float(m: *const graphene_matrix_t, v: *mut [c_float; 16]);
939    pub fn graphene_matrix_transform_bounds(
940        m: *const graphene_matrix_t,
941        r: *const graphene_rect_t,
942        res: *mut graphene_rect_t,
943    );
944    pub fn graphene_matrix_transform_box(
945        m: *const graphene_matrix_t,
946        b: *const graphene_box_t,
947        res: *mut graphene_box_t,
948    );
949    pub fn graphene_matrix_transform_point(
950        m: *const graphene_matrix_t,
951        p: *const graphene_point_t,
952        res: *mut graphene_point_t,
953    );
954    pub fn graphene_matrix_transform_point3d(
955        m: *const graphene_matrix_t,
956        p: *const graphene_point3d_t,
957        res: *mut graphene_point3d_t,
958    );
959    pub fn graphene_matrix_transform_ray(
960        m: *const graphene_matrix_t,
961        r: *const graphene_ray_t,
962        res: *mut graphene_ray_t,
963    );
964    pub fn graphene_matrix_transform_rect(
965        m: *const graphene_matrix_t,
966        r: *const graphene_rect_t,
967        res: *mut graphene_quad_t,
968    );
969    pub fn graphene_matrix_transform_sphere(
970        m: *const graphene_matrix_t,
971        s: *const graphene_sphere_t,
972        res: *mut graphene_sphere_t,
973    );
974    pub fn graphene_matrix_transform_vec3(
975        m: *const graphene_matrix_t,
976        v: *const graphene_vec3_t,
977        res: *mut graphene_vec3_t,
978    );
979    pub fn graphene_matrix_transform_vec4(
980        m: *const graphene_matrix_t,
981        v: *const graphene_vec4_t,
982        res: *mut graphene_vec4_t,
983    );
984    pub fn graphene_matrix_translate(m: *mut graphene_matrix_t, pos: *const graphene_point3d_t);
985    pub fn graphene_matrix_transpose(m: *const graphene_matrix_t, res: *mut graphene_matrix_t);
986    pub fn graphene_matrix_unproject_point3d(
987        projection: *const graphene_matrix_t,
988        modelview: *const graphene_matrix_t,
989        point: *const graphene_point3d_t,
990        res: *mut graphene_point3d_t,
991    );
992    pub fn graphene_matrix_untransform_bounds(
993        m: *const graphene_matrix_t,
994        r: *const graphene_rect_t,
995        bounds: *const graphene_rect_t,
996        res: *mut graphene_rect_t,
997    );
998    pub fn graphene_matrix_untransform_point(
999        m: *const graphene_matrix_t,
1000        p: *const graphene_point_t,
1001        bounds: *const graphene_rect_t,
1002        res: *mut graphene_point_t,
1003    ) -> bool;
1004
1005    //=========================================================================
1006    // graphene_plane_t
1007    //=========================================================================
1008    pub fn graphene_plane_get_type() -> GType;
1009    pub fn graphene_plane_alloc() -> *mut graphene_plane_t;
1010    pub fn graphene_plane_distance(
1011        p: *const graphene_plane_t,
1012        point: *const graphene_point3d_t,
1013    ) -> c_float;
1014    pub fn graphene_plane_equal(a: *const graphene_plane_t, b: *const graphene_plane_t) -> bool;
1015    pub fn graphene_plane_free(p: *mut graphene_plane_t);
1016    pub fn graphene_plane_get_constant(p: *const graphene_plane_t) -> c_float;
1017    pub fn graphene_plane_get_normal(p: *const graphene_plane_t, normal: *mut graphene_vec3_t);
1018    pub fn graphene_plane_init(
1019        p: *mut graphene_plane_t,
1020        normal: *const graphene_vec3_t,
1021        constant: c_float,
1022    ) -> *mut graphene_plane_t;
1023    pub fn graphene_plane_init_from_plane(
1024        p: *mut graphene_plane_t,
1025        src: *const graphene_plane_t,
1026    ) -> *mut graphene_plane_t;
1027    pub fn graphene_plane_init_from_point(
1028        p: *mut graphene_plane_t,
1029        normal: *const graphene_vec3_t,
1030        point: *const graphene_point3d_t,
1031    ) -> *mut graphene_plane_t;
1032    pub fn graphene_plane_init_from_points(
1033        p: *mut graphene_plane_t,
1034        a: *const graphene_point3d_t,
1035        b: *const graphene_point3d_t,
1036        c: *const graphene_point3d_t,
1037    ) -> *mut graphene_plane_t;
1038    pub fn graphene_plane_init_from_vec4(
1039        p: *mut graphene_plane_t,
1040        src: *const graphene_vec4_t,
1041    ) -> *mut graphene_plane_t;
1042    pub fn graphene_plane_negate(p: *const graphene_plane_t, res: *mut graphene_plane_t);
1043    pub fn graphene_plane_normalize(p: *const graphene_plane_t, res: *mut graphene_plane_t);
1044    pub fn graphene_plane_transform(
1045        p: *const graphene_plane_t,
1046        matrix: *const graphene_matrix_t,
1047        normal_matrix: *const graphene_matrix_t,
1048        res: *mut graphene_plane_t,
1049    );
1050
1051    //=========================================================================
1052    // graphene_point3d_t
1053    //=========================================================================
1054    pub fn graphene_point3d_get_type() -> GType;
1055    pub fn graphene_point3d_alloc() -> *mut graphene_point3d_t;
1056    pub fn graphene_point3d_cross(
1057        a: *const graphene_point3d_t,
1058        b: *const graphene_point3d_t,
1059        res: *mut graphene_point3d_t,
1060    );
1061    pub fn graphene_point3d_distance(
1062        a: *const graphene_point3d_t,
1063        b: *const graphene_point3d_t,
1064        delta: *mut graphene_vec3_t,
1065    ) -> c_float;
1066    pub fn graphene_point3d_dot(
1067        a: *const graphene_point3d_t,
1068        b: *const graphene_point3d_t,
1069    ) -> c_float;
1070    pub fn graphene_point3d_equal(
1071        a: *const graphene_point3d_t,
1072        b: *const graphene_point3d_t,
1073    ) -> bool;
1074    pub fn graphene_point3d_free(p: *mut graphene_point3d_t);
1075    pub fn graphene_point3d_init(
1076        p: *mut graphene_point3d_t,
1077        x: c_float,
1078        y: c_float,
1079        z: c_float,
1080    ) -> *mut graphene_point3d_t;
1081    pub fn graphene_point3d_init_from_point(
1082        p: *mut graphene_point3d_t,
1083        src: *const graphene_point3d_t,
1084    ) -> *mut graphene_point3d_t;
1085    pub fn graphene_point3d_init_from_vec3(
1086        p: *mut graphene_point3d_t,
1087        v: *const graphene_vec3_t,
1088    ) -> *mut graphene_point3d_t;
1089    pub fn graphene_point3d_interpolate(
1090        a: *const graphene_point3d_t,
1091        b: *const graphene_point3d_t,
1092        factor: c_double,
1093        res: *mut graphene_point3d_t,
1094    );
1095    pub fn graphene_point3d_length(p: *const graphene_point3d_t) -> c_float;
1096    pub fn graphene_point3d_near(
1097        a: *const graphene_point3d_t,
1098        b: *const graphene_point3d_t,
1099        epsilon: c_float,
1100    ) -> bool;
1101    pub fn graphene_point3d_normalize(p: *const graphene_point3d_t, res: *mut graphene_point3d_t);
1102    pub fn graphene_point3d_normalize_viewport(
1103        p: *const graphene_point3d_t,
1104        viewport: *const graphene_rect_t,
1105        z_near: c_float,
1106        z_far: c_float,
1107        res: *mut graphene_point3d_t,
1108    );
1109    pub fn graphene_point3d_scale(
1110        p: *const graphene_point3d_t,
1111        factor: c_float,
1112        res: *mut graphene_point3d_t,
1113    );
1114    pub fn graphene_point3d_to_vec3(p: *const graphene_point3d_t, v: *mut graphene_vec3_t);
1115    pub fn graphene_point3d_zero() -> *const graphene_point3d_t;
1116
1117    //=========================================================================
1118    // graphene_point_t
1119    //=========================================================================
1120    pub fn graphene_point_get_type() -> GType;
1121    pub fn graphene_point_alloc() -> *mut graphene_point_t;
1122    pub fn graphene_point_distance(
1123        a: *const graphene_point_t,
1124        b: *const graphene_point_t,
1125        d_x: *mut c_float,
1126        d_y: *mut c_float,
1127    ) -> c_float;
1128    #[cfg(feature = "v1_12")]
1129    #[cfg_attr(docsrs, doc(cfg(feature = "v1_12")))]
1130    pub fn graphene_point_distance_squared(
1131        a: *const graphene_point_t,
1132        b: *const graphene_point_t,
1133    ) -> c_float;
1134    pub fn graphene_point_equal(a: *const graphene_point_t, b: *const graphene_point_t) -> bool;
1135    pub fn graphene_point_free(p: *mut graphene_point_t);
1136    pub fn graphene_point_init(
1137        p: *mut graphene_point_t,
1138        x: c_float,
1139        y: c_float,
1140    ) -> *mut graphene_point_t;
1141    pub fn graphene_point_init_from_point(
1142        p: *mut graphene_point_t,
1143        src: *const graphene_point_t,
1144    ) -> *mut graphene_point_t;
1145    pub fn graphene_point_init_from_vec2(
1146        p: *mut graphene_point_t,
1147        src: *const graphene_vec2_t,
1148    ) -> *mut graphene_point_t;
1149    pub fn graphene_point_interpolate(
1150        a: *const graphene_point_t,
1151        b: *const graphene_point_t,
1152        factor: c_double,
1153        res: *mut graphene_point_t,
1154    );
1155    pub fn graphene_point_near(
1156        a: *const graphene_point_t,
1157        b: *const graphene_point_t,
1158        epsilon: c_float,
1159    ) -> bool;
1160    pub fn graphene_point_to_vec2(p: *const graphene_point_t, v: *mut graphene_vec2_t);
1161    pub fn graphene_point_zero() -> *const graphene_point_t;
1162
1163    //=========================================================================
1164    // graphene_quad_t
1165    //=========================================================================
1166    pub fn graphene_quad_get_type() -> GType;
1167    pub fn graphene_quad_alloc() -> *mut graphene_quad_t;
1168    pub fn graphene_quad_bounds(q: *const graphene_quad_t, r: *mut graphene_rect_t);
1169    pub fn graphene_quad_contains(q: *const graphene_quad_t, p: *const graphene_point_t) -> bool;
1170    pub fn graphene_quad_free(q: *mut graphene_quad_t);
1171    pub fn graphene_quad_get_point(
1172        q: *const graphene_quad_t,
1173        index_: c_uint,
1174    ) -> *const graphene_point_t;
1175    pub fn graphene_quad_init(
1176        q: *mut graphene_quad_t,
1177        p1: *const graphene_point_t,
1178        p2: *const graphene_point_t,
1179        p3: *const graphene_point_t,
1180        p4: *const graphene_point_t,
1181    ) -> *mut graphene_quad_t;
1182    pub fn graphene_quad_init_from_points(
1183        q: *mut graphene_quad_t,
1184        points: *const [graphene_point_t; 4],
1185    ) -> *mut graphene_quad_t;
1186    pub fn graphene_quad_init_from_rect(
1187        q: *mut graphene_quad_t,
1188        r: *const graphene_rect_t,
1189    ) -> *mut graphene_quad_t;
1190
1191    //=========================================================================
1192    // graphene_quaternion_t
1193    //=========================================================================
1194    pub fn graphene_quaternion_get_type() -> GType;
1195    pub fn graphene_quaternion_alloc() -> *mut graphene_quaternion_t;
1196    pub fn graphene_quaternion_add(
1197        a: *const graphene_quaternion_t,
1198        b: *const graphene_quaternion_t,
1199        res: *mut graphene_quaternion_t,
1200    );
1201    pub fn graphene_quaternion_dot(
1202        a: *const graphene_quaternion_t,
1203        b: *const graphene_quaternion_t,
1204    ) -> c_float;
1205    pub fn graphene_quaternion_equal(
1206        a: *const graphene_quaternion_t,
1207        b: *const graphene_quaternion_t,
1208    ) -> bool;
1209    pub fn graphene_quaternion_free(q: *mut graphene_quaternion_t);
1210    pub fn graphene_quaternion_init(
1211        q: *mut graphene_quaternion_t,
1212        x: c_float,
1213        y: c_float,
1214        z: c_float,
1215        w: c_float,
1216    ) -> *mut graphene_quaternion_t;
1217    pub fn graphene_quaternion_init_from_angle_vec3(
1218        q: *mut graphene_quaternion_t,
1219        angle: c_float,
1220        axis: *const graphene_vec3_t,
1221    ) -> *mut graphene_quaternion_t;
1222    pub fn graphene_quaternion_init_from_angles(
1223        q: *mut graphene_quaternion_t,
1224        deg_x: c_float,
1225        deg_y: c_float,
1226        deg_z: c_float,
1227    ) -> *mut graphene_quaternion_t;
1228    pub fn graphene_quaternion_init_from_euler(
1229        q: *mut graphene_quaternion_t,
1230        e: *const graphene_euler_t,
1231    ) -> *mut graphene_quaternion_t;
1232    pub fn graphene_quaternion_init_from_matrix(
1233        q: *mut graphene_quaternion_t,
1234        m: *const graphene_matrix_t,
1235    ) -> *mut graphene_quaternion_t;
1236    pub fn graphene_quaternion_init_from_quaternion(
1237        q: *mut graphene_quaternion_t,
1238        src: *const graphene_quaternion_t,
1239    ) -> *mut graphene_quaternion_t;
1240    pub fn graphene_quaternion_init_from_radians(
1241        q: *mut graphene_quaternion_t,
1242        rad_x: c_float,
1243        rad_y: c_float,
1244        rad_z: c_float,
1245    ) -> *mut graphene_quaternion_t;
1246    pub fn graphene_quaternion_init_from_vec4(
1247        q: *mut graphene_quaternion_t,
1248        src: *const graphene_vec4_t,
1249    ) -> *mut graphene_quaternion_t;
1250    pub fn graphene_quaternion_init_identity(
1251        q: *mut graphene_quaternion_t,
1252    ) -> *mut graphene_quaternion_t;
1253    pub fn graphene_quaternion_invert(
1254        q: *const graphene_quaternion_t,
1255        res: *mut graphene_quaternion_t,
1256    );
1257    pub fn graphene_quaternion_multiply(
1258        a: *const graphene_quaternion_t,
1259        b: *const graphene_quaternion_t,
1260        res: *mut graphene_quaternion_t,
1261    );
1262    pub fn graphene_quaternion_normalize(
1263        q: *const graphene_quaternion_t,
1264        res: *mut graphene_quaternion_t,
1265    );
1266    pub fn graphene_quaternion_scale(
1267        q: *const graphene_quaternion_t,
1268        factor: c_float,
1269        res: *mut graphene_quaternion_t,
1270    );
1271    pub fn graphene_quaternion_slerp(
1272        a: *const graphene_quaternion_t,
1273        b: *const graphene_quaternion_t,
1274        factor: c_float,
1275        res: *mut graphene_quaternion_t,
1276    );
1277    pub fn graphene_quaternion_to_angle_vec3(
1278        q: *const graphene_quaternion_t,
1279        angle: *mut c_float,
1280        axis: *mut graphene_vec3_t,
1281    );
1282    pub fn graphene_quaternion_to_angles(
1283        q: *const graphene_quaternion_t,
1284        deg_x: *mut c_float,
1285        deg_y: *mut c_float,
1286        deg_z: *mut c_float,
1287    );
1288    pub fn graphene_quaternion_to_matrix(
1289        q: *const graphene_quaternion_t,
1290        m: *mut graphene_matrix_t,
1291    );
1292    pub fn graphene_quaternion_to_radians(
1293        q: *const graphene_quaternion_t,
1294        rad_x: *mut c_float,
1295        rad_y: *mut c_float,
1296        rad_z: *mut c_float,
1297    );
1298    pub fn graphene_quaternion_to_vec4(q: *const graphene_quaternion_t, res: *mut graphene_vec4_t);
1299
1300    //=========================================================================
1301    // graphene_ray_t
1302    //=========================================================================
1303    pub fn graphene_ray_get_type() -> GType;
1304    pub fn graphene_ray_alloc() -> *mut graphene_ray_t;
1305    pub fn graphene_ray_equal(a: *const graphene_ray_t, b: *const graphene_ray_t) -> bool;
1306    pub fn graphene_ray_free(r: *mut graphene_ray_t);
1307    pub fn graphene_ray_get_closest_point_to_point(
1308        r: *const graphene_ray_t,
1309        p: *const graphene_point3d_t,
1310        res: *mut graphene_point3d_t,
1311    );
1312    pub fn graphene_ray_get_direction(r: *const graphene_ray_t, direction: *mut graphene_vec3_t);
1313    pub fn graphene_ray_get_distance_to_plane(
1314        r: *const graphene_ray_t,
1315        p: *const graphene_plane_t,
1316    ) -> c_float;
1317    pub fn graphene_ray_get_distance_to_point(
1318        r: *const graphene_ray_t,
1319        p: *const graphene_point3d_t,
1320    ) -> c_float;
1321    pub fn graphene_ray_get_origin(r: *const graphene_ray_t, origin: *mut graphene_point3d_t);
1322    pub fn graphene_ray_get_position_at(
1323        r: *const graphene_ray_t,
1324        t: c_float,
1325        position: *mut graphene_point3d_t,
1326    );
1327    pub fn graphene_ray_init(
1328        r: *mut graphene_ray_t,
1329        origin: *const graphene_point3d_t,
1330        direction: *const graphene_vec3_t,
1331    ) -> *mut graphene_ray_t;
1332    pub fn graphene_ray_init_from_ray(
1333        r: *mut graphene_ray_t,
1334        src: *const graphene_ray_t,
1335    ) -> *mut graphene_ray_t;
1336    pub fn graphene_ray_init_from_vec3(
1337        r: *mut graphene_ray_t,
1338        origin: *const graphene_vec3_t,
1339        direction: *const graphene_vec3_t,
1340    ) -> *mut graphene_ray_t;
1341    pub fn graphene_ray_intersect_box(
1342        r: *const graphene_ray_t,
1343        b: *const graphene_box_t,
1344        t_out: *mut c_float,
1345    ) -> graphene_ray_intersection_kind_t;
1346    pub fn graphene_ray_intersect_sphere(
1347        r: *const graphene_ray_t,
1348        s: *const graphene_sphere_t,
1349        t_out: *mut c_float,
1350    ) -> graphene_ray_intersection_kind_t;
1351    pub fn graphene_ray_intersect_triangle(
1352        r: *const graphene_ray_t,
1353        t: *const graphene_triangle_t,
1354        t_out: *mut c_float,
1355    ) -> graphene_ray_intersection_kind_t;
1356    pub fn graphene_ray_intersects_box(r: *const graphene_ray_t, b: *const graphene_box_t) -> bool;
1357    pub fn graphene_ray_intersects_sphere(
1358        r: *const graphene_ray_t,
1359        s: *const graphene_sphere_t,
1360    ) -> bool;
1361    pub fn graphene_ray_intersects_triangle(
1362        r: *const graphene_ray_t,
1363        t: *const graphene_triangle_t,
1364    ) -> bool;
1365
1366    //=========================================================================
1367    // graphene_rect_t
1368    //=========================================================================
1369    pub fn graphene_rect_get_type() -> GType;
1370    pub fn graphene_rect_contains_point(
1371        r: *const graphene_rect_t,
1372        p: *const graphene_point_t,
1373    ) -> bool;
1374    pub fn graphene_rect_contains_rect(
1375        a: *const graphene_rect_t,
1376        b: *const graphene_rect_t,
1377    ) -> bool;
1378    pub fn graphene_rect_equal(a: *const graphene_rect_t, b: *const graphene_rect_t) -> bool;
1379    pub fn graphene_rect_expand(
1380        r: *const graphene_rect_t,
1381        p: *const graphene_point_t,
1382        res: *mut graphene_rect_t,
1383    );
1384    pub fn graphene_rect_free(r: *mut graphene_rect_t);
1385    pub fn graphene_rect_get_area(r: *const graphene_rect_t) -> c_float;
1386    pub fn graphene_rect_get_bottom_left(r: *const graphene_rect_t, p: *mut graphene_point_t);
1387    pub fn graphene_rect_get_bottom_right(r: *const graphene_rect_t, p: *mut graphene_point_t);
1388    pub fn graphene_rect_get_center(r: *const graphene_rect_t, p: *mut graphene_point_t);
1389    pub fn graphene_rect_get_height(r: *const graphene_rect_t) -> c_float;
1390    pub fn graphene_rect_get_top_left(r: *const graphene_rect_t, p: *mut graphene_point_t);
1391    pub fn graphene_rect_get_top_right(r: *const graphene_rect_t, p: *mut graphene_point_t);
1392    pub fn graphene_rect_get_vertices(
1393        r: *const graphene_rect_t,
1394        vertices: *mut [graphene_vec2_t; 4],
1395    );
1396    pub fn graphene_rect_get_width(r: *const graphene_rect_t) -> c_float;
1397    pub fn graphene_rect_get_x(r: *const graphene_rect_t) -> c_float;
1398    pub fn graphene_rect_get_y(r: *const graphene_rect_t) -> c_float;
1399    pub fn graphene_rect_init(
1400        r: *mut graphene_rect_t,
1401        x: c_float,
1402        y: c_float,
1403        width: c_float,
1404        height: c_float,
1405    ) -> *mut graphene_rect_t;
1406    pub fn graphene_rect_init_from_rect(
1407        r: *mut graphene_rect_t,
1408        src: *const graphene_rect_t,
1409    ) -> *mut graphene_rect_t;
1410    pub fn graphene_rect_inset(
1411        r: *mut graphene_rect_t,
1412        d_x: c_float,
1413        d_y: c_float,
1414    ) -> *mut graphene_rect_t;
1415    pub fn graphene_rect_inset_r(
1416        r: *const graphene_rect_t,
1417        d_x: c_float,
1418        d_y: c_float,
1419        res: *mut graphene_rect_t,
1420    );
1421    pub fn graphene_rect_interpolate(
1422        a: *const graphene_rect_t,
1423        b: *const graphene_rect_t,
1424        factor: c_double,
1425        res: *mut graphene_rect_t,
1426    );
1427    pub fn graphene_rect_intersection(
1428        a: *const graphene_rect_t,
1429        b: *const graphene_rect_t,
1430        res: *mut graphene_rect_t,
1431    ) -> bool;
1432    pub fn graphene_rect_normalize(r: *mut graphene_rect_t) -> *mut graphene_rect_t;
1433    pub fn graphene_rect_normalize_r(r: *const graphene_rect_t, res: *mut graphene_rect_t);
1434    pub fn graphene_rect_offset(
1435        r: *mut graphene_rect_t,
1436        d_x: c_float,
1437        d_y: c_float,
1438    ) -> *mut graphene_rect_t;
1439    pub fn graphene_rect_offset_r(
1440        r: *const graphene_rect_t,
1441        d_x: c_float,
1442        d_y: c_float,
1443        res: *mut graphene_rect_t,
1444    );
1445    pub fn graphene_rect_round(r: *const graphene_rect_t, res: *mut graphene_rect_t);
1446    pub fn graphene_rect_round_extents(r: *const graphene_rect_t, res: *mut graphene_rect_t);
1447    pub fn graphene_rect_round_to_pixel(r: *mut graphene_rect_t) -> *mut graphene_rect_t;
1448    pub fn graphene_rect_scale(
1449        r: *const graphene_rect_t,
1450        s_h: c_float,
1451        s_v: c_float,
1452        res: *mut graphene_rect_t,
1453    );
1454    pub fn graphene_rect_union(
1455        a: *const graphene_rect_t,
1456        b: *const graphene_rect_t,
1457        res: *mut graphene_rect_t,
1458    );
1459    pub fn graphene_rect_alloc() -> *mut graphene_rect_t;
1460    pub fn graphene_rect_zero() -> *const graphene_rect_t;
1461
1462    //=========================================================================
1463    // graphene_size_t
1464    //=========================================================================
1465    pub fn graphene_size_get_type() -> GType;
1466    pub fn graphene_size_alloc() -> *mut graphene_size_t;
1467    pub fn graphene_size_equal(a: *const graphene_size_t, b: *const graphene_size_t) -> bool;
1468    pub fn graphene_size_free(s: *mut graphene_size_t);
1469    pub fn graphene_size_init(
1470        s: *mut graphene_size_t,
1471        width: c_float,
1472        height: c_float,
1473    ) -> *mut graphene_size_t;
1474    pub fn graphene_size_init_from_size(
1475        s: *mut graphene_size_t,
1476        src: *const graphene_size_t,
1477    ) -> *mut graphene_size_t;
1478    pub fn graphene_size_interpolate(
1479        a: *const graphene_size_t,
1480        b: *const graphene_size_t,
1481        factor: c_double,
1482        res: *mut graphene_size_t,
1483    );
1484    pub fn graphene_size_scale(
1485        s: *const graphene_size_t,
1486        factor: c_float,
1487        res: *mut graphene_size_t,
1488    );
1489    pub fn graphene_size_zero() -> *const graphene_size_t;
1490
1491    //=========================================================================
1492    // graphene_sphere_t
1493    //=========================================================================
1494    pub fn graphene_sphere_get_type() -> GType;
1495    pub fn graphene_sphere_alloc() -> *mut graphene_sphere_t;
1496    pub fn graphene_sphere_contains_point(
1497        s: *const graphene_sphere_t,
1498        point: *const graphene_point3d_t,
1499    ) -> bool;
1500    pub fn graphene_sphere_distance(
1501        s: *const graphene_sphere_t,
1502        point: *const graphene_point3d_t,
1503    ) -> c_float;
1504    pub fn graphene_sphere_equal(a: *const graphene_sphere_t, b: *const graphene_sphere_t) -> bool;
1505    pub fn graphene_sphere_free(s: *mut graphene_sphere_t);
1506    pub fn graphene_sphere_get_bounding_box(s: *const graphene_sphere_t, box_: *mut graphene_box_t);
1507    pub fn graphene_sphere_get_center(s: *const graphene_sphere_t, center: *mut graphene_point3d_t);
1508    pub fn graphene_sphere_get_radius(s: *const graphene_sphere_t) -> c_float;
1509    pub fn graphene_sphere_init(
1510        s: *mut graphene_sphere_t,
1511        center: *const graphene_point3d_t,
1512        radius: c_float,
1513    ) -> *mut graphene_sphere_t;
1514    pub fn graphene_sphere_init_from_points(
1515        s: *mut graphene_sphere_t,
1516        n_points: c_uint,
1517        points: *const graphene_point3d_t,
1518        center: *const graphene_point3d_t,
1519    ) -> *mut graphene_sphere_t;
1520    pub fn graphene_sphere_init_from_vectors(
1521        s: *mut graphene_sphere_t,
1522        n_vectors: c_uint,
1523        vectors: *const graphene_vec3_t,
1524        center: *const graphene_point3d_t,
1525    ) -> *mut graphene_sphere_t;
1526    pub fn graphene_sphere_is_empty(s: *const graphene_sphere_t) -> bool;
1527    pub fn graphene_sphere_translate(
1528        s: *const graphene_sphere_t,
1529        point: *const graphene_point3d_t,
1530        res: *mut graphene_sphere_t,
1531    );
1532
1533    //=========================================================================
1534    // graphene_triangle_t
1535    //=========================================================================
1536    pub fn graphene_triangle_get_type() -> GType;
1537    pub fn graphene_triangle_alloc() -> *mut graphene_triangle_t;
1538    pub fn graphene_triangle_contains_point(
1539        t: *const graphene_triangle_t,
1540        p: *const graphene_point3d_t,
1541    ) -> bool;
1542    pub fn graphene_triangle_equal(
1543        a: *const graphene_triangle_t,
1544        b: *const graphene_triangle_t,
1545    ) -> bool;
1546    pub fn graphene_triangle_free(t: *mut graphene_triangle_t);
1547    pub fn graphene_triangle_get_area(t: *const graphene_triangle_t) -> c_float;
1548    pub fn graphene_triangle_get_barycoords(
1549        t: *const graphene_triangle_t,
1550        p: *const graphene_point3d_t,
1551        res: *mut graphene_vec2_t,
1552    ) -> bool;
1553    pub fn graphene_triangle_get_bounding_box(
1554        t: *const graphene_triangle_t,
1555        res: *mut graphene_box_t,
1556    );
1557    pub fn graphene_triangle_get_midpoint(
1558        t: *const graphene_triangle_t,
1559        res: *mut graphene_point3d_t,
1560    );
1561    pub fn graphene_triangle_get_normal(t: *const graphene_triangle_t, res: *mut graphene_vec3_t);
1562    pub fn graphene_triangle_get_plane(t: *const graphene_triangle_t, res: *mut graphene_plane_t);
1563    pub fn graphene_triangle_get_points(
1564        t: *const graphene_triangle_t,
1565        a: *mut graphene_point3d_t,
1566        b: *mut graphene_point3d_t,
1567        c: *mut graphene_point3d_t,
1568    );
1569    pub fn graphene_triangle_get_uv(
1570        t: *const graphene_triangle_t,
1571        p: *const graphene_point3d_t,
1572        uv_a: *const graphene_vec2_t,
1573        uv_b: *const graphene_vec2_t,
1574        uv_c: *const graphene_vec2_t,
1575        res: *mut graphene_vec2_t,
1576    ) -> bool;
1577    pub fn graphene_triangle_get_vertices(
1578        t: *const graphene_triangle_t,
1579        a: *mut graphene_vec3_t,
1580        b: *mut graphene_vec3_t,
1581        c: *mut graphene_vec3_t,
1582    );
1583    pub fn graphene_triangle_init_from_float(
1584        t: *mut graphene_triangle_t,
1585        a: *const [c_float; 3],
1586        b: *const [c_float; 3],
1587        c: *const [c_float; 3],
1588    ) -> *mut graphene_triangle_t;
1589    pub fn graphene_triangle_init_from_point3d(
1590        t: *mut graphene_triangle_t,
1591        a: *const graphene_point3d_t,
1592        b: *const graphene_point3d_t,
1593        c: *const graphene_point3d_t,
1594    ) -> *mut graphene_triangle_t;
1595    pub fn graphene_triangle_init_from_vec3(
1596        t: *mut graphene_triangle_t,
1597        a: *const graphene_vec3_t,
1598        b: *const graphene_vec3_t,
1599        c: *const graphene_vec3_t,
1600    ) -> *mut graphene_triangle_t;
1601
1602    //=========================================================================
1603    // graphene_vec2_t
1604    //=========================================================================
1605    pub fn graphene_vec2_get_type() -> GType;
1606    pub fn graphene_vec2_alloc() -> *mut graphene_vec2_t;
1607    pub fn graphene_vec2_add(
1608        a: *const graphene_vec2_t,
1609        b: *const graphene_vec2_t,
1610        res: *mut graphene_vec2_t,
1611    );
1612    pub fn graphene_vec2_divide(
1613        a: *const graphene_vec2_t,
1614        b: *const graphene_vec2_t,
1615        res: *mut graphene_vec2_t,
1616    );
1617    pub fn graphene_vec2_dot(a: *const graphene_vec2_t, b: *const graphene_vec2_t) -> c_float;
1618    pub fn graphene_vec2_equal(v1: *const graphene_vec2_t, v2: *const graphene_vec2_t) -> bool;
1619    pub fn graphene_vec2_free(v: *mut graphene_vec2_t);
1620    pub fn graphene_vec2_get_x(v: *const graphene_vec2_t) -> c_float;
1621    pub fn graphene_vec2_get_y(v: *const graphene_vec2_t) -> c_float;
1622    pub fn graphene_vec2_init(
1623        v: *mut graphene_vec2_t,
1624        x: c_float,
1625        y: c_float,
1626    ) -> *mut graphene_vec2_t;
1627    pub fn graphene_vec2_init_from_float(
1628        v: *mut graphene_vec2_t,
1629        src: *const [c_float; 2],
1630    ) -> *mut graphene_vec2_t;
1631    pub fn graphene_vec2_init_from_vec2(
1632        v: *mut graphene_vec2_t,
1633        src: *const graphene_vec2_t,
1634    ) -> *mut graphene_vec2_t;
1635    pub fn graphene_vec2_interpolate(
1636        v1: *const graphene_vec2_t,
1637        v2: *const graphene_vec2_t,
1638        factor: c_double,
1639        res: *mut graphene_vec2_t,
1640    );
1641    pub fn graphene_vec2_length(v: *const graphene_vec2_t) -> c_float;
1642    pub fn graphene_vec2_max(
1643        a: *const graphene_vec2_t,
1644        b: *const graphene_vec2_t,
1645        res: *mut graphene_vec2_t,
1646    );
1647    pub fn graphene_vec2_min(
1648        a: *const graphene_vec2_t,
1649        b: *const graphene_vec2_t,
1650        res: *mut graphene_vec2_t,
1651    );
1652    pub fn graphene_vec2_multiply(
1653        a: *const graphene_vec2_t,
1654        b: *const graphene_vec2_t,
1655        res: *mut graphene_vec2_t,
1656    );
1657    pub fn graphene_vec2_near(
1658        v1: *const graphene_vec2_t,
1659        v2: *const graphene_vec2_t,
1660        epsilon: c_float,
1661    ) -> bool;
1662    pub fn graphene_vec2_negate(v: *const graphene_vec2_t, res: *mut graphene_vec2_t);
1663    pub fn graphene_vec2_normalize(v: *const graphene_vec2_t, res: *mut graphene_vec2_t);
1664    pub fn graphene_vec2_scale(
1665        v: *const graphene_vec2_t,
1666        factor: c_float,
1667        res: *mut graphene_vec2_t,
1668    );
1669    pub fn graphene_vec2_subtract(
1670        a: *const graphene_vec2_t,
1671        b: *const graphene_vec2_t,
1672        res: *mut graphene_vec2_t,
1673    );
1674    pub fn graphene_vec2_to_float(v: *const graphene_vec2_t, dest: *mut [c_float; 2]);
1675    pub fn graphene_vec2_one() -> *const graphene_vec2_t;
1676    pub fn graphene_vec2_x_axis() -> *const graphene_vec2_t;
1677    pub fn graphene_vec2_y_axis() -> *const graphene_vec2_t;
1678    pub fn graphene_vec2_zero() -> *const graphene_vec2_t;
1679
1680    //=========================================================================
1681    // graphene_vec3_t
1682    //=========================================================================
1683    pub fn graphene_vec3_get_type() -> GType;
1684    pub fn graphene_vec3_alloc() -> *mut graphene_vec3_t;
1685    pub fn graphene_vec3_add(
1686        a: *const graphene_vec3_t,
1687        b: *const graphene_vec3_t,
1688        res: *mut graphene_vec3_t,
1689    );
1690    pub fn graphene_vec3_cross(
1691        a: *const graphene_vec3_t,
1692        b: *const graphene_vec3_t,
1693        res: *mut graphene_vec3_t,
1694    );
1695    pub fn graphene_vec3_divide(
1696        a: *const graphene_vec3_t,
1697        b: *const graphene_vec3_t,
1698        res: *mut graphene_vec3_t,
1699    );
1700    pub fn graphene_vec3_dot(a: *const graphene_vec3_t, b: *const graphene_vec3_t) -> c_float;
1701    pub fn graphene_vec3_equal(v1: *const graphene_vec3_t, v2: *const graphene_vec3_t) -> bool;
1702    pub fn graphene_vec3_free(v: *mut graphene_vec3_t);
1703    pub fn graphene_vec3_get_x(v: *const graphene_vec3_t) -> c_float;
1704    pub fn graphene_vec3_get_xy(v: *const graphene_vec3_t, res: *mut graphene_vec2_t);
1705    pub fn graphene_vec3_get_xy0(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
1706    pub fn graphene_vec3_get_xyz0(v: *const graphene_vec3_t, res: *mut graphene_vec4_t);
1707    pub fn graphene_vec3_get_xyz1(v: *const graphene_vec3_t, res: *mut graphene_vec4_t);
1708    pub fn graphene_vec3_get_xyzw(v: *const graphene_vec3_t, w: c_float, res: *mut graphene_vec4_t);
1709    pub fn graphene_vec3_get_y(v: *const graphene_vec3_t) -> c_float;
1710    pub fn graphene_vec3_get_z(v: *const graphene_vec3_t) -> c_float;
1711    pub fn graphene_vec3_init(
1712        v: *mut graphene_vec3_t,
1713        x: c_float,
1714        y: c_float,
1715        z: c_float,
1716    ) -> *mut graphene_vec3_t;
1717    pub fn graphene_vec3_init_from_float(
1718        v: *mut graphene_vec3_t,
1719        src: *const [c_float; 3],
1720    ) -> *mut graphene_vec3_t;
1721    pub fn graphene_vec3_init_from_vec3(
1722        v: *mut graphene_vec3_t,
1723        src: *const graphene_vec3_t,
1724    ) -> *mut graphene_vec3_t;
1725    pub fn graphene_vec3_interpolate(
1726        v1: *const graphene_vec3_t,
1727        v2: *const graphene_vec3_t,
1728        factor: c_double,
1729        res: *mut graphene_vec3_t,
1730    );
1731    pub fn graphene_vec3_length(v: *const graphene_vec3_t) -> c_float;
1732    pub fn graphene_vec3_max(
1733        a: *const graphene_vec3_t,
1734        b: *const graphene_vec3_t,
1735        res: *mut graphene_vec3_t,
1736    );
1737    pub fn graphene_vec3_min(
1738        a: *const graphene_vec3_t,
1739        b: *const graphene_vec3_t,
1740        res: *mut graphene_vec3_t,
1741    );
1742    pub fn graphene_vec3_multiply(
1743        a: *const graphene_vec3_t,
1744        b: *const graphene_vec3_t,
1745        res: *mut graphene_vec3_t,
1746    );
1747    pub fn graphene_vec3_near(
1748        v1: *const graphene_vec3_t,
1749        v2: *const graphene_vec3_t,
1750        epsilon: c_float,
1751    ) -> bool;
1752    pub fn graphene_vec3_negate(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
1753    pub fn graphene_vec3_normalize(v: *const graphene_vec3_t, res: *mut graphene_vec3_t);
1754    pub fn graphene_vec3_scale(
1755        v: *const graphene_vec3_t,
1756        factor: c_float,
1757        res: *mut graphene_vec3_t,
1758    );
1759    pub fn graphene_vec3_subtract(
1760        a: *const graphene_vec3_t,
1761        b: *const graphene_vec3_t,
1762        res: *mut graphene_vec3_t,
1763    );
1764    pub fn graphene_vec3_to_float(v: *const graphene_vec3_t, dest: *mut [c_float; 3]);
1765    pub fn graphene_vec3_one() -> *const graphene_vec3_t;
1766    pub fn graphene_vec3_x_axis() -> *const graphene_vec3_t;
1767    pub fn graphene_vec3_y_axis() -> *const graphene_vec3_t;
1768    pub fn graphene_vec3_z_axis() -> *const graphene_vec3_t;
1769    pub fn graphene_vec3_zero() -> *const graphene_vec3_t;
1770
1771    //=========================================================================
1772    // graphene_vec4_t
1773    //=========================================================================
1774    pub fn graphene_vec4_get_type() -> GType;
1775    pub fn graphene_vec4_alloc() -> *mut graphene_vec4_t;
1776    pub fn graphene_vec4_add(
1777        a: *const graphene_vec4_t,
1778        b: *const graphene_vec4_t,
1779        res: *mut graphene_vec4_t,
1780    );
1781    pub fn graphene_vec4_divide(
1782        a: *const graphene_vec4_t,
1783        b: *const graphene_vec4_t,
1784        res: *mut graphene_vec4_t,
1785    );
1786    pub fn graphene_vec4_dot(a: *const graphene_vec4_t, b: *const graphene_vec4_t) -> c_float;
1787    pub fn graphene_vec4_equal(v1: *const graphene_vec4_t, v2: *const graphene_vec4_t) -> bool;
1788    pub fn graphene_vec4_free(v: *mut graphene_vec4_t);
1789    pub fn graphene_vec4_get_w(v: *const graphene_vec4_t) -> c_float;
1790    pub fn graphene_vec4_get_x(v: *const graphene_vec4_t) -> c_float;
1791    pub fn graphene_vec4_get_xy(v: *const graphene_vec4_t, res: *mut graphene_vec2_t);
1792    pub fn graphene_vec4_get_xyz(v: *const graphene_vec4_t, res: *mut graphene_vec3_t);
1793    pub fn graphene_vec4_get_y(v: *const graphene_vec4_t) -> c_float;
1794    pub fn graphene_vec4_get_z(v: *const graphene_vec4_t) -> c_float;
1795    pub fn graphene_vec4_init(
1796        v: *mut graphene_vec4_t,
1797        x: c_float,
1798        y: c_float,
1799        z: c_float,
1800        w: c_float,
1801    ) -> *mut graphene_vec4_t;
1802    pub fn graphene_vec4_init_from_float(
1803        v: *mut graphene_vec4_t,
1804        src: *const [c_float; 4],
1805    ) -> *mut graphene_vec4_t;
1806    pub fn graphene_vec4_init_from_vec2(
1807        v: *mut graphene_vec4_t,
1808        src: *const graphene_vec2_t,
1809        z: c_float,
1810        w: c_float,
1811    ) -> *mut graphene_vec4_t;
1812    pub fn graphene_vec4_init_from_vec3(
1813        v: *mut graphene_vec4_t,
1814        src: *const graphene_vec3_t,
1815        w: c_float,
1816    ) -> *mut graphene_vec4_t;
1817    pub fn graphene_vec4_init_from_vec4(
1818        v: *mut graphene_vec4_t,
1819        src: *const graphene_vec4_t,
1820    ) -> *mut graphene_vec4_t;
1821    pub fn graphene_vec4_interpolate(
1822        v1: *const graphene_vec4_t,
1823        v2: *const graphene_vec4_t,
1824        factor: c_double,
1825        res: *mut graphene_vec4_t,
1826    );
1827    pub fn graphene_vec4_length(v: *const graphene_vec4_t) -> c_float;
1828    pub fn graphene_vec4_max(
1829        a: *const graphene_vec4_t,
1830        b: *const graphene_vec4_t,
1831        res: *mut graphene_vec4_t,
1832    );
1833    pub fn graphene_vec4_min(
1834        a: *const graphene_vec4_t,
1835        b: *const graphene_vec4_t,
1836        res: *mut graphene_vec4_t,
1837    );
1838    pub fn graphene_vec4_multiply(
1839        a: *const graphene_vec4_t,
1840        b: *const graphene_vec4_t,
1841        res: *mut graphene_vec4_t,
1842    );
1843    pub fn graphene_vec4_near(
1844        v1: *const graphene_vec4_t,
1845        v2: *const graphene_vec4_t,
1846        epsilon: c_float,
1847    ) -> bool;
1848    pub fn graphene_vec4_negate(v: *const graphene_vec4_t, res: *mut graphene_vec4_t);
1849    pub fn graphene_vec4_normalize(v: *const graphene_vec4_t, res: *mut graphene_vec4_t);
1850    pub fn graphene_vec4_scale(
1851        v: *const graphene_vec4_t,
1852        factor: c_float,
1853        res: *mut graphene_vec4_t,
1854    );
1855    pub fn graphene_vec4_subtract(
1856        a: *const graphene_vec4_t,
1857        b: *const graphene_vec4_t,
1858        res: *mut graphene_vec4_t,
1859    );
1860    pub fn graphene_vec4_to_float(v: *const graphene_vec4_t, dest: *mut [c_float; 4]);
1861    pub fn graphene_vec4_one() -> *const graphene_vec4_t;
1862    pub fn graphene_vec4_w_axis() -> *const graphene_vec4_t;
1863    pub fn graphene_vec4_x_axis() -> *const graphene_vec4_t;
1864    pub fn graphene_vec4_y_axis() -> *const graphene_vec4_t;
1865    pub fn graphene_vec4_z_axis() -> *const graphene_vec4_t;
1866    pub fn graphene_vec4_zero() -> *const graphene_vec4_t;
1867
1868}
OSZAR »