1use gio_sys;
6use glib::translate::*;
7use glib::value::FromValue;
8use glib::value::FromValueOptional;
9use glib::value::SetValue;
10use glib::value::Value;
11use glib::StaticType;
12use glib::Type;
13use gobject_sys;
14
15bitflags! {
16 pub struct AppInfoCreateFlags: u32 {
17 const NONE = 0;
18 const NEEDS_TERMINAL = 1;
19 const SUPPORTS_URIS = 2;
20 const SUPPORTS_STARTUP_NOTIFICATION = 4;
21 }
22}
23
24#[doc(hidden)]
25impl ToGlib for AppInfoCreateFlags {
26 type GlibType = gio_sys::GAppInfoCreateFlags;
27
28 fn to_glib(&self) -> gio_sys::GAppInfoCreateFlags {
29 self.bits()
30 }
31}
32
33#[doc(hidden)]
34impl FromGlib<gio_sys::GAppInfoCreateFlags> for AppInfoCreateFlags {
35 fn from_glib(value: gio_sys::GAppInfoCreateFlags) -> AppInfoCreateFlags {
36 AppInfoCreateFlags::from_bits_truncate(value)
37 }
38}
39
40impl StaticType for AppInfoCreateFlags {
41 fn static_type() -> Type {
42 unsafe { from_glib(gio_sys::g_app_info_create_flags_get_type()) }
43 }
44}
45
46impl<'a> FromValueOptional<'a> for AppInfoCreateFlags {
47 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
48 Some(FromValue::from_value(value))
49 }
50}
51
52impl<'a> FromValue<'a> for AppInfoCreateFlags {
53 unsafe fn from_value(value: &Value) -> Self {
54 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
55 }
56}
57
58impl SetValue for AppInfoCreateFlags {
59 unsafe fn set_value(value: &mut Value, this: &Self) {
60 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
61 }
62}
63
64bitflags! {
65 pub struct ApplicationFlags: u32 {
66 const FLAGS_NONE = 0;
67 const IS_SERVICE = 1;
68 const IS_LAUNCHER = 2;
69 const HANDLES_OPEN = 4;
70 const HANDLES_COMMAND_LINE = 8;
71 const SEND_ENVIRONMENT = 16;
72 const NON_UNIQUE = 32;
73 const CAN_OVERRIDE_APP_ID = 64;
74 }
75}
76
77#[doc(hidden)]
78impl ToGlib for ApplicationFlags {
79 type GlibType = gio_sys::GApplicationFlags;
80
81 fn to_glib(&self) -> gio_sys::GApplicationFlags {
82 self.bits()
83 }
84}
85
86#[doc(hidden)]
87impl FromGlib<gio_sys::GApplicationFlags> for ApplicationFlags {
88 fn from_glib(value: gio_sys::GApplicationFlags) -> ApplicationFlags {
89 ApplicationFlags::from_bits_truncate(value)
90 }
91}
92
93impl StaticType for ApplicationFlags {
94 fn static_type() -> Type {
95 unsafe { from_glib(gio_sys::g_application_flags_get_type()) }
96 }
97}
98
99impl<'a> FromValueOptional<'a> for ApplicationFlags {
100 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
101 Some(FromValue::from_value(value))
102 }
103}
104
105impl<'a> FromValue<'a> for ApplicationFlags {
106 unsafe fn from_value(value: &Value) -> Self {
107 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
108 }
109}
110
111impl SetValue for ApplicationFlags {
112 unsafe fn set_value(value: &mut Value, this: &Self) {
113 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
114 }
115}
116
117bitflags! {
118 pub struct AskPasswordFlags: u32 {
119 const NEED_PASSWORD = 1;
120 const NEED_USERNAME = 2;
121 const NEED_DOMAIN = 4;
122 const SAVING_SUPPORTED = 8;
123 const ANONYMOUS_SUPPORTED = 16;
124 const TCRYPT = 32;
125 }
126}
127
128#[doc(hidden)]
129impl ToGlib for AskPasswordFlags {
130 type GlibType = gio_sys::GAskPasswordFlags;
131
132 fn to_glib(&self) -> gio_sys::GAskPasswordFlags {
133 self.bits()
134 }
135}
136
137#[doc(hidden)]
138impl FromGlib<gio_sys::GAskPasswordFlags> for AskPasswordFlags {
139 fn from_glib(value: gio_sys::GAskPasswordFlags) -> AskPasswordFlags {
140 AskPasswordFlags::from_bits_truncate(value)
141 }
142}
143
144impl StaticType for AskPasswordFlags {
145 fn static_type() -> Type {
146 unsafe { from_glib(gio_sys::g_ask_password_flags_get_type()) }
147 }
148}
149
150impl<'a> FromValueOptional<'a> for AskPasswordFlags {
151 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
152 Some(FromValue::from_value(value))
153 }
154}
155
156impl<'a> FromValue<'a> for AskPasswordFlags {
157 unsafe fn from_value(value: &Value) -> Self {
158 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
159 }
160}
161
162impl SetValue for AskPasswordFlags {
163 unsafe fn set_value(value: &mut Value, this: &Self) {
164 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
165 }
166}
167
168bitflags! {
169 pub struct ConverterFlags: u32 {
170 const NONE = 0;
171 const INPUT_AT_END = 1;
172 const FLUSH = 2;
173 }
174}
175
176#[doc(hidden)]
177impl ToGlib for ConverterFlags {
178 type GlibType = gio_sys::GConverterFlags;
179
180 fn to_glib(&self) -> gio_sys::GConverterFlags {
181 self.bits()
182 }
183}
184
185#[doc(hidden)]
186impl FromGlib<gio_sys::GConverterFlags> for ConverterFlags {
187 fn from_glib(value: gio_sys::GConverterFlags) -> ConverterFlags {
188 ConverterFlags::from_bits_truncate(value)
189 }
190}
191
192impl StaticType for ConverterFlags {
193 fn static_type() -> Type {
194 unsafe { from_glib(gio_sys::g_converter_flags_get_type()) }
195 }
196}
197
198impl<'a> FromValueOptional<'a> for ConverterFlags {
199 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
200 Some(FromValue::from_value(value))
201 }
202}
203
204impl<'a> FromValue<'a> for ConverterFlags {
205 unsafe fn from_value(value: &Value) -> Self {
206 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
207 }
208}
209
210impl SetValue for ConverterFlags {
211 unsafe fn set_value(value: &mut Value, this: &Self) {
212 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
213 }
214}
215
216bitflags! {
217 pub struct DriveStartFlags: u32 {
218 const NONE = 0;
219 }
220}
221
222#[doc(hidden)]
223impl ToGlib for DriveStartFlags {
224 type GlibType = gio_sys::GDriveStartFlags;
225
226 fn to_glib(&self) -> gio_sys::GDriveStartFlags {
227 self.bits()
228 }
229}
230
231#[doc(hidden)]
232impl FromGlib<gio_sys::GDriveStartFlags> for DriveStartFlags {
233 fn from_glib(value: gio_sys::GDriveStartFlags) -> DriveStartFlags {
234 DriveStartFlags::from_bits_truncate(value)
235 }
236}
237
238impl StaticType for DriveStartFlags {
239 fn static_type() -> Type {
240 unsafe { from_glib(gio_sys::g_drive_start_flags_get_type()) }
241 }
242}
243
244impl<'a> FromValueOptional<'a> for DriveStartFlags {
245 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
246 Some(FromValue::from_value(value))
247 }
248}
249
250impl<'a> FromValue<'a> for DriveStartFlags {
251 unsafe fn from_value(value: &Value) -> Self {
252 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
253 }
254}
255
256impl SetValue for DriveStartFlags {
257 unsafe fn set_value(value: &mut Value, this: &Self) {
258 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
259 }
260}
261
262bitflags! {
263 pub struct FileCopyFlags: u32 {
264 const NONE = 0;
265 const OVERWRITE = 1;
266 const BACKUP = 2;
267 const NOFOLLOW_SYMLINKS = 4;
268 const ALL_METADATA = 8;
269 const NO_FALLBACK_FOR_MOVE = 16;
270 const TARGET_DEFAULT_PERMS = 32;
271 }
272}
273
274#[doc(hidden)]
275impl ToGlib for FileCopyFlags {
276 type GlibType = gio_sys::GFileCopyFlags;
277
278 fn to_glib(&self) -> gio_sys::GFileCopyFlags {
279 self.bits()
280 }
281}
282
283#[doc(hidden)]
284impl FromGlib<gio_sys::GFileCopyFlags> for FileCopyFlags {
285 fn from_glib(value: gio_sys::GFileCopyFlags) -> FileCopyFlags {
286 FileCopyFlags::from_bits_truncate(value)
287 }
288}
289
290impl StaticType for FileCopyFlags {
291 fn static_type() -> Type {
292 unsafe { from_glib(gio_sys::g_file_copy_flags_get_type()) }
293 }
294}
295
296impl<'a> FromValueOptional<'a> for FileCopyFlags {
297 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
298 Some(FromValue::from_value(value))
299 }
300}
301
302impl<'a> FromValue<'a> for FileCopyFlags {
303 unsafe fn from_value(value: &Value) -> Self {
304 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
305 }
306}
307
308impl SetValue for FileCopyFlags {
309 unsafe fn set_value(value: &mut Value, this: &Self) {
310 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
311 }
312}
313
314bitflags! {
315 pub struct FileCreateFlags: u32 {
316 const NONE = 0;
317 const PRIVATE = 1;
318 const REPLACE_DESTINATION = 2;
319 }
320}
321
322#[doc(hidden)]
323impl ToGlib for FileCreateFlags {
324 type GlibType = gio_sys::GFileCreateFlags;
325
326 fn to_glib(&self) -> gio_sys::GFileCreateFlags {
327 self.bits()
328 }
329}
330
331#[doc(hidden)]
332impl FromGlib<gio_sys::GFileCreateFlags> for FileCreateFlags {
333 fn from_glib(value: gio_sys::GFileCreateFlags) -> FileCreateFlags {
334 FileCreateFlags::from_bits_truncate(value)
335 }
336}
337
338impl StaticType for FileCreateFlags {
339 fn static_type() -> Type {
340 unsafe { from_glib(gio_sys::g_file_create_flags_get_type()) }
341 }
342}
343
344impl<'a> FromValueOptional<'a> for FileCreateFlags {
345 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
346 Some(FromValue::from_value(value))
347 }
348}
349
350impl<'a> FromValue<'a> for FileCreateFlags {
351 unsafe fn from_value(value: &Value) -> Self {
352 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
353 }
354}
355
356impl SetValue for FileCreateFlags {
357 unsafe fn set_value(value: &mut Value, this: &Self) {
358 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
359 }
360}
361
362bitflags! {
363 pub struct FileMeasureFlags: u32 {
364 const NONE = 0;
365 const REPORT_ANY_ERROR = 2;
366 const APPARENT_SIZE = 4;
367 const NO_XDEV = 8;
368 }
369}
370
371#[doc(hidden)]
372impl ToGlib for FileMeasureFlags {
373 type GlibType = gio_sys::GFileMeasureFlags;
374
375 fn to_glib(&self) -> gio_sys::GFileMeasureFlags {
376 self.bits()
377 }
378}
379
380#[doc(hidden)]
381impl FromGlib<gio_sys::GFileMeasureFlags> for FileMeasureFlags {
382 fn from_glib(value: gio_sys::GFileMeasureFlags) -> FileMeasureFlags {
383 FileMeasureFlags::from_bits_truncate(value)
384 }
385}
386
387impl StaticType for FileMeasureFlags {
388 fn static_type() -> Type {
389 unsafe { from_glib(gio_sys::g_file_measure_flags_get_type()) }
390 }
391}
392
393impl<'a> FromValueOptional<'a> for FileMeasureFlags {
394 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
395 Some(FromValue::from_value(value))
396 }
397}
398
399impl<'a> FromValue<'a> for FileMeasureFlags {
400 unsafe fn from_value(value: &Value) -> Self {
401 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
402 }
403}
404
405impl SetValue for FileMeasureFlags {
406 unsafe fn set_value(value: &mut Value, this: &Self) {
407 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
408 }
409}
410
411bitflags! {
412 pub struct FileMonitorFlags: u32 {
413 const NONE = 0;
414 const WATCH_MOUNTS = 1;
415 const SEND_MOVED = 2;
416 const WATCH_HARD_LINKS = 4;
417 const WATCH_MOVES = 8;
418 }
419}
420
421#[doc(hidden)]
422impl ToGlib for FileMonitorFlags {
423 type GlibType = gio_sys::GFileMonitorFlags;
424
425 fn to_glib(&self) -> gio_sys::GFileMonitorFlags {
426 self.bits()
427 }
428}
429
430#[doc(hidden)]
431impl FromGlib<gio_sys::GFileMonitorFlags> for FileMonitorFlags {
432 fn from_glib(value: gio_sys::GFileMonitorFlags) -> FileMonitorFlags {
433 FileMonitorFlags::from_bits_truncate(value)
434 }
435}
436
437impl StaticType for FileMonitorFlags {
438 fn static_type() -> Type {
439 unsafe { from_glib(gio_sys::g_file_monitor_flags_get_type()) }
440 }
441}
442
443impl<'a> FromValueOptional<'a> for FileMonitorFlags {
444 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
445 Some(FromValue::from_value(value))
446 }
447}
448
449impl<'a> FromValue<'a> for FileMonitorFlags {
450 unsafe fn from_value(value: &Value) -> Self {
451 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
452 }
453}
454
455impl SetValue for FileMonitorFlags {
456 unsafe fn set_value(value: &mut Value, this: &Self) {
457 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
458 }
459}
460
461bitflags! {
462 pub struct FileQueryInfoFlags: u32 {
463 const NONE = 0;
464 const NOFOLLOW_SYMLINKS = 1;
465 }
466}
467
468#[doc(hidden)]
469impl ToGlib for FileQueryInfoFlags {
470 type GlibType = gio_sys::GFileQueryInfoFlags;
471
472 fn to_glib(&self) -> gio_sys::GFileQueryInfoFlags {
473 self.bits()
474 }
475}
476
477#[doc(hidden)]
478impl FromGlib<gio_sys::GFileQueryInfoFlags> for FileQueryInfoFlags {
479 fn from_glib(value: gio_sys::GFileQueryInfoFlags) -> FileQueryInfoFlags {
480 FileQueryInfoFlags::from_bits_truncate(value)
481 }
482}
483
484impl StaticType for FileQueryInfoFlags {
485 fn static_type() -> Type {
486 unsafe { from_glib(gio_sys::g_file_query_info_flags_get_type()) }
487 }
488}
489
490impl<'a> FromValueOptional<'a> for FileQueryInfoFlags {
491 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
492 Some(FromValue::from_value(value))
493 }
494}
495
496impl<'a> FromValue<'a> for FileQueryInfoFlags {
497 unsafe fn from_value(value: &Value) -> Self {
498 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
499 }
500}
501
502impl SetValue for FileQueryInfoFlags {
503 unsafe fn set_value(value: &mut Value, this: &Self) {
504 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
505 }
506}
507
508bitflags! {
509 pub struct IOStreamSpliceFlags: u32 {
510 const NONE = 0;
511 const CLOSE_STREAM1 = 1;
512 const CLOSE_STREAM2 = 2;
513 const WAIT_FOR_BOTH = 4;
514 }
515}
516
517#[doc(hidden)]
518impl ToGlib for IOStreamSpliceFlags {
519 type GlibType = gio_sys::GIOStreamSpliceFlags;
520
521 fn to_glib(&self) -> gio_sys::GIOStreamSpliceFlags {
522 self.bits()
523 }
524}
525
526#[doc(hidden)]
527impl FromGlib<gio_sys::GIOStreamSpliceFlags> for IOStreamSpliceFlags {
528 fn from_glib(value: gio_sys::GIOStreamSpliceFlags) -> IOStreamSpliceFlags {
529 IOStreamSpliceFlags::from_bits_truncate(value)
530 }
531}
532
533impl StaticType for IOStreamSpliceFlags {
534 fn static_type() -> Type {
535 unsafe { from_glib(gio_sys::g_io_stream_splice_flags_get_type()) }
536 }
537}
538
539impl<'a> FromValueOptional<'a> for IOStreamSpliceFlags {
540 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
541 Some(FromValue::from_value(value))
542 }
543}
544
545impl<'a> FromValue<'a> for IOStreamSpliceFlags {
546 unsafe fn from_value(value: &Value) -> Self {
547 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
548 }
549}
550
551impl SetValue for IOStreamSpliceFlags {
552 unsafe fn set_value(value: &mut Value, this: &Self) {
553 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
554 }
555}
556
557bitflags! {
558 pub struct MountMountFlags: u32 {
559 const NONE = 0;
560 }
561}
562
563#[doc(hidden)]
564impl ToGlib for MountMountFlags {
565 type GlibType = gio_sys::GMountMountFlags;
566
567 fn to_glib(&self) -> gio_sys::GMountMountFlags {
568 self.bits()
569 }
570}
571
572#[doc(hidden)]
573impl FromGlib<gio_sys::GMountMountFlags> for MountMountFlags {
574 fn from_glib(value: gio_sys::GMountMountFlags) -> MountMountFlags {
575 MountMountFlags::from_bits_truncate(value)
576 }
577}
578
579impl StaticType for MountMountFlags {
580 fn static_type() -> Type {
581 unsafe { from_glib(gio_sys::g_mount_mount_flags_get_type()) }
582 }
583}
584
585impl<'a> FromValueOptional<'a> for MountMountFlags {
586 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
587 Some(FromValue::from_value(value))
588 }
589}
590
591impl<'a> FromValue<'a> for MountMountFlags {
592 unsafe fn from_value(value: &Value) -> Self {
593 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
594 }
595}
596
597impl SetValue for MountMountFlags {
598 unsafe fn set_value(value: &mut Value, this: &Self) {
599 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
600 }
601}
602
603bitflags! {
604 pub struct MountUnmountFlags: u32 {
605 const NONE = 0;
606 const FORCE = 1;
607 }
608}
609
610#[doc(hidden)]
611impl ToGlib for MountUnmountFlags {
612 type GlibType = gio_sys::GMountUnmountFlags;
613
614 fn to_glib(&self) -> gio_sys::GMountUnmountFlags {
615 self.bits()
616 }
617}
618
619#[doc(hidden)]
620impl FromGlib<gio_sys::GMountUnmountFlags> for MountUnmountFlags {
621 fn from_glib(value: gio_sys::GMountUnmountFlags) -> MountUnmountFlags {
622 MountUnmountFlags::from_bits_truncate(value)
623 }
624}
625
626impl StaticType for MountUnmountFlags {
627 fn static_type() -> Type {
628 unsafe { from_glib(gio_sys::g_mount_unmount_flags_get_type()) }
629 }
630}
631
632impl<'a> FromValueOptional<'a> for MountUnmountFlags {
633 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
634 Some(FromValue::from_value(value))
635 }
636}
637
638impl<'a> FromValue<'a> for MountUnmountFlags {
639 unsafe fn from_value(value: &Value) -> Self {
640 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
641 }
642}
643
644impl SetValue for MountUnmountFlags {
645 unsafe fn set_value(value: &mut Value, this: &Self) {
646 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
647 }
648}
649
650bitflags! {
651 pub struct OutputStreamSpliceFlags: u32 {
652 const NONE = 0;
653 const CLOSE_SOURCE = 1;
654 const CLOSE_TARGET = 2;
655 }
656}
657
658#[doc(hidden)]
659impl ToGlib for OutputStreamSpliceFlags {
660 type GlibType = gio_sys::GOutputStreamSpliceFlags;
661
662 fn to_glib(&self) -> gio_sys::GOutputStreamSpliceFlags {
663 self.bits()
664 }
665}
666
667#[doc(hidden)]
668impl FromGlib<gio_sys::GOutputStreamSpliceFlags> for OutputStreamSpliceFlags {
669 fn from_glib(value: gio_sys::GOutputStreamSpliceFlags) -> OutputStreamSpliceFlags {
670 OutputStreamSpliceFlags::from_bits_truncate(value)
671 }
672}
673
674impl StaticType for OutputStreamSpliceFlags {
675 fn static_type() -> Type {
676 unsafe { from_glib(gio_sys::g_output_stream_splice_flags_get_type()) }
677 }
678}
679
680impl<'a> FromValueOptional<'a> for OutputStreamSpliceFlags {
681 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
682 Some(FromValue::from_value(value))
683 }
684}
685
686impl<'a> FromValue<'a> for OutputStreamSpliceFlags {
687 unsafe fn from_value(value: &Value) -> Self {
688 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
689 }
690}
691
692impl SetValue for OutputStreamSpliceFlags {
693 unsafe fn set_value(value: &mut Value, this: &Self) {
694 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
695 }
696}
697
698bitflags! {
699 pub struct ResourceLookupFlags: u32 {
700 const NONE = 0;
701 }
702}
703
704#[doc(hidden)]
705impl ToGlib for ResourceLookupFlags {
706 type GlibType = gio_sys::GResourceLookupFlags;
707
708 fn to_glib(&self) -> gio_sys::GResourceLookupFlags {
709 self.bits()
710 }
711}
712
713#[doc(hidden)]
714impl FromGlib<gio_sys::GResourceLookupFlags> for ResourceLookupFlags {
715 fn from_glib(value: gio_sys::GResourceLookupFlags) -> ResourceLookupFlags {
716 ResourceLookupFlags::from_bits_truncate(value)
717 }
718}
719
720impl StaticType for ResourceLookupFlags {
721 fn static_type() -> Type {
722 unsafe { from_glib(gio_sys::g_resource_lookup_flags_get_type()) }
723 }
724}
725
726impl<'a> FromValueOptional<'a> for ResourceLookupFlags {
727 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
728 Some(FromValue::from_value(value))
729 }
730}
731
732impl<'a> FromValue<'a> for ResourceLookupFlags {
733 unsafe fn from_value(value: &Value) -> Self {
734 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
735 }
736}
737
738impl SetValue for ResourceLookupFlags {
739 unsafe fn set_value(value: &mut Value, this: &Self) {
740 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
741 }
742}
743
744bitflags! {
745 pub struct SettingsBindFlags: u32 {
746 const DEFAULT = 0;
747 const GET = 1;
748 const SET = 2;
749 const NO_SENSITIVITY = 4;
750 const GET_NO_CHANGES = 8;
751 const INVERT_BOOLEAN = 16;
752 }
753}
754
755#[doc(hidden)]
756impl ToGlib for SettingsBindFlags {
757 type GlibType = gio_sys::GSettingsBindFlags;
758
759 fn to_glib(&self) -> gio_sys::GSettingsBindFlags {
760 self.bits()
761 }
762}
763
764#[doc(hidden)]
765impl FromGlib<gio_sys::GSettingsBindFlags> for SettingsBindFlags {
766 fn from_glib(value: gio_sys::GSettingsBindFlags) -> SettingsBindFlags {
767 SettingsBindFlags::from_bits_truncate(value)
768 }
769}
770
771impl StaticType for SettingsBindFlags {
772 fn static_type() -> Type {
773 unsafe { from_glib(gio_sys::g_settings_bind_flags_get_type()) }
774 }
775}
776
777impl<'a> FromValueOptional<'a> for SettingsBindFlags {
778 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
779 Some(FromValue::from_value(value))
780 }
781}
782
783impl<'a> FromValue<'a> for SettingsBindFlags {
784 unsafe fn from_value(value: &Value) -> Self {
785 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
786 }
787}
788
789impl SetValue for SettingsBindFlags {
790 unsafe fn set_value(value: &mut Value, this: &Self) {
791 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
792 }
793}
794
795bitflags! {
796 pub struct SubprocessFlags: u32 {
797 const NONE = 0;
798 const STDIN_PIPE = 1;
799 const STDIN_INHERIT = 2;
800 const STDOUT_PIPE = 4;
801 const STDOUT_SILENCE = 8;
802 const STDERR_PIPE = 16;
803 const STDERR_SILENCE = 32;
804 const STDERR_MERGE = 64;
805 const INHERIT_FDS = 128;
806 }
807}
808
809#[doc(hidden)]
810impl ToGlib for SubprocessFlags {
811 type GlibType = gio_sys::GSubprocessFlags;
812
813 fn to_glib(&self) -> gio_sys::GSubprocessFlags {
814 self.bits()
815 }
816}
817
818#[doc(hidden)]
819impl FromGlib<gio_sys::GSubprocessFlags> for SubprocessFlags {
820 fn from_glib(value: gio_sys::GSubprocessFlags) -> SubprocessFlags {
821 SubprocessFlags::from_bits_truncate(value)
822 }
823}
824
825impl StaticType for SubprocessFlags {
826 fn static_type() -> Type {
827 unsafe { from_glib(gio_sys::g_subprocess_flags_get_type()) }
828 }
829}
830
831impl<'a> FromValueOptional<'a> for SubprocessFlags {
832 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
833 Some(FromValue::from_value(value))
834 }
835}
836
837impl<'a> FromValue<'a> for SubprocessFlags {
838 unsafe fn from_value(value: &Value) -> Self {
839 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
840 }
841}
842
843impl SetValue for SubprocessFlags {
844 unsafe fn set_value(value: &mut Value, this: &Self) {
845 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
846 }
847}
848
849bitflags! {
850 pub struct TlsCertificateFlags: u32 {
851 const UNKNOWN_CA = 1;
852 const BAD_IDENTITY = 2;
853 const NOT_ACTIVATED = 4;
854 const EXPIRED = 8;
855 const REVOKED = 16;
856 const INSECURE = 32;
857 const GENERIC_ERROR = 64;
858 const VALIDATE_ALL = 127;
859 }
860}
861
862#[doc(hidden)]
863impl ToGlib for TlsCertificateFlags {
864 type GlibType = gio_sys::GTlsCertificateFlags;
865
866 fn to_glib(&self) -> gio_sys::GTlsCertificateFlags {
867 self.bits()
868 }
869}
870
871#[doc(hidden)]
872impl FromGlib<gio_sys::GTlsCertificateFlags> for TlsCertificateFlags {
873 fn from_glib(value: gio_sys::GTlsCertificateFlags) -> TlsCertificateFlags {
874 TlsCertificateFlags::from_bits_truncate(value)
875 }
876}
877
878impl StaticType for TlsCertificateFlags {
879 fn static_type() -> Type {
880 unsafe { from_glib(gio_sys::g_tls_certificate_flags_get_type()) }
881 }
882}
883
884impl<'a> FromValueOptional<'a> for TlsCertificateFlags {
885 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
886 Some(FromValue::from_value(value))
887 }
888}
889
890impl<'a> FromValue<'a> for TlsCertificateFlags {
891 unsafe fn from_value(value: &Value) -> Self {
892 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
893 }
894}
895
896impl SetValue for TlsCertificateFlags {
897 unsafe fn set_value(value: &mut Value, this: &Self) {
898 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
899 }
900}
901
902bitflags! {
903 pub struct TlsDatabaseVerifyFlags: u32 {
904 const NONE = 0;
905 }
906}
907
908#[doc(hidden)]
909impl ToGlib for TlsDatabaseVerifyFlags {
910 type GlibType = gio_sys::GTlsDatabaseVerifyFlags;
911
912 fn to_glib(&self) -> gio_sys::GTlsDatabaseVerifyFlags {
913 self.bits()
914 }
915}
916
917#[doc(hidden)]
918impl FromGlib<gio_sys::GTlsDatabaseVerifyFlags> for TlsDatabaseVerifyFlags {
919 fn from_glib(value: gio_sys::GTlsDatabaseVerifyFlags) -> TlsDatabaseVerifyFlags {
920 TlsDatabaseVerifyFlags::from_bits_truncate(value)
921 }
922}
923
924impl StaticType for TlsDatabaseVerifyFlags {
925 fn static_type() -> Type {
926 unsafe { from_glib(gio_sys::g_tls_database_verify_flags_get_type()) }
927 }
928}
929
930impl<'a> FromValueOptional<'a> for TlsDatabaseVerifyFlags {
931 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
932 Some(FromValue::from_value(value))
933 }
934}
935
936impl<'a> FromValue<'a> for TlsDatabaseVerifyFlags {
937 unsafe fn from_value(value: &Value) -> Self {
938 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
939 }
940}
941
942impl SetValue for TlsDatabaseVerifyFlags {
943 unsafe fn set_value(value: &mut Value, this: &Self) {
944 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
945 }
946}
947
948bitflags! {
949 pub struct TlsPasswordFlags: u32 {
950 const NONE = 0;
951 const RETRY = 2;
952 const MANY_TRIES = 4;
953 const FINAL_TRY = 8;
954 }
955}
956
957#[doc(hidden)]
958impl ToGlib for TlsPasswordFlags {
959 type GlibType = gio_sys::GTlsPasswordFlags;
960
961 fn to_glib(&self) -> gio_sys::GTlsPasswordFlags {
962 self.bits()
963 }
964}
965
966#[doc(hidden)]
967impl FromGlib<gio_sys::GTlsPasswordFlags> for TlsPasswordFlags {
968 fn from_glib(value: gio_sys::GTlsPasswordFlags) -> TlsPasswordFlags {
969 TlsPasswordFlags::from_bits_truncate(value)
970 }
971}
972
973impl StaticType for TlsPasswordFlags {
974 fn static_type() -> Type {
975 unsafe { from_glib(gio_sys::g_tls_password_flags_get_type()) }
976 }
977}
978
979impl<'a> FromValueOptional<'a> for TlsPasswordFlags {
980 unsafe fn from_value_optional(value: &Value) -> Option<Self> {
981 Some(FromValue::from_value(value))
982 }
983}
984
985impl<'a> FromValue<'a> for TlsPasswordFlags {
986 unsafe fn from_value(value: &Value) -> Self {
987 from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
988 }
989}
990
991impl SetValue for TlsPasswordFlags {
992 unsafe fn set_value(value: &mut Value, this: &Self) {
993 gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
994 }
995}