graphene/auto/
enums.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::ffi;
use glib::translate::*;

/// Specify the order of the rotations on each axis.
///
/// The [`Default`][Self::Default] value is special, and is used
/// as an alias for one of the other orders.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "graphene_euler_order_t")]
pub enum EulerOrder {
    /// Rotate in the default order; the
    ///  default order is one of the following enumeration values
    #[doc(alias = "GRAPHENE_EULER_ORDER_DEFAULT")]
    Default,
    /// Rotate in the X, Y, and Z order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Sxyz`][Self::Sxyz]
    #[doc(alias = "GRAPHENE_EULER_ORDER_XYZ")]
    Xyz,
    /// Rotate in the Y, Z, and X order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Syzx`][Self::Syzx]
    #[doc(alias = "GRAPHENE_EULER_ORDER_YZX")]
    Yzx,
    /// Rotate in the Z, X, and Y order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Szxy`][Self::Szxy]
    #[doc(alias = "GRAPHENE_EULER_ORDER_ZXY")]
    Zxy,
    /// Rotate in the X, Z, and Y order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Sxzy`][Self::Sxzy]
    #[doc(alias = "GRAPHENE_EULER_ORDER_XZY")]
    Xzy,
    /// Rotate in the Y, X, and Z order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Syxz`][Self::Syxz]
    #[doc(alias = "GRAPHENE_EULER_ORDER_YXZ")]
    Yxz,
    /// Rotate in the Z, Y, and X order. Deprecated in
    ///  Graphene 1.10, it's an alias for [`Szyx`][Self::Szyx]
    #[doc(alias = "GRAPHENE_EULER_ORDER_ZYX")]
    Zyx,
    /// Defines a static rotation along the X, Y, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYZ")]
    Sxyz,
    /// Defines a static rotation along the X, Y, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYX")]
    Sxyx,
    /// Defines a static rotation along the X, Z, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZY")]
    Sxzy,
    /// Defines a static rotation along the X, Z, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZX")]
    Sxzx,
    /// Defines a static rotation along the Y, Z, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZX")]
    Syzx,
    /// Defines a static rotation along the Y, Z, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZY")]
    Syzy,
    /// Defines a static rotation along the Y, X, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXZ")]
    Syxz,
    /// Defines a static rotation along the Y, X, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXY")]
    Syxy,
    /// Defines a static rotation along the Z, X, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXY")]
    Szxy,
    /// Defines a static rotation along the Z, X, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXZ")]
    Szxz,
    /// Defines a static rotation along the Z, Y, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYX")]
    Szyx,
    /// Defines a static rotation along the Z, Y, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYZ")]
    Szyz,
    /// Defines a relative rotation along the Z, Y, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZYX")]
    Rzyx,
    /// Defines a relative rotation along the X, Y, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYX")]
    Rxyx,
    /// Defines a relative rotation along the Y, Z, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZX")]
    Ryzx,
    /// Defines a relative rotation along the X, Z, and X axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZX")]
    Rxzx,
    /// Defines a relative rotation along the X, Z, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZY")]
    Rxzy,
    /// Defines a relative rotation along the Y, Z, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZY")]
    Ryzy,
    /// Defines a relative rotation along the Z, X, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXY")]
    Rzxy,
    /// Defines a relative rotation along the Y, X, and Y axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXY")]
    Ryxy,
    /// Defines a relative rotation along the Y, X, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXZ")]
    Ryxz,
    /// Defines a relative rotation along the Z, X, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXZ")]
    Rzxz,
    /// Defines a relative rotation along the X, Y, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYZ")]
    Rxyz,
    /// Defines a relative rotation along the Z, Y, and Z axes (Since: 1.10)
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZYZ")]
    Rzyz,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl IntoGlib for EulerOrder {
    type GlibType = ffi::graphene_euler_order_t;

    fn into_glib(self) -> ffi::graphene_euler_order_t {
        match self {
            Self::Default => ffi::GRAPHENE_EULER_ORDER_DEFAULT,
            Self::Xyz => ffi::GRAPHENE_EULER_ORDER_XYZ,
            Self::Yzx => ffi::GRAPHENE_EULER_ORDER_YZX,
            Self::Zxy => ffi::GRAPHENE_EULER_ORDER_ZXY,
            Self::Xzy => ffi::GRAPHENE_EULER_ORDER_XZY,
            Self::Yxz => ffi::GRAPHENE_EULER_ORDER_YXZ,
            Self::Zyx => ffi::GRAPHENE_EULER_ORDER_ZYX,
            Self::Sxyz => ffi::GRAPHENE_EULER_ORDER_SXYZ,
            Self::Sxyx => ffi::GRAPHENE_EULER_ORDER_SXYX,
            Self::Sxzy => ffi::GRAPHENE_EULER_ORDER_SXZY,
            Self::Sxzx => ffi::GRAPHENE_EULER_ORDER_SXZX,
            Self::Syzx => ffi::GRAPHENE_EULER_ORDER_SYZX,
            Self::Syzy => ffi::GRAPHENE_EULER_ORDER_SYZY,
            Self::Syxz => ffi::GRAPHENE_EULER_ORDER_SYXZ,
            Self::Syxy => ffi::GRAPHENE_EULER_ORDER_SYXY,
            Self::Szxy => ffi::GRAPHENE_EULER_ORDER_SZXY,
            Self::Szxz => ffi::GRAPHENE_EULER_ORDER_SZXZ,
            Self::Szyx => ffi::GRAPHENE_EULER_ORDER_SZYX,
            Self::Szyz => ffi::GRAPHENE_EULER_ORDER_SZYZ,
            Self::Rzyx => ffi::GRAPHENE_EULER_ORDER_RZYX,
            Self::Rxyx => ffi::GRAPHENE_EULER_ORDER_RXYX,
            Self::Ryzx => ffi::GRAPHENE_EULER_ORDER_RYZX,
            Self::Rxzx => ffi::GRAPHENE_EULER_ORDER_RXZX,
            Self::Rxzy => ffi::GRAPHENE_EULER_ORDER_RXZY,
            Self::Ryzy => ffi::GRAPHENE_EULER_ORDER_RYZY,
            Self::Rzxy => ffi::GRAPHENE_EULER_ORDER_RZXY,
            Self::Ryxy => ffi::GRAPHENE_EULER_ORDER_RYXY,
            Self::Ryxz => ffi::GRAPHENE_EULER_ORDER_RYXZ,
            Self::Rzxz => ffi::GRAPHENE_EULER_ORDER_RZXZ,
            Self::Rxyz => ffi::GRAPHENE_EULER_ORDER_RXYZ,
            Self::Rzyz => ffi::GRAPHENE_EULER_ORDER_RZYZ,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::graphene_euler_order_t> for EulerOrder {
    unsafe fn from_glib(value: ffi::graphene_euler_order_t) -> Self {
        skip_assert_initialized!();

        match value {
            ffi::GRAPHENE_EULER_ORDER_DEFAULT => Self::Default,
            ffi::GRAPHENE_EULER_ORDER_XYZ => Self::Xyz,
            ffi::GRAPHENE_EULER_ORDER_YZX => Self::Yzx,
            ffi::GRAPHENE_EULER_ORDER_ZXY => Self::Zxy,
            ffi::GRAPHENE_EULER_ORDER_XZY => Self::Xzy,
            ffi::GRAPHENE_EULER_ORDER_YXZ => Self::Yxz,
            ffi::GRAPHENE_EULER_ORDER_ZYX => Self::Zyx,
            ffi::GRAPHENE_EULER_ORDER_SXYZ => Self::Sxyz,
            ffi::GRAPHENE_EULER_ORDER_SXYX => Self::Sxyx,
            ffi::GRAPHENE_EULER_ORDER_SXZY => Self::Sxzy,
            ffi::GRAPHENE_EULER_ORDER_SXZX => Self::Sxzx,
            ffi::GRAPHENE_EULER_ORDER_SYZX => Self::Syzx,
            ffi::GRAPHENE_EULER_ORDER_SYZY => Self::Syzy,
            ffi::GRAPHENE_EULER_ORDER_SYXZ => Self::Syxz,
            ffi::GRAPHENE_EULER_ORDER_SYXY => Self::Syxy,
            ffi::GRAPHENE_EULER_ORDER_SZXY => Self::Szxy,
            ffi::GRAPHENE_EULER_ORDER_SZXZ => Self::Szxz,
            ffi::GRAPHENE_EULER_ORDER_SZYX => Self::Szyx,
            ffi::GRAPHENE_EULER_ORDER_SZYZ => Self::Szyz,
            ffi::GRAPHENE_EULER_ORDER_RZYX => Self::Rzyx,
            ffi::GRAPHENE_EULER_ORDER_RXYX => Self::Rxyx,
            ffi::GRAPHENE_EULER_ORDER_RYZX => Self::Ryzx,
            ffi::GRAPHENE_EULER_ORDER_RXZX => Self::Rxzx,
            ffi::GRAPHENE_EULER_ORDER_RXZY => Self::Rxzy,
            ffi::GRAPHENE_EULER_ORDER_RYZY => Self::Ryzy,
            ffi::GRAPHENE_EULER_ORDER_RZXY => Self::Rzxy,
            ffi::GRAPHENE_EULER_ORDER_RYXY => Self::Ryxy,
            ffi::GRAPHENE_EULER_ORDER_RYXZ => Self::Ryxz,
            ffi::GRAPHENE_EULER_ORDER_RZXZ => Self::Rzxz,
            ffi::GRAPHENE_EULER_ORDER_RXYZ => Self::Rxyz,
            ffi::GRAPHENE_EULER_ORDER_RZYZ => Self::Rzyz,
            value => Self::__Unknown(value),
        }
    }
}

/// The type of intersection.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "graphene_ray_intersection_kind_t")]
pub enum RayIntersectionKind {
    /// No intersection
    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_NONE")]
    None,
    /// The ray is entering the intersected
    ///  object
    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_ENTER")]
    Enter,
    /// The ray is leaving the intersected
    ///  object
    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_LEAVE")]
    Leave,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl IntoGlib for RayIntersectionKind {
    type GlibType = ffi::graphene_ray_intersection_kind_t;

    #[inline]
    fn into_glib(self) -> ffi::graphene_ray_intersection_kind_t {
        match self {
            Self::None => ffi::GRAPHENE_RAY_INTERSECTION_KIND_NONE,
            Self::Enter => ffi::GRAPHENE_RAY_INTERSECTION_KIND_ENTER,
            Self::Leave => ffi::GRAPHENE_RAY_INTERSECTION_KIND_LEAVE,
            Self::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<ffi::graphene_ray_intersection_kind_t> for RayIntersectionKind {
    #[inline]
    unsafe fn from_glib(value: ffi::graphene_ray_intersection_kind_t) -> Self {
        skip_assert_initialized!();

        match value {
            ffi::GRAPHENE_RAY_INTERSECTION_KIND_NONE => Self::None,
            ffi::GRAPHENE_RAY_INTERSECTION_KIND_ENTER => Self::Enter,
            ffi::GRAPHENE_RAY_INTERSECTION_KIND_LEAVE => Self::Leave,
            value => Self::__Unknown(value),
        }
    }
}