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 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
4 | // DO NOT EDIT |
5 | |
6 | use crate::ffi; |
7 | use glib::{bitflags::bitflags, prelude::*, translate::*}; |
8 | |
9 | bitflags! { |
10 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
11 | #[doc (alias = "GstGLAPI" )] |
12 | pub struct GLAPI: u32 { |
13 | #[doc (alias = "GST_GL_API_OPENGL" )] |
14 | const OPENGL = ffi::GST_GL_API_OPENGL as _; |
15 | #[doc (alias = "GST_GL_API_OPENGL3" )] |
16 | const OPENGL3 = ffi::GST_GL_API_OPENGL3 as _; |
17 | #[doc (alias = "GST_GL_API_GLES1" )] |
18 | const GLES1 = ffi::GST_GL_API_GLES1 as _; |
19 | #[doc (alias = "GST_GL_API_GLES2" )] |
20 | const GLES2 = ffi::GST_GL_API_GLES2 as _; |
21 | } |
22 | } |
23 | |
24 | impl GLAPI { |
25 | #[doc (alias = "gst_gl_api_from_string" )] |
26 | pub fn from_string(api_s: &str) -> GLAPI { |
27 | assert_initialized_main_thread!(); |
28 | unsafe { from_glib(val:ffi::gst_gl_api_from_string(api_s.to_glib_none().0)) } |
29 | } |
30 | |
31 | #[doc (alias = "gst_gl_api_to_string" )] |
32 | #[doc (alias = "to_string" )] |
33 | pub fn to_str(self) -> glib::GString { |
34 | assert_initialized_main_thread!(); |
35 | unsafe { from_glib_full(ptr:ffi::gst_gl_api_to_string(self.into_glib())) } |
36 | } |
37 | } |
38 | |
39 | impl std::fmt::Display for GLAPI { |
40 | #[inline ] |
41 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { |
42 | f.write_str(&self.to_str()) |
43 | } |
44 | } |
45 | |
46 | #[doc (hidden)] |
47 | impl IntoGlib for GLAPI { |
48 | type GlibType = ffi::GstGLAPI; |
49 | |
50 | #[inline ] |
51 | fn into_glib(self) -> ffi::GstGLAPI { |
52 | self.bits() |
53 | } |
54 | } |
55 | |
56 | #[doc (hidden)] |
57 | impl FromGlib<ffi::GstGLAPI> for GLAPI { |
58 | #[inline ] |
59 | unsafe fn from_glib(value: ffi::GstGLAPI) -> Self { |
60 | skip_assert_initialized!(); |
61 | Self::from_bits_truncate(bits:value) |
62 | } |
63 | } |
64 | |
65 | impl StaticType for GLAPI { |
66 | #[inline ] |
67 | #[doc (alias = "gst_gl_api_get_type" )] |
68 | fn static_type() -> glib::Type { |
69 | unsafe { from_glib(val:ffi::gst_gl_api_get_type()) } |
70 | } |
71 | } |
72 | |
73 | impl glib::HasParamSpec for GLAPI { |
74 | type ParamSpec = glib::ParamSpecFlags; |
75 | type SetValue = Self; |
76 | type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>; |
77 | |
78 | fn param_spec_builder() -> Self::BuilderFn { |
79 | Self::ParamSpec::builder |
80 | } |
81 | } |
82 | |
83 | impl glib::value::ValueType for GLAPI { |
84 | type Type = Self; |
85 | } |
86 | |
87 | unsafe impl<'a> glib::value::FromValue<'a> for GLAPI { |
88 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
89 | |
90 | #[inline ] |
91 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
92 | skip_assert_initialized!(); |
93 | from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) |
94 | } |
95 | } |
96 | |
97 | impl ToValue for GLAPI { |
98 | #[inline ] |
99 | fn to_value(&self) -> glib::Value { |
100 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
101 | unsafe { |
102 | glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); |
103 | } |
104 | value |
105 | } |
106 | |
107 | #[inline ] |
108 | fn value_type(&self) -> glib::Type { |
109 | Self::static_type() |
110 | } |
111 | } |
112 | |
113 | impl From<GLAPI> for glib::Value { |
114 | #[inline ] |
115 | fn from(v: GLAPI) -> Self { |
116 | skip_assert_initialized!(); |
117 | ToValue::to_value(&v) |
118 | } |
119 | } |
120 | |
121 | #[cfg (feature = "v1_20" )] |
122 | bitflags! { |
123 | #[cfg_attr(docsrs, doc(cfg(feature = "v1_20" )))] |
124 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
125 | #[doc(alias = "GstGLConfigSurfaceType" )] |
126 | pub struct GLConfigSurfaceType: u32 { |
127 | #[doc(alias = "GST_GL_CONFIG_SURFACE_TYPE_NONE" )] |
128 | const NONE = ffi::GST_GL_CONFIG_SURFACE_TYPE_NONE as _; |
129 | #[doc(alias = "GST_GL_CONFIG_SURFACE_TYPE_WINDOW" )] |
130 | const WINDOW = ffi::GST_GL_CONFIG_SURFACE_TYPE_WINDOW as _; |
131 | #[doc(alias = "GST_GL_CONFIG_SURFACE_TYPE_PBUFFER" )] |
132 | const PBUFFER = ffi::GST_GL_CONFIG_SURFACE_TYPE_PBUFFER as _; |
133 | #[doc(alias = "GST_GL_CONFIG_SURFACE_TYPE_PIXMAP" )] |
134 | const PIXMAP = ffi::GST_GL_CONFIG_SURFACE_TYPE_PIXMAP as _; |
135 | } |
136 | } |
137 | |
138 | #[cfg (feature = "v1_20" )] |
139 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
140 | impl GLConfigSurfaceType { |
141 | #[doc (alias = "gst_gl_config_surface_type_to_string" )] |
142 | #[doc (alias = "to_string" )] |
143 | pub fn to_str(self) -> Option<glib::GString> { |
144 | assert_initialized_main_thread!(); |
145 | unsafe { from_glib_none(ffi::gst_gl_config_surface_type_to_string(self.into_glib())) } |
146 | } |
147 | } |
148 | |
149 | #[cfg (feature = "v1_20" )] |
150 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
151 | #[doc (hidden)] |
152 | impl IntoGlib for GLConfigSurfaceType { |
153 | type GlibType = ffi::GstGLConfigSurfaceType; |
154 | |
155 | #[inline ] |
156 | fn into_glib(self) -> ffi::GstGLConfigSurfaceType { |
157 | self.bits() |
158 | } |
159 | } |
160 | |
161 | #[cfg (feature = "v1_20" )] |
162 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
163 | #[doc (hidden)] |
164 | impl FromGlib<ffi::GstGLConfigSurfaceType> for GLConfigSurfaceType { |
165 | #[inline ] |
166 | unsafe fn from_glib(value: ffi::GstGLConfigSurfaceType) -> Self { |
167 | skip_assert_initialized!(); |
168 | Self::from_bits_truncate(value) |
169 | } |
170 | } |
171 | |
172 | #[cfg (feature = "v1_20" )] |
173 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
174 | impl StaticType for GLConfigSurfaceType { |
175 | #[inline ] |
176 | #[doc (alias = "gst_gl_config_surface_type_get_type" )] |
177 | fn static_type() -> glib::Type { |
178 | unsafe { from_glib(ffi::gst_gl_config_surface_type_get_type()) } |
179 | } |
180 | } |
181 | |
182 | #[cfg (feature = "v1_20" )] |
183 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
184 | impl glib::HasParamSpec for GLConfigSurfaceType { |
185 | type ParamSpec = glib::ParamSpecFlags; |
186 | type SetValue = Self; |
187 | type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>; |
188 | |
189 | fn param_spec_builder() -> Self::BuilderFn { |
190 | Self::ParamSpec::builder |
191 | } |
192 | } |
193 | |
194 | #[cfg (feature = "v1_20" )] |
195 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
196 | impl glib::value::ValueType for GLConfigSurfaceType { |
197 | type Type = Self; |
198 | } |
199 | |
200 | #[cfg (feature = "v1_20" )] |
201 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
202 | unsafe impl<'a> glib::value::FromValue<'a> for GLConfigSurfaceType { |
203 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
204 | |
205 | #[inline ] |
206 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
207 | skip_assert_initialized!(); |
208 | from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) |
209 | } |
210 | } |
211 | |
212 | #[cfg (feature = "v1_20" )] |
213 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
214 | impl ToValue for GLConfigSurfaceType { |
215 | #[inline ] |
216 | fn to_value(&self) -> glib::Value { |
217 | let mut value = glib::Value::for_value_type::<Self>(); |
218 | unsafe { |
219 | glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); |
220 | } |
221 | value |
222 | } |
223 | |
224 | #[inline ] |
225 | fn value_type(&self) -> glib::Type { |
226 | Self::static_type() |
227 | } |
228 | } |
229 | |
230 | #[cfg (feature = "v1_20" )] |
231 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
232 | impl From<GLConfigSurfaceType> for glib::Value { |
233 | #[inline ] |
234 | fn from(v: GLConfigSurfaceType) -> Self { |
235 | skip_assert_initialized!(); |
236 | ToValue::to_value(&v) |
237 | } |
238 | } |
239 | |
240 | bitflags! { |
241 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
242 | #[doc (alias = "GstGLDisplayType" )] |
243 | pub struct GLDisplayType: u32 { |
244 | #[doc (alias = "GST_GL_DISPLAY_TYPE_X11" )] |
245 | const X11 = ffi::GST_GL_DISPLAY_TYPE_X11 as _; |
246 | #[doc (alias = "GST_GL_DISPLAY_TYPE_WAYLAND" )] |
247 | const WAYLAND = ffi::GST_GL_DISPLAY_TYPE_WAYLAND as _; |
248 | #[doc (alias = "GST_GL_DISPLAY_TYPE_COCOA" )] |
249 | const COCOA = ffi::GST_GL_DISPLAY_TYPE_COCOA as _; |
250 | #[doc (alias = "GST_GL_DISPLAY_TYPE_WIN32" )] |
251 | const WIN32 = ffi::GST_GL_DISPLAY_TYPE_WIN32 as _; |
252 | #[doc (alias = "GST_GL_DISPLAY_TYPE_DISPMANX" )] |
253 | const DISPMANX = ffi::GST_GL_DISPLAY_TYPE_DISPMANX as _; |
254 | #[doc (alias = "GST_GL_DISPLAY_TYPE_EGL" )] |
255 | const EGL = ffi::GST_GL_DISPLAY_TYPE_EGL as _; |
256 | #[doc (alias = "GST_GL_DISPLAY_TYPE_VIV_FB" )] |
257 | const VIV_FB = ffi::GST_GL_DISPLAY_TYPE_VIV_FB as _; |
258 | #[doc (alias = "GST_GL_DISPLAY_TYPE_GBM" )] |
259 | const GBM = ffi::GST_GL_DISPLAY_TYPE_GBM as _; |
260 | #[cfg (feature = "v1_18" )] |
261 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
262 | #[doc (alias = "GST_GL_DISPLAY_TYPE_EGL_DEVICE" )] |
263 | const EGL_DEVICE = ffi::GST_GL_DISPLAY_TYPE_EGL_DEVICE as _; |
264 | #[cfg (feature = "v1_20" )] |
265 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
266 | #[doc (alias = "GST_GL_DISPLAY_TYPE_EAGL" )] |
267 | const EAGL = ffi::GST_GL_DISPLAY_TYPE_EAGL as _; |
268 | #[cfg (feature = "v1_20" )] |
269 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
270 | #[doc (alias = "GST_GL_DISPLAY_TYPE_WINRT" )] |
271 | const WINRT = ffi::GST_GL_DISPLAY_TYPE_WINRT as _; |
272 | #[cfg (feature = "v1_20" )] |
273 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
274 | #[doc (alias = "GST_GL_DISPLAY_TYPE_ANDROID" )] |
275 | const ANDROID = ffi::GST_GL_DISPLAY_TYPE_ANDROID as _; |
276 | #[cfg (feature = "v1_24" )] |
277 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
278 | #[doc (alias = "GST_GL_DISPLAY_TYPE_EGL_SURFACELESS" )] |
279 | const EGL_SURFACELESS = ffi::GST_GL_DISPLAY_TYPE_EGL_SURFACELESS as _; |
280 | } |
281 | } |
282 | |
283 | #[doc (hidden)] |
284 | impl IntoGlib for GLDisplayType { |
285 | type GlibType = ffi::GstGLDisplayType; |
286 | |
287 | #[inline ] |
288 | fn into_glib(self) -> ffi::GstGLDisplayType { |
289 | self.bits() |
290 | } |
291 | } |
292 | |
293 | #[doc (hidden)] |
294 | impl FromGlib<ffi::GstGLDisplayType> for GLDisplayType { |
295 | #[inline ] |
296 | unsafe fn from_glib(value: ffi::GstGLDisplayType) -> Self { |
297 | skip_assert_initialized!(); |
298 | Self::from_bits_truncate(bits:value) |
299 | } |
300 | } |
301 | |
302 | impl StaticType for GLDisplayType { |
303 | #[inline ] |
304 | #[doc (alias = "gst_gl_display_type_get_type" )] |
305 | fn static_type() -> glib::Type { |
306 | unsafe { from_glib(val:ffi::gst_gl_display_type_get_type()) } |
307 | } |
308 | } |
309 | |
310 | impl glib::HasParamSpec for GLDisplayType { |
311 | type ParamSpec = glib::ParamSpecFlags; |
312 | type SetValue = Self; |
313 | type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>; |
314 | |
315 | fn param_spec_builder() -> Self::BuilderFn { |
316 | Self::ParamSpec::builder |
317 | } |
318 | } |
319 | |
320 | impl glib::value::ValueType for GLDisplayType { |
321 | type Type = Self; |
322 | } |
323 | |
324 | unsafe impl<'a> glib::value::FromValue<'a> for GLDisplayType { |
325 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
326 | |
327 | #[inline ] |
328 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
329 | skip_assert_initialized!(); |
330 | from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) |
331 | } |
332 | } |
333 | |
334 | impl ToValue for GLDisplayType { |
335 | #[inline ] |
336 | fn to_value(&self) -> glib::Value { |
337 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
338 | unsafe { |
339 | glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); |
340 | } |
341 | value |
342 | } |
343 | |
344 | #[inline ] |
345 | fn value_type(&self) -> glib::Type { |
346 | Self::static_type() |
347 | } |
348 | } |
349 | |
350 | impl From<GLDisplayType> for glib::Value { |
351 | #[inline ] |
352 | fn from(v: GLDisplayType) -> Self { |
353 | skip_assert_initialized!(); |
354 | ToValue::to_value(&v) |
355 | } |
356 | } |
357 | |
358 | bitflags! { |
359 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
360 | #[doc (alias = "GstGLPlatform" )] |
361 | pub struct GLPlatform: u32 { |
362 | #[doc (alias = "GST_GL_PLATFORM_EGL" )] |
363 | const EGL = ffi::GST_GL_PLATFORM_EGL as _; |
364 | #[doc (alias = "GST_GL_PLATFORM_GLX" )] |
365 | const GLX = ffi::GST_GL_PLATFORM_GLX as _; |
366 | #[doc (alias = "GST_GL_PLATFORM_WGL" )] |
367 | const WGL = ffi::GST_GL_PLATFORM_WGL as _; |
368 | #[doc (alias = "GST_GL_PLATFORM_CGL" )] |
369 | const CGL = ffi::GST_GL_PLATFORM_CGL as _; |
370 | #[doc (alias = "GST_GL_PLATFORM_EAGL" )] |
371 | const EAGL = ffi::GST_GL_PLATFORM_EAGL as _; |
372 | } |
373 | } |
374 | |
375 | impl GLPlatform { |
376 | #[doc (alias = "gst_gl_platform_from_string" )] |
377 | pub fn from_string(platform_s: &str) -> GLPlatform { |
378 | assert_initialized_main_thread!(); |
379 | unsafe { |
380 | from_glib(val:ffi::gst_gl_platform_from_string( |
381 | platform_s.to_glib_none().0, |
382 | )) |
383 | } |
384 | } |
385 | |
386 | #[doc (alias = "gst_gl_platform_to_string" )] |
387 | #[doc (alias = "to_string" )] |
388 | pub fn to_str(self) -> glib::GString { |
389 | assert_initialized_main_thread!(); |
390 | unsafe { from_glib_full(ptr:ffi::gst_gl_platform_to_string(self.into_glib())) } |
391 | } |
392 | } |
393 | |
394 | impl std::fmt::Display for GLPlatform { |
395 | #[inline ] |
396 | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { |
397 | f.write_str(&self.to_str()) |
398 | } |
399 | } |
400 | |
401 | #[doc (hidden)] |
402 | impl IntoGlib for GLPlatform { |
403 | type GlibType = ffi::GstGLPlatform; |
404 | |
405 | #[inline ] |
406 | fn into_glib(self) -> ffi::GstGLPlatform { |
407 | self.bits() |
408 | } |
409 | } |
410 | |
411 | #[doc (hidden)] |
412 | impl FromGlib<ffi::GstGLPlatform> for GLPlatform { |
413 | #[inline ] |
414 | unsafe fn from_glib(value: ffi::GstGLPlatform) -> Self { |
415 | skip_assert_initialized!(); |
416 | Self::from_bits_truncate(bits:value) |
417 | } |
418 | } |
419 | |
420 | impl StaticType for GLPlatform { |
421 | #[inline ] |
422 | #[doc (alias = "gst_gl_platform_get_type" )] |
423 | fn static_type() -> glib::Type { |
424 | unsafe { from_glib(val:ffi::gst_gl_platform_get_type()) } |
425 | } |
426 | } |
427 | |
428 | impl glib::HasParamSpec for GLPlatform { |
429 | type ParamSpec = glib::ParamSpecFlags; |
430 | type SetValue = Self; |
431 | type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>; |
432 | |
433 | fn param_spec_builder() -> Self::BuilderFn { |
434 | Self::ParamSpec::builder |
435 | } |
436 | } |
437 | |
438 | impl glib::value::ValueType for GLPlatform { |
439 | type Type = Self; |
440 | } |
441 | |
442 | unsafe impl<'a> glib::value::FromValue<'a> for GLPlatform { |
443 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
444 | |
445 | #[inline ] |
446 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
447 | skip_assert_initialized!(); |
448 | from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) |
449 | } |
450 | } |
451 | |
452 | impl ToValue for GLPlatform { |
453 | #[inline ] |
454 | fn to_value(&self) -> glib::Value { |
455 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
456 | unsafe { |
457 | glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); |
458 | } |
459 | value |
460 | } |
461 | |
462 | #[inline ] |
463 | fn value_type(&self) -> glib::Type { |
464 | Self::static_type() |
465 | } |
466 | } |
467 | |
468 | impl From<GLPlatform> for glib::Value { |
469 | #[inline ] |
470 | fn from(v: GLPlatform) -> Self { |
471 | skip_assert_initialized!(); |
472 | ToValue::to_value(&v) |
473 | } |
474 | } |
475 | |
476 | bitflags! { |
477 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
478 | #[doc (alias = "GstGLSLProfile" )] |
479 | pub struct GLSLProfile: u32 { |
480 | #[doc (alias = "GST_GLSL_PROFILE_ES" )] |
481 | const ES = ffi::GST_GLSL_PROFILE_ES as _; |
482 | #[doc (alias = "GST_GLSL_PROFILE_CORE" )] |
483 | const CORE = ffi::GST_GLSL_PROFILE_CORE as _; |
484 | #[doc (alias = "GST_GLSL_PROFILE_COMPATIBILITY" )] |
485 | const COMPATIBILITY = ffi::GST_GLSL_PROFILE_COMPATIBILITY as _; |
486 | } |
487 | } |
488 | |
489 | impl GLSLProfile { |
490 | #[doc (alias = "gst_glsl_profile_from_string" )] |
491 | pub fn from_string(string: &str) -> GLSLProfile { |
492 | assert_initialized_main_thread!(); |
493 | unsafe { from_glib(val:ffi::gst_glsl_profile_from_string(string.to_glib_none().0)) } |
494 | } |
495 | |
496 | #[doc (alias = "gst_glsl_profile_to_string" )] |
497 | #[doc (alias = "to_string" )] |
498 | pub fn to_str(self) -> Option<glib::GString> { |
499 | assert_initialized_main_thread!(); |
500 | unsafe { from_glib_none(ptr:ffi::gst_glsl_profile_to_string(self.into_glib())) } |
501 | } |
502 | } |
503 | |
504 | #[doc (hidden)] |
505 | impl IntoGlib for GLSLProfile { |
506 | type GlibType = ffi::GstGLSLProfile; |
507 | |
508 | #[inline ] |
509 | fn into_glib(self) -> ffi::GstGLSLProfile { |
510 | self.bits() |
511 | } |
512 | } |
513 | |
514 | #[doc (hidden)] |
515 | impl FromGlib<ffi::GstGLSLProfile> for GLSLProfile { |
516 | #[inline ] |
517 | unsafe fn from_glib(value: ffi::GstGLSLProfile) -> Self { |
518 | skip_assert_initialized!(); |
519 | Self::from_bits_truncate(bits:value) |
520 | } |
521 | } |
522 | |
523 | impl StaticType for GLSLProfile { |
524 | #[inline ] |
525 | #[doc (alias = "gst_glsl_profile_get_type" )] |
526 | fn static_type() -> glib::Type { |
527 | unsafe { from_glib(val:ffi::gst_glsl_profile_get_type()) } |
528 | } |
529 | } |
530 | |
531 | impl glib::HasParamSpec for GLSLProfile { |
532 | type ParamSpec = glib::ParamSpecFlags; |
533 | type SetValue = Self; |
534 | type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>; |
535 | |
536 | fn param_spec_builder() -> Self::BuilderFn { |
537 | Self::ParamSpec::builder |
538 | } |
539 | } |
540 | |
541 | impl glib::value::ValueType for GLSLProfile { |
542 | type Type = Self; |
543 | } |
544 | |
545 | unsafe impl<'a> glib::value::FromValue<'a> for GLSLProfile { |
546 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
547 | |
548 | #[inline ] |
549 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
550 | skip_assert_initialized!(); |
551 | from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) |
552 | } |
553 | } |
554 | |
555 | impl ToValue for GLSLProfile { |
556 | #[inline ] |
557 | fn to_value(&self) -> glib::Value { |
558 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
559 | unsafe { |
560 | glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib()); |
561 | } |
562 | value |
563 | } |
564 | |
565 | #[inline ] |
566 | fn value_type(&self) -> glib::Type { |
567 | Self::static_type() |
568 | } |
569 | } |
570 | |
571 | impl From<GLSLProfile> for glib::Value { |
572 | #[inline ] |
573 | fn from(v: GLSLProfile) -> Self { |
574 | skip_assert_initialized!(); |
575 | ToValue::to_value(&v) |
576 | } |
577 | } |
578 | |