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
use ffi;
use translate::*;
bitflags! {
pub struct FormatSizeFlags: u32 {
const FORMAT_SIZE_DEFAULT = 0;
const FORMAT_SIZE_LONG_FORMAT = 1;
const FORMAT_SIZE_IEC_UNITS = 2;
}
}
#[doc(hidden)]
impl ToGlib for FormatSizeFlags {
type GlibType = ffi::GFormatSizeFlags;
fn to_glib(&self) -> ffi::GFormatSizeFlags {
ffi::GFormatSizeFlags::from_bits_truncate(self.bits())
}
}
#[doc(hidden)]
impl FromGlib<ffi::GFormatSizeFlags> for FormatSizeFlags {
fn from_glib(value: ffi::GFormatSizeFlags) -> FormatSizeFlags {
FormatSizeFlags::from_bits_truncate(value.bits())
}
}
bitflags! {
pub struct KeyFileFlags: u32 {
const KEY_FILE_NONE = 0;
const KEY_FILE_KEEP_COMMENTS = 1;
const KEY_FILE_KEEP_TRANSLATIONS = 2;
}
}
#[doc(hidden)]
impl ToGlib for KeyFileFlags {
type GlibType = ffi::GKeyFileFlags;
fn to_glib(&self) -> ffi::GKeyFileFlags {
ffi::GKeyFileFlags::from_bits_truncate(self.bits())
}
}
#[doc(hidden)]
impl FromGlib<ffi::GKeyFileFlags> for KeyFileFlags {
fn from_glib(value: ffi::GKeyFileFlags) -> KeyFileFlags {
KeyFileFlags::from_bits_truncate(value.bits())
}
}