graphene/auto/
enums.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
5use crate::ffi;
6use glib::translate::*;
7
8/// Specify the order of the rotations on each axis.
9///
10/// The [`Default`][Self::Default] value is special, and is used
11/// as an alias for one of the other orders.
12#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
13#[non_exhaustive]
14#[doc(alias = "graphene_euler_order_t")]
15pub enum EulerOrder {
16    /// Rotate in the default order; the
17    ///  default order is one of the following enumeration values
18    #[doc(alias = "GRAPHENE_EULER_ORDER_DEFAULT")]
19    Default,
20    /// Rotate in the X, Y, and Z order. Deprecated in
21    ///  Graphene 1.10, it's an alias for [`Sxyz`][Self::Sxyz]
22    #[doc(alias = "GRAPHENE_EULER_ORDER_XYZ")]
23    Xyz,
24    /// Rotate in the Y, Z, and X order. Deprecated in
25    ///  Graphene 1.10, it's an alias for [`Syzx`][Self::Syzx]
26    #[doc(alias = "GRAPHENE_EULER_ORDER_YZX")]
27    Yzx,
28    /// Rotate in the Z, X, and Y order. Deprecated in
29    ///  Graphene 1.10, it's an alias for [`Szxy`][Self::Szxy]
30    #[doc(alias = "GRAPHENE_EULER_ORDER_ZXY")]
31    Zxy,
32    /// Rotate in the X, Z, and Y order. Deprecated in
33    ///  Graphene 1.10, it's an alias for [`Sxzy`][Self::Sxzy]
34    #[doc(alias = "GRAPHENE_EULER_ORDER_XZY")]
35    Xzy,
36    /// Rotate in the Y, X, and Z order. Deprecated in
37    ///  Graphene 1.10, it's an alias for [`Syxz`][Self::Syxz]
38    #[doc(alias = "GRAPHENE_EULER_ORDER_YXZ")]
39    Yxz,
40    /// Rotate in the Z, Y, and X order. Deprecated in
41    ///  Graphene 1.10, it's an alias for [`Szyx`][Self::Szyx]
42    #[doc(alias = "GRAPHENE_EULER_ORDER_ZYX")]
43    Zyx,
44    /// Defines a static rotation along the X, Y, and Z axes (Since: 1.10)
45    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYZ")]
46    Sxyz,
47    /// Defines a static rotation along the X, Y, and X axes (Since: 1.10)
48    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYX")]
49    Sxyx,
50    /// Defines a static rotation along the X, Z, and Y axes (Since: 1.10)
51    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZY")]
52    Sxzy,
53    /// Defines a static rotation along the X, Z, and X axes (Since: 1.10)
54    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZX")]
55    Sxzx,
56    /// Defines a static rotation along the Y, Z, and X axes (Since: 1.10)
57    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZX")]
58    Syzx,
59    /// Defines a static rotation along the Y, Z, and Y axes (Since: 1.10)
60    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZY")]
61    Syzy,
62    /// Defines a static rotation along the Y, X, and Z axes (Since: 1.10)
63    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXZ")]
64    Syxz,
65    /// Defines a static rotation along the Y, X, and Y axes (Since: 1.10)
66    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXY")]
67    Syxy,
68    /// Defines a static rotation along the Z, X, and Y axes (Since: 1.10)
69    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXY")]
70    Szxy,
71    /// Defines a static rotation along the Z, X, and Z axes (Since: 1.10)
72    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXZ")]
73    Szxz,
74    /// Defines a static rotation along the Z, Y, and X axes (Since: 1.10)
75    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYX")]
76    Szyx,
77    /// Defines a static rotation along the Z, Y, and Z axes (Since: 1.10)
78    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYZ")]
79    Szyz,
80    /// Defines a relative rotation along the Z, Y, and X axes (Since: 1.10)
81    #[doc(alias = "GRAPHENE_EULER_ORDER_RZYX")]
82    Rzyx,
83    /// Defines a relative rotation along the X, Y, and X axes (Since: 1.10)
84    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYX")]
85    Rxyx,
86    /// Defines a relative rotation along the Y, Z, and X axes (Since: 1.10)
87    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZX")]
88    Ryzx,
89    /// Defines a relative rotation along the X, Z, and X axes (Since: 1.10)
90    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZX")]
91    Rxzx,
92    /// Defines a relative rotation along the X, Z, and Y axes (Since: 1.10)
93    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZY")]
94    Rxzy,
95    /// Defines a relative rotation along the Y, Z, and Y axes (Since: 1.10)
96    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZY")]
97    Ryzy,
98    /// Defines a relative rotation along the Z, X, and Y axes (Since: 1.10)
99    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXY")]
100    Rzxy,
101    /// Defines a relative rotation along the Y, X, and Y axes (Since: 1.10)
102    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXY")]
103    Ryxy,
104    /// Defines a relative rotation along the Y, X, and Z axes (Since: 1.10)
105    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXZ")]
106    Ryxz,
107    /// Defines a relative rotation along the Z, X, and Z axes (Since: 1.10)
108    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXZ")]
109    Rzxz,
110    /// Defines a relative rotation along the X, Y, and Z axes (Since: 1.10)
111    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYZ")]
112    Rxyz,
113    /// Defines a relative rotation along the Z, Y, and Z axes (Since: 1.10)
114    #[doc(alias = "GRAPHENE_EULER_ORDER_RZYZ")]
115    Rzyz,
116    #[doc(hidden)]
117    __Unknown(i32),
118}
119
120#[doc(hidden)]
121impl IntoGlib for EulerOrder {
122    type GlibType = ffi::graphene_euler_order_t;
123
124    fn into_glib(self) -> ffi::graphene_euler_order_t {
125        match self {
126            Self::Default => ffi::GRAPHENE_EULER_ORDER_DEFAULT,
127            Self::Xyz => ffi::GRAPHENE_EULER_ORDER_XYZ,
128            Self::Yzx => ffi::GRAPHENE_EULER_ORDER_YZX,
129            Self::Zxy => ffi::GRAPHENE_EULER_ORDER_ZXY,
130            Self::Xzy => ffi::GRAPHENE_EULER_ORDER_XZY,
131            Self::Yxz => ffi::GRAPHENE_EULER_ORDER_YXZ,
132            Self::Zyx => ffi::GRAPHENE_EULER_ORDER_ZYX,
133            Self::Sxyz => ffi::GRAPHENE_EULER_ORDER_SXYZ,
134            Self::Sxyx => ffi::GRAPHENE_EULER_ORDER_SXYX,
135            Self::Sxzy => ffi::GRAPHENE_EULER_ORDER_SXZY,
136            Self::Sxzx => ffi::GRAPHENE_EULER_ORDER_SXZX,
137            Self::Syzx => ffi::GRAPHENE_EULER_ORDER_SYZX,
138            Self::Syzy => ffi::GRAPHENE_EULER_ORDER_SYZY,
139            Self::Syxz => ffi::GRAPHENE_EULER_ORDER_SYXZ,
140            Self::Syxy => ffi::GRAPHENE_EULER_ORDER_SYXY,
141            Self::Szxy => ffi::GRAPHENE_EULER_ORDER_SZXY,
142            Self::Szxz => ffi::GRAPHENE_EULER_ORDER_SZXZ,
143            Self::Szyx => ffi::GRAPHENE_EULER_ORDER_SZYX,
144            Self::Szyz => ffi::GRAPHENE_EULER_ORDER_SZYZ,
145            Self::Rzyx => ffi::GRAPHENE_EULER_ORDER_RZYX,
146            Self::Rxyx => ffi::GRAPHENE_EULER_ORDER_RXYX,
147            Self::Ryzx => ffi::GRAPHENE_EULER_ORDER_RYZX,
148            Self::Rxzx => ffi::GRAPHENE_EULER_ORDER_RXZX,
149            Self::Rxzy => ffi::GRAPHENE_EULER_ORDER_RXZY,
150            Self::Ryzy => ffi::GRAPHENE_EULER_ORDER_RYZY,
151            Self::Rzxy => ffi::GRAPHENE_EULER_ORDER_RZXY,
152            Self::Ryxy => ffi::GRAPHENE_EULER_ORDER_RYXY,
153            Self::Ryxz => ffi::GRAPHENE_EULER_ORDER_RYXZ,
154            Self::Rzxz => ffi::GRAPHENE_EULER_ORDER_RZXZ,
155            Self::Rxyz => ffi::GRAPHENE_EULER_ORDER_RXYZ,
156            Self::Rzyz => ffi::GRAPHENE_EULER_ORDER_RZYZ,
157            Self::__Unknown(value) => value,
158        }
159    }
160}
161
162#[doc(hidden)]
163impl FromGlib<ffi::graphene_euler_order_t> for EulerOrder {
164    unsafe fn from_glib(value: ffi::graphene_euler_order_t) -> Self {
165        skip_assert_initialized!();
166
167        match value {
168            ffi::GRAPHENE_EULER_ORDER_DEFAULT => Self::Default,
169            ffi::GRAPHENE_EULER_ORDER_XYZ => Self::Xyz,
170            ffi::GRAPHENE_EULER_ORDER_YZX => Self::Yzx,
171            ffi::GRAPHENE_EULER_ORDER_ZXY => Self::Zxy,
172            ffi::GRAPHENE_EULER_ORDER_XZY => Self::Xzy,
173            ffi::GRAPHENE_EULER_ORDER_YXZ => Self::Yxz,
174            ffi::GRAPHENE_EULER_ORDER_ZYX => Self::Zyx,
175            ffi::GRAPHENE_EULER_ORDER_SXYZ => Self::Sxyz,
176            ffi::GRAPHENE_EULER_ORDER_SXYX => Self::Sxyx,
177            ffi::GRAPHENE_EULER_ORDER_SXZY => Self::Sxzy,
178            ffi::GRAPHENE_EULER_ORDER_SXZX => Self::Sxzx,
179            ffi::GRAPHENE_EULER_ORDER_SYZX => Self::Syzx,
180            ffi::GRAPHENE_EULER_ORDER_SYZY => Self::Syzy,
181            ffi::GRAPHENE_EULER_ORDER_SYXZ => Self::Syxz,
182            ffi::GRAPHENE_EULER_ORDER_SYXY => Self::Syxy,
183            ffi::GRAPHENE_EULER_ORDER_SZXY => Self::Szxy,
184            ffi::GRAPHENE_EULER_ORDER_SZXZ => Self::Szxz,
185            ffi::GRAPHENE_EULER_ORDER_SZYX => Self::Szyx,
186            ffi::GRAPHENE_EULER_ORDER_SZYZ => Self::Szyz,
187            ffi::GRAPHENE_EULER_ORDER_RZYX => Self::Rzyx,
188            ffi::GRAPHENE_EULER_ORDER_RXYX => Self::Rxyx,
189            ffi::GRAPHENE_EULER_ORDER_RYZX => Self::Ryzx,
190            ffi::GRAPHENE_EULER_ORDER_RXZX => Self::Rxzx,
191            ffi::GRAPHENE_EULER_ORDER_RXZY => Self::Rxzy,
192            ffi::GRAPHENE_EULER_ORDER_RYZY => Self::Ryzy,
193            ffi::GRAPHENE_EULER_ORDER_RZXY => Self::Rzxy,
194            ffi::GRAPHENE_EULER_ORDER_RYXY => Self::Ryxy,
195            ffi::GRAPHENE_EULER_ORDER_RYXZ => Self::Ryxz,
196            ffi::GRAPHENE_EULER_ORDER_RZXZ => Self::Rzxz,
197            ffi::GRAPHENE_EULER_ORDER_RXYZ => Self::Rxyz,
198            ffi::GRAPHENE_EULER_ORDER_RZYZ => Self::Rzyz,
199            value => Self::__Unknown(value),
200        }
201    }
202}
203
204/// The type of intersection.
205#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
206#[non_exhaustive]
207#[doc(alias = "graphene_ray_intersection_kind_t")]
208pub enum RayIntersectionKind {
209    /// No intersection
210    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_NONE")]
211    None,
212    /// The ray is entering the intersected
213    ///  object
214    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_ENTER")]
215    Enter,
216    /// The ray is leaving the intersected
217    ///  object
218    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_LEAVE")]
219    Leave,
220    #[doc(hidden)]
221    __Unknown(i32),
222}
223
224#[doc(hidden)]
225impl IntoGlib for RayIntersectionKind {
226    type GlibType = ffi::graphene_ray_intersection_kind_t;
227
228    #[inline]
229    fn into_glib(self) -> ffi::graphene_ray_intersection_kind_t {
230        match self {
231            Self::None => ffi::GRAPHENE_RAY_INTERSECTION_KIND_NONE,
232            Self::Enter => ffi::GRAPHENE_RAY_INTERSECTION_KIND_ENTER,
233            Self::Leave => ffi::GRAPHENE_RAY_INTERSECTION_KIND_LEAVE,
234            Self::__Unknown(value) => value,
235        }
236    }
237}
238
239#[doc(hidden)]
240impl FromGlib<ffi::graphene_ray_intersection_kind_t> for RayIntersectionKind {
241    #[inline]
242    unsafe fn from_glib(value: ffi::graphene_ray_intersection_kind_t) -> Self {
243        skip_assert_initialized!();
244
245        match value {
246            ffi::GRAPHENE_RAY_INTERSECTION_KIND_NONE => Self::None,
247            ffi::GRAPHENE_RAY_INTERSECTION_KIND_ENTER => Self::Enter,
248            ffi::GRAPHENE_RAY_INTERSECTION_KIND_LEAVE => Self::Leave,
249            value => Self::__Unknown(value),
250        }
251    }
252}