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
// 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::*;

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "graphene_euler_order_t")]
pub enum EulerOrder {
    #[doc(alias = "GRAPHENE_EULER_ORDER_DEFAULT")]
    Default,
    #[doc(alias = "GRAPHENE_EULER_ORDER_XYZ")]
    Xyz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_YZX")]
    Yzx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_ZXY")]
    Zxy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_XZY")]
    Xzy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_YXZ")]
    Yxz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_ZYX")]
    Zyx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYZ")]
    Sxyz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXYX")]
    Sxyx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZY")]
    Sxzy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SXZX")]
    Sxzx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZX")]
    Syzx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYZY")]
    Syzy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXZ")]
    Syxz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SYXY")]
    Syxy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXY")]
    Szxy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZXZ")]
    Szxz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYX")]
    Szyx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_SZYZ")]
    Szyz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZYX")]
    Rzyx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYX")]
    Rxyx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZX")]
    Ryzx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZX")]
    Rxzx,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXZY")]
    Rxzy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYZY")]
    Ryzy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXY")]
    Rzxy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXY")]
    Ryxy,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RYXZ")]
    Ryxz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RZXZ")]
    Rzxz,
    #[doc(alias = "GRAPHENE_EULER_ORDER_RXYZ")]
    Rxyz,
    #[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),
        }
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "graphene_ray_intersection_kind_t")]
pub enum RayIntersectionKind {
    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_NONE")]
    None,
    #[doc(alias = "GRAPHENE_RAY_INTERSECTION_KIND_ENTER")]
    Enter,
    #[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),
        }
    }
}