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
use bitflags::bitflags;
use glib::translate::*;
use glib::value::FromValue;
use glib::value::ToValue;
use glib::StaticType;
use glib::Type;
use std::fmt;
bitflags! {
#[doc(alias = "AtkHyperlinkStateFlags")]
pub struct HyperlinkStateFlags: u32 {
#[doc(alias = "ATK_HYPERLINK_IS_INLINE")]
const INLINE = ffi::ATK_HYPERLINK_IS_INLINE as u32;
}
}
impl fmt::Display for HyperlinkStateFlags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<Self as fmt::Debug>::fmt(self, f)
}
}
#[doc(hidden)]
impl IntoGlib for HyperlinkStateFlags {
type GlibType = ffi::AtkHyperlinkStateFlags;
fn into_glib(self) -> ffi::AtkHyperlinkStateFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::AtkHyperlinkStateFlags> for HyperlinkStateFlags {
unsafe fn from_glib(value: ffi::AtkHyperlinkStateFlags) -> Self {
skip_assert_initialized!();
Self::from_bits_truncate(value)
}
}
impl StaticType for HyperlinkStateFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::atk_hyperlink_state_flags_get_type()) }
}
}
impl glib::value::ValueType for HyperlinkStateFlags {
type Type = Self;
}
unsafe impl<'a> FromValue<'a> for HyperlinkStateFlags {
type Checker = glib::value::GenericValueTypeChecker<Self>;
unsafe fn from_value(value: &'a glib::Value) -> Self {
skip_assert_initialized!();
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl ToValue for HyperlinkStateFlags {
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
}
value
}
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}