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 | |
5 | use crate::{bitflags::bitflags, prelude::*, translate::*}; |
6 | use std::fmt; |
7 | |
8 | #[cfg (feature = "v2_66" )] |
9 | bitflags! { |
10 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
11 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
12 | #[doc (alias = "GFileSetContentsFlags" )] |
13 | pub struct FileSetContentsFlags: u32 { |
14 | #[doc(alias = "G_FILE_SET_CONTENTS_NONE" )] |
15 | const NONE = ffi::G_FILE_SET_CONTENTS_NONE as _; |
16 | #[doc(alias = "G_FILE_SET_CONTENTS_CONSISTENT" )] |
17 | const CONSISTENT = ffi::G_FILE_SET_CONTENTS_CONSISTENT as _; |
18 | #[doc(alias = "G_FILE_SET_CONTENTS_DURABLE" )] |
19 | const DURABLE = ffi::G_FILE_SET_CONTENTS_DURABLE as _; |
20 | #[doc(alias = "G_FILE_SET_CONTENTS_ONLY_EXISTING" )] |
21 | const ONLY_EXISTING = ffi::G_FILE_SET_CONTENTS_ONLY_EXISTING as _; |
22 | } |
23 | } |
24 | |
25 | #[cfg (feature = "v2_66" )] |
26 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
27 | impl fmt::Display for FileSetContentsFlags { |
28 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
29 | <Self as fmt::Debug>::fmt(self, f) |
30 | } |
31 | } |
32 | |
33 | #[cfg (feature = "v2_66" )] |
34 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
35 | #[doc (hidden)] |
36 | impl IntoGlib for FileSetContentsFlags { |
37 | type GlibType = ffi::GFileSetContentsFlags; |
38 | |
39 | #[inline ] |
40 | fn into_glib(self) -> ffi::GFileSetContentsFlags { |
41 | self.bits() |
42 | } |
43 | } |
44 | |
45 | #[cfg (feature = "v2_66" )] |
46 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
47 | #[doc (hidden)] |
48 | impl FromGlib<ffi::GFileSetContentsFlags> for FileSetContentsFlags { |
49 | #[inline ] |
50 | unsafe fn from_glib(value: ffi::GFileSetContentsFlags) -> Self { |
51 | Self::from_bits_truncate(value) |
52 | } |
53 | } |
54 | |
55 | bitflags! { |
56 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
57 | #[doc (alias = "GFileTest" )] |
58 | pub(crate) struct FileTest: u32 { |
59 | #[doc(alias = "G_FILE_TEST_IS_REGULAR" )] |
60 | const IS_REGULAR = ffi::G_FILE_TEST_IS_REGULAR as _; |
61 | #[doc(alias = "G_FILE_TEST_IS_SYMLINK" )] |
62 | const IS_SYMLINK = ffi::G_FILE_TEST_IS_SYMLINK as _; |
63 | #[doc(alias = "G_FILE_TEST_IS_DIR" )] |
64 | const IS_DIR = ffi::G_FILE_TEST_IS_DIR as _; |
65 | #[doc(alias = "G_FILE_TEST_IS_EXECUTABLE" )] |
66 | const IS_EXECUTABLE = ffi::G_FILE_TEST_IS_EXECUTABLE as _; |
67 | #[doc(alias = "G_FILE_TEST_EXISTS" )] |
68 | const EXISTS = ffi::G_FILE_TEST_EXISTS as _; |
69 | } |
70 | } |
71 | |
72 | impl fmt::Display for FileTest { |
73 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
74 | <Self as fmt::Debug>::fmt(self, f) |
75 | } |
76 | } |
77 | |
78 | #[doc (hidden)] |
79 | impl IntoGlib for FileTest { |
80 | type GlibType = ffi::GFileTest; |
81 | |
82 | #[inline ] |
83 | fn into_glib(self) -> ffi::GFileTest { |
84 | self.bits() |
85 | } |
86 | } |
87 | |
88 | #[doc (hidden)] |
89 | impl FromGlib<ffi::GFileTest> for FileTest { |
90 | #[inline ] |
91 | unsafe fn from_glib(value: ffi::GFileTest) -> Self { |
92 | Self::from_bits_truncate(bits:value) |
93 | } |
94 | } |
95 | |
96 | bitflags! { |
97 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
98 | #[doc (alias = "GFormatSizeFlags" )] |
99 | pub struct FormatSizeFlags: u32 { |
100 | #[doc(alias = "G_FORMAT_SIZE_DEFAULT" )] |
101 | const DEFAULT = ffi::G_FORMAT_SIZE_DEFAULT as _; |
102 | #[doc(alias = "G_FORMAT_SIZE_LONG_FORMAT" )] |
103 | const LONG_FORMAT = ffi::G_FORMAT_SIZE_LONG_FORMAT as _; |
104 | #[doc(alias = "G_FORMAT_SIZE_IEC_UNITS" )] |
105 | const IEC_UNITS = ffi::G_FORMAT_SIZE_IEC_UNITS as _; |
106 | #[doc(alias = "G_FORMAT_SIZE_BITS" )] |
107 | const BITS = ffi::G_FORMAT_SIZE_BITS as _; |
108 | #[cfg(feature = "v2_74" )] |
109 | #[cfg_attr(docsrs, doc(cfg(feature = "v2_74" )))] |
110 | #[doc(alias = "G_FORMAT_SIZE_ONLY_VALUE" )] |
111 | const ONLY_VALUE = ffi::G_FORMAT_SIZE_ONLY_VALUE as _; |
112 | #[cfg(feature = "v2_74" )] |
113 | #[cfg_attr(docsrs, doc(cfg(feature = "v2_74" )))] |
114 | #[doc(alias = "G_FORMAT_SIZE_ONLY_UNIT" )] |
115 | const ONLY_UNIT = ffi::G_FORMAT_SIZE_ONLY_UNIT as _; |
116 | } |
117 | } |
118 | |
119 | impl fmt::Display for FormatSizeFlags { |
120 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
121 | <Self as fmt::Debug>::fmt(self, f) |
122 | } |
123 | } |
124 | |
125 | #[doc (hidden)] |
126 | impl IntoGlib for FormatSizeFlags { |
127 | type GlibType = ffi::GFormatSizeFlags; |
128 | |
129 | #[inline ] |
130 | fn into_glib(self) -> ffi::GFormatSizeFlags { |
131 | self.bits() |
132 | } |
133 | } |
134 | |
135 | #[doc (hidden)] |
136 | impl FromGlib<ffi::GFormatSizeFlags> for FormatSizeFlags { |
137 | #[inline ] |
138 | unsafe fn from_glib(value: ffi::GFormatSizeFlags) -> Self { |
139 | Self::from_bits_truncate(bits:value) |
140 | } |
141 | } |
142 | |
143 | bitflags! { |
144 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
145 | #[doc (alias = "GIOCondition" )] |
146 | pub struct IOCondition: u32 { |
147 | #[doc(alias = "G_IO_IN" )] |
148 | const IN = ffi::G_IO_IN as _; |
149 | #[doc(alias = "G_IO_OUT" )] |
150 | const OUT = ffi::G_IO_OUT as _; |
151 | #[doc(alias = "G_IO_PRI" )] |
152 | const PRI = ffi::G_IO_PRI as _; |
153 | #[doc(alias = "G_IO_ERR" )] |
154 | const ERR = ffi::G_IO_ERR as _; |
155 | #[doc(alias = "G_IO_HUP" )] |
156 | const HUP = ffi::G_IO_HUP as _; |
157 | #[doc(alias = "G_IO_NVAL" )] |
158 | const NVAL = ffi::G_IO_NVAL as _; |
159 | } |
160 | } |
161 | |
162 | impl fmt::Display for IOCondition { |
163 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
164 | <Self as fmt::Debug>::fmt(self, f) |
165 | } |
166 | } |
167 | |
168 | #[doc (hidden)] |
169 | impl IntoGlib for IOCondition { |
170 | type GlibType = ffi::GIOCondition; |
171 | |
172 | #[inline ] |
173 | fn into_glib(self) -> ffi::GIOCondition { |
174 | self.bits() |
175 | } |
176 | } |
177 | |
178 | #[doc (hidden)] |
179 | impl FromGlib<ffi::GIOCondition> for IOCondition { |
180 | #[inline ] |
181 | unsafe fn from_glib(value: ffi::GIOCondition) -> Self { |
182 | Self::from_bits_truncate(bits:value) |
183 | } |
184 | } |
185 | |
186 | impl StaticType for IOCondition { |
187 | #[inline ] |
188 | #[doc (alias = "g_io_condition_get_type" )] |
189 | fn static_type() -> crate::Type { |
190 | unsafe { from_glib(val:ffi::g_io_condition_get_type()) } |
191 | } |
192 | } |
193 | |
194 | impl crate::HasParamSpec for IOCondition { |
195 | type ParamSpec = crate::ParamSpecFlags; |
196 | type SetValue = Self; |
197 | type BuilderFn = fn(&str) -> crate::ParamSpecFlagsBuilder<Self>; |
198 | |
199 | fn param_spec_builder() -> Self::BuilderFn { |
200 | Self::ParamSpec::builder |
201 | } |
202 | } |
203 | |
204 | impl crate::value::ValueType for IOCondition { |
205 | type Type = Self; |
206 | } |
207 | |
208 | unsafe impl<'a> crate::value::FromValue<'a> for IOCondition { |
209 | type Checker = crate::value::GenericValueTypeChecker<Self>; |
210 | |
211 | #[inline ] |
212 | unsafe fn from_value(value: &'a crate::Value) -> Self { |
213 | from_glib(val:crate::gobject_ffi::g_value_get_flags( |
214 | value.to_glib_none().0, |
215 | )) |
216 | } |
217 | } |
218 | |
219 | impl ToValue for IOCondition { |
220 | #[inline ] |
221 | fn to_value(&self) -> crate::Value { |
222 | let mut value: Value = crate::Value::for_value_type::<Self>(); |
223 | unsafe { |
224 | crate::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib()); |
225 | } |
226 | value |
227 | } |
228 | |
229 | #[inline ] |
230 | fn value_type(&self) -> crate::Type { |
231 | Self::static_type() |
232 | } |
233 | } |
234 | |
235 | impl From<IOCondition> for crate::Value { |
236 | #[inline ] |
237 | fn from(v: IOCondition) -> Self { |
238 | ToValue::to_value(&v) |
239 | } |
240 | } |
241 | |
242 | bitflags! { |
243 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
244 | #[doc (alias = "GKeyFileFlags" )] |
245 | pub struct KeyFileFlags: u32 { |
246 | #[doc(alias = "G_KEY_FILE_NONE" )] |
247 | const NONE = ffi::G_KEY_FILE_NONE as _; |
248 | #[doc(alias = "G_KEY_FILE_KEEP_COMMENTS" )] |
249 | const KEEP_COMMENTS = ffi::G_KEY_FILE_KEEP_COMMENTS as _; |
250 | #[doc(alias = "G_KEY_FILE_KEEP_TRANSLATIONS" )] |
251 | const KEEP_TRANSLATIONS = ffi::G_KEY_FILE_KEEP_TRANSLATIONS as _; |
252 | } |
253 | } |
254 | |
255 | impl fmt::Display for KeyFileFlags { |
256 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
257 | <Self as fmt::Debug>::fmt(self, f) |
258 | } |
259 | } |
260 | |
261 | #[doc (hidden)] |
262 | impl IntoGlib for KeyFileFlags { |
263 | type GlibType = ffi::GKeyFileFlags; |
264 | |
265 | #[inline ] |
266 | fn into_glib(self) -> ffi::GKeyFileFlags { |
267 | self.bits() |
268 | } |
269 | } |
270 | |
271 | #[doc (hidden)] |
272 | impl FromGlib<ffi::GKeyFileFlags> for KeyFileFlags { |
273 | #[inline ] |
274 | unsafe fn from_glib(value: ffi::GKeyFileFlags) -> Self { |
275 | Self::from_bits_truncate(bits:value) |
276 | } |
277 | } |
278 | |
279 | bitflags! { |
280 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
281 | #[doc (alias = "GLogLevelFlags" )] |
282 | pub struct LogLevelFlags: u32 { |
283 | #[doc(alias = "G_LOG_FLAG_RECURSION" )] |
284 | const FLAG_RECURSION = ffi::G_LOG_FLAG_RECURSION as _; |
285 | #[doc(alias = "G_LOG_FLAG_FATAL" )] |
286 | const FLAG_FATAL = ffi::G_LOG_FLAG_FATAL as _; |
287 | #[doc(alias = "G_LOG_LEVEL_ERROR" )] |
288 | const LEVEL_ERROR = ffi::G_LOG_LEVEL_ERROR as _; |
289 | #[doc(alias = "G_LOG_LEVEL_CRITICAL" )] |
290 | const LEVEL_CRITICAL = ffi::G_LOG_LEVEL_CRITICAL as _; |
291 | #[doc(alias = "G_LOG_LEVEL_WARNING" )] |
292 | const LEVEL_WARNING = ffi::G_LOG_LEVEL_WARNING as _; |
293 | #[doc(alias = "G_LOG_LEVEL_MESSAGE" )] |
294 | const LEVEL_MESSAGE = ffi::G_LOG_LEVEL_MESSAGE as _; |
295 | #[doc(alias = "G_LOG_LEVEL_INFO" )] |
296 | const LEVEL_INFO = ffi::G_LOG_LEVEL_INFO as _; |
297 | #[doc(alias = "G_LOG_LEVEL_DEBUG" )] |
298 | const LEVEL_DEBUG = ffi::G_LOG_LEVEL_DEBUG as _; |
299 | #[doc(alias = "G_LOG_LEVEL_MASK" )] |
300 | const LEVEL_MASK = ffi::G_LOG_LEVEL_MASK as _; |
301 | } |
302 | } |
303 | |
304 | impl fmt::Display for LogLevelFlags { |
305 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
306 | <Self as fmt::Debug>::fmt(self, f) |
307 | } |
308 | } |
309 | |
310 | #[doc (hidden)] |
311 | impl IntoGlib for LogLevelFlags { |
312 | type GlibType = ffi::GLogLevelFlags; |
313 | |
314 | #[inline ] |
315 | fn into_glib(self) -> ffi::GLogLevelFlags { |
316 | self.bits() |
317 | } |
318 | } |
319 | |
320 | #[doc (hidden)] |
321 | impl FromGlib<ffi::GLogLevelFlags> for LogLevelFlags { |
322 | #[inline ] |
323 | unsafe fn from_glib(value: ffi::GLogLevelFlags) -> Self { |
324 | Self::from_bits_truncate(bits:value) |
325 | } |
326 | } |
327 | |
328 | #[cfg (feature = "v2_72" )] |
329 | bitflags! { |
330 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_72" )))] |
331 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
332 | #[doc (alias = "GMainContextFlags" )] |
333 | pub struct MainContextFlags: u32 { |
334 | #[doc(alias = "G_MAIN_CONTEXT_FLAGS_NONE" )] |
335 | const NONE = ffi::G_MAIN_CONTEXT_FLAGS_NONE as _; |
336 | #[doc(alias = "G_MAIN_CONTEXT_FLAGS_OWNERLESS_POLLING" )] |
337 | const OWNERLESS_POLLING = ffi::G_MAIN_CONTEXT_FLAGS_OWNERLESS_POLLING as _; |
338 | } |
339 | } |
340 | |
341 | #[cfg (feature = "v2_72" )] |
342 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_72" )))] |
343 | impl fmt::Display for MainContextFlags { |
344 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
345 | <Self as fmt::Debug>::fmt(self, f) |
346 | } |
347 | } |
348 | |
349 | #[cfg (feature = "v2_72" )] |
350 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_72" )))] |
351 | #[doc (hidden)] |
352 | impl IntoGlib for MainContextFlags { |
353 | type GlibType = ffi::GMainContextFlags; |
354 | |
355 | #[inline ] |
356 | fn into_glib(self) -> ffi::GMainContextFlags { |
357 | self.bits() |
358 | } |
359 | } |
360 | |
361 | #[cfg (feature = "v2_72" )] |
362 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_72" )))] |
363 | #[doc (hidden)] |
364 | impl FromGlib<ffi::GMainContextFlags> for MainContextFlags { |
365 | #[inline ] |
366 | unsafe fn from_glib(value: ffi::GMainContextFlags) -> Self { |
367 | Self::from_bits_truncate(value) |
368 | } |
369 | } |
370 | |
371 | bitflags! { |
372 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
373 | #[doc (alias = "GOptionFlags" )] |
374 | pub struct OptionFlags: u32 { |
375 | #[doc(alias = "G_OPTION_FLAG_NONE" )] |
376 | const NONE = ffi::G_OPTION_FLAG_NONE as _; |
377 | #[doc(alias = "G_OPTION_FLAG_HIDDEN" )] |
378 | const HIDDEN = ffi::G_OPTION_FLAG_HIDDEN as _; |
379 | #[doc(alias = "G_OPTION_FLAG_IN_MAIN" )] |
380 | const IN_MAIN = ffi::G_OPTION_FLAG_IN_MAIN as _; |
381 | #[doc(alias = "G_OPTION_FLAG_REVERSE" )] |
382 | const REVERSE = ffi::G_OPTION_FLAG_REVERSE as _; |
383 | #[doc(alias = "G_OPTION_FLAG_NO_ARG" )] |
384 | const NO_ARG = ffi::G_OPTION_FLAG_NO_ARG as _; |
385 | #[doc(alias = "G_OPTION_FLAG_FILENAME" )] |
386 | const FILENAME = ffi::G_OPTION_FLAG_FILENAME as _; |
387 | #[doc(alias = "G_OPTION_FLAG_OPTIONAL_ARG" )] |
388 | const OPTIONAL_ARG = ffi::G_OPTION_FLAG_OPTIONAL_ARG as _; |
389 | #[doc(alias = "G_OPTION_FLAG_NOALIAS" )] |
390 | const NOALIAS = ffi::G_OPTION_FLAG_NOALIAS as _; |
391 | } |
392 | } |
393 | |
394 | impl fmt::Display for OptionFlags { |
395 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
396 | <Self as fmt::Debug>::fmt(self, f) |
397 | } |
398 | } |
399 | |
400 | #[doc (hidden)] |
401 | impl IntoGlib for OptionFlags { |
402 | type GlibType = ffi::GOptionFlags; |
403 | |
404 | #[inline ] |
405 | fn into_glib(self) -> ffi::GOptionFlags { |
406 | self.bits() |
407 | } |
408 | } |
409 | |
410 | #[doc (hidden)] |
411 | impl FromGlib<ffi::GOptionFlags> for OptionFlags { |
412 | #[inline ] |
413 | unsafe fn from_glib(value: ffi::GOptionFlags) -> Self { |
414 | Self::from_bits_truncate(bits:value) |
415 | } |
416 | } |
417 | |
418 | bitflags! { |
419 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
420 | #[doc (alias = "GSpawnFlags" )] |
421 | pub struct SpawnFlags: u32 { |
422 | #[doc(alias = "G_SPAWN_DEFAULT" )] |
423 | const DEFAULT = ffi::G_SPAWN_DEFAULT as _; |
424 | #[doc(alias = "G_SPAWN_LEAVE_DESCRIPTORS_OPEN" )] |
425 | const LEAVE_DESCRIPTORS_OPEN = ffi::G_SPAWN_LEAVE_DESCRIPTORS_OPEN as _; |
426 | #[doc(alias = "G_SPAWN_DO_NOT_REAP_CHILD" )] |
427 | const DO_NOT_REAP_CHILD = ffi::G_SPAWN_DO_NOT_REAP_CHILD as _; |
428 | #[doc(alias = "G_SPAWN_SEARCH_PATH" )] |
429 | const SEARCH_PATH = ffi::G_SPAWN_SEARCH_PATH as _; |
430 | #[doc(alias = "G_SPAWN_STDOUT_TO_DEV_NULL" )] |
431 | const STDOUT_TO_DEV_NULL = ffi::G_SPAWN_STDOUT_TO_DEV_NULL as _; |
432 | #[doc(alias = "G_SPAWN_STDERR_TO_DEV_NULL" )] |
433 | const STDERR_TO_DEV_NULL = ffi::G_SPAWN_STDERR_TO_DEV_NULL as _; |
434 | #[doc(alias = "G_SPAWN_CHILD_INHERITS_STDIN" )] |
435 | const CHILD_INHERITS_STDIN = ffi::G_SPAWN_CHILD_INHERITS_STDIN as _; |
436 | #[doc(alias = "G_SPAWN_FILE_AND_ARGV_ZERO" )] |
437 | const FILE_AND_ARGV_ZERO = ffi::G_SPAWN_FILE_AND_ARGV_ZERO as _; |
438 | #[doc(alias = "G_SPAWN_SEARCH_PATH_FROM_ENVP" )] |
439 | const SEARCH_PATH_FROM_ENVP = ffi::G_SPAWN_SEARCH_PATH_FROM_ENVP as _; |
440 | #[doc(alias = "G_SPAWN_CLOEXEC_PIPES" )] |
441 | const CLOEXEC_PIPES = ffi::G_SPAWN_CLOEXEC_PIPES as _; |
442 | #[cfg(feature = "v2_74" )] |
443 | #[cfg_attr(docsrs, doc(cfg(feature = "v2_74" )))] |
444 | #[doc(alias = "G_SPAWN_CHILD_INHERITS_STDOUT" )] |
445 | const CHILD_INHERITS_STDOUT = ffi::G_SPAWN_CHILD_INHERITS_STDOUT as _; |
446 | #[cfg(feature = "v2_74" )] |
447 | #[cfg_attr(docsrs, doc(cfg(feature = "v2_74" )))] |
448 | #[doc(alias = "G_SPAWN_CHILD_INHERITS_STDERR" )] |
449 | const CHILD_INHERITS_STDERR = ffi::G_SPAWN_CHILD_INHERITS_STDERR as _; |
450 | #[cfg(feature = "v2_74" )] |
451 | #[cfg_attr(docsrs, doc(cfg(feature = "v2_74" )))] |
452 | #[doc(alias = "G_SPAWN_STDIN_FROM_DEV_NULL" )] |
453 | const STDIN_FROM_DEV_NULL = ffi::G_SPAWN_STDIN_FROM_DEV_NULL as _; |
454 | } |
455 | } |
456 | |
457 | impl fmt::Display for SpawnFlags { |
458 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
459 | <Self as fmt::Debug>::fmt(self, f) |
460 | } |
461 | } |
462 | |
463 | #[doc (hidden)] |
464 | impl IntoGlib for SpawnFlags { |
465 | type GlibType = ffi::GSpawnFlags; |
466 | |
467 | #[inline ] |
468 | fn into_glib(self) -> ffi::GSpawnFlags { |
469 | self.bits() |
470 | } |
471 | } |
472 | |
473 | #[doc (hidden)] |
474 | impl FromGlib<ffi::GSpawnFlags> for SpawnFlags { |
475 | #[inline ] |
476 | unsafe fn from_glib(value: ffi::GSpawnFlags) -> Self { |
477 | Self::from_bits_truncate(bits:value) |
478 | } |
479 | } |
480 | |
481 | #[cfg (feature = "v2_66" )] |
482 | bitflags! { |
483 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
484 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
485 | #[doc (alias = "GUriFlags" )] |
486 | pub struct UriFlags: u32 { |
487 | #[doc(alias = "G_URI_FLAGS_NONE" )] |
488 | const NONE = ffi::G_URI_FLAGS_NONE as _; |
489 | #[doc(alias = "G_URI_FLAGS_PARSE_RELAXED" )] |
490 | const PARSE_RELAXED = ffi::G_URI_FLAGS_PARSE_RELAXED as _; |
491 | #[doc(alias = "G_URI_FLAGS_HAS_PASSWORD" )] |
492 | const HAS_PASSWORD = ffi::G_URI_FLAGS_HAS_PASSWORD as _; |
493 | #[doc(alias = "G_URI_FLAGS_HAS_AUTH_PARAMS" )] |
494 | const HAS_AUTH_PARAMS = ffi::G_URI_FLAGS_HAS_AUTH_PARAMS as _; |
495 | #[doc(alias = "G_URI_FLAGS_ENCODED" )] |
496 | const ENCODED = ffi::G_URI_FLAGS_ENCODED as _; |
497 | #[doc(alias = "G_URI_FLAGS_NON_DNS" )] |
498 | const NON_DNS = ffi::G_URI_FLAGS_NON_DNS as _; |
499 | #[doc(alias = "G_URI_FLAGS_ENCODED_QUERY" )] |
500 | const ENCODED_QUERY = ffi::G_URI_FLAGS_ENCODED_QUERY as _; |
501 | #[doc(alias = "G_URI_FLAGS_ENCODED_PATH" )] |
502 | const ENCODED_PATH = ffi::G_URI_FLAGS_ENCODED_PATH as _; |
503 | #[doc(alias = "G_URI_FLAGS_ENCODED_FRAGMENT" )] |
504 | const ENCODED_FRAGMENT = ffi::G_URI_FLAGS_ENCODED_FRAGMENT as _; |
505 | #[doc(alias = "G_URI_FLAGS_SCHEME_NORMALIZE" )] |
506 | const SCHEME_NORMALIZE = ffi::G_URI_FLAGS_SCHEME_NORMALIZE as _; |
507 | } |
508 | } |
509 | |
510 | #[cfg (feature = "v2_66" )] |
511 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
512 | impl fmt::Display for UriFlags { |
513 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
514 | <Self as fmt::Debug>::fmt(self, f) |
515 | } |
516 | } |
517 | |
518 | #[cfg (feature = "v2_66" )] |
519 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
520 | #[doc (hidden)] |
521 | impl IntoGlib for UriFlags { |
522 | type GlibType = ffi::GUriFlags; |
523 | |
524 | #[inline ] |
525 | fn into_glib(self) -> ffi::GUriFlags { |
526 | self.bits() |
527 | } |
528 | } |
529 | |
530 | #[cfg (feature = "v2_66" )] |
531 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
532 | #[doc (hidden)] |
533 | impl FromGlib<ffi::GUriFlags> for UriFlags { |
534 | #[inline ] |
535 | unsafe fn from_glib(value: ffi::GUriFlags) -> Self { |
536 | Self::from_bits_truncate(value) |
537 | } |
538 | } |
539 | |
540 | #[cfg (feature = "v2_66" )] |
541 | bitflags! { |
542 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
543 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
544 | #[doc (alias = "GUriHideFlags" )] |
545 | pub struct UriHideFlags: u32 { |
546 | #[doc(alias = "G_URI_HIDE_NONE" )] |
547 | const NONE = ffi::G_URI_HIDE_NONE as _; |
548 | #[doc(alias = "G_URI_HIDE_USERINFO" )] |
549 | const USERINFO = ffi::G_URI_HIDE_USERINFO as _; |
550 | #[doc(alias = "G_URI_HIDE_PASSWORD" )] |
551 | const PASSWORD = ffi::G_URI_HIDE_PASSWORD as _; |
552 | #[doc(alias = "G_URI_HIDE_AUTH_PARAMS" )] |
553 | const AUTH_PARAMS = ffi::G_URI_HIDE_AUTH_PARAMS as _; |
554 | #[doc(alias = "G_URI_HIDE_QUERY" )] |
555 | const QUERY = ffi::G_URI_HIDE_QUERY as _; |
556 | #[doc(alias = "G_URI_HIDE_FRAGMENT" )] |
557 | const FRAGMENT = ffi::G_URI_HIDE_FRAGMENT as _; |
558 | } |
559 | } |
560 | |
561 | #[cfg (feature = "v2_66" )] |
562 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
563 | impl fmt::Display for UriHideFlags { |
564 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
565 | <Self as fmt::Debug>::fmt(self, f) |
566 | } |
567 | } |
568 | |
569 | #[cfg (feature = "v2_66" )] |
570 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
571 | #[doc (hidden)] |
572 | impl IntoGlib for UriHideFlags { |
573 | type GlibType = ffi::GUriHideFlags; |
574 | |
575 | #[inline ] |
576 | fn into_glib(self) -> ffi::GUriHideFlags { |
577 | self.bits() |
578 | } |
579 | } |
580 | |
581 | #[cfg (feature = "v2_66" )] |
582 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
583 | #[doc (hidden)] |
584 | impl FromGlib<ffi::GUriHideFlags> for UriHideFlags { |
585 | #[inline ] |
586 | unsafe fn from_glib(value: ffi::GUriHideFlags) -> Self { |
587 | Self::from_bits_truncate(value) |
588 | } |
589 | } |
590 | |
591 | #[cfg (feature = "v2_66" )] |
592 | bitflags! { |
593 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
594 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Hash)] |
595 | #[doc (alias = "GUriParamsFlags" )] |
596 | pub struct UriParamsFlags: u32 { |
597 | #[doc(alias = "G_URI_PARAMS_NONE" )] |
598 | const NONE = ffi::G_URI_PARAMS_NONE as _; |
599 | #[doc(alias = "G_URI_PARAMS_CASE_INSENSITIVE" )] |
600 | const CASE_INSENSITIVE = ffi::G_URI_PARAMS_CASE_INSENSITIVE as _; |
601 | #[doc(alias = "G_URI_PARAMS_WWW_FORM" )] |
602 | const WWW_FORM = ffi::G_URI_PARAMS_WWW_FORM as _; |
603 | #[doc(alias = "G_URI_PARAMS_PARSE_RELAXED" )] |
604 | const PARSE_RELAXED = ffi::G_URI_PARAMS_PARSE_RELAXED as _; |
605 | } |
606 | } |
607 | |
608 | #[cfg (feature = "v2_66" )] |
609 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
610 | impl fmt::Display for UriParamsFlags { |
611 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
612 | <Self as fmt::Debug>::fmt(self, f) |
613 | } |
614 | } |
615 | |
616 | #[cfg (feature = "v2_66" )] |
617 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
618 | #[doc (hidden)] |
619 | impl IntoGlib for UriParamsFlags { |
620 | type GlibType = ffi::GUriParamsFlags; |
621 | |
622 | #[inline ] |
623 | fn into_glib(self) -> ffi::GUriParamsFlags { |
624 | self.bits() |
625 | } |
626 | } |
627 | |
628 | #[cfg (feature = "v2_66" )] |
629 | #[cfg_attr (docsrs, doc(cfg(feature = "v2_66" )))] |
630 | #[doc (hidden)] |
631 | impl FromGlib<ffi::GUriParamsFlags> for UriParamsFlags { |
632 | #[inline ] |
633 | unsafe fn from_glib(value: ffi::GUriParamsFlags) -> Self { |
634 | Self::from_bits_truncate(value) |
635 | } |
636 | } |
637 | |