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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use bitflags::bitflags;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use glib::translate::*;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use glib::value::FromValue;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use glib::value::ToValue;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use glib::StaticType;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use glib::Type;
#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
use std::fmt;

#[cfg(any(feature = "v1_2", feature = "dox"))]
bitflags! {
    #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
    #[doc(alias = "AdwTabViewShortcuts")]
    pub struct TabViewShortcuts: u32 {
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_NONE")]
        const NONE = ffi::ADW_TAB_VIEW_SHORTCUT_NONE as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_TAB")]
        const CONTROL_TAB = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_TAB as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_TAB")]
        const CONTROL_SHIFT_TAB = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_TAB as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_PAGE_UP")]
        const CONTROL_PAGE_UP = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_PAGE_UP as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_PAGE_DOWN")]
        const CONTROL_PAGE_DOWN = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_PAGE_DOWN as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME")]
        const CONTROL_HOME = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_HOME as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_END")]
        const CONTROL_END = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_END as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_PAGE_UP")]
        const CONTROL_SHIFT_PAGE_UP = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_PAGE_UP as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_PAGE_DOWN")]
        const CONTROL_SHIFT_PAGE_DOWN = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_PAGE_DOWN as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_HOME")]
        const CONTROL_SHIFT_HOME = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_HOME as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_END")]
        const CONTROL_SHIFT_END = ffi::ADW_TAB_VIEW_SHORTCUT_CONTROL_SHIFT_END as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_ALT_DIGITS")]
        const ALT_DIGITS = ffi::ADW_TAB_VIEW_SHORTCUT_ALT_DIGITS as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_ALT_ZERO")]
        const ALT_ZERO = ffi::ADW_TAB_VIEW_SHORTCUT_ALT_ZERO as u32;
        #[doc(alias = "ADW_TAB_VIEW_SHORTCUT_ALL_SHORTCUTS")]
        const ALL_SHORTCUTS = ffi::ADW_TAB_VIEW_SHORTCUT_ALL_SHORTCUTS as u32;
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl fmt::Display for TabViewShortcuts {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        <Self as fmt::Debug>::fmt(self, f)
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl IntoGlib for TabViewShortcuts {
    type GlibType = ffi::AdwTabViewShortcuts;

    fn into_glib(self) -> ffi::AdwTabViewShortcuts {
        self.bits()
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
#[doc(hidden)]
impl FromGlib<ffi::AdwTabViewShortcuts> for TabViewShortcuts {
    unsafe fn from_glib(value: ffi::AdwTabViewShortcuts) -> Self {
        skip_assert_initialized!();
        Self::from_bits_truncate(value)
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl StaticType for TabViewShortcuts {
    fn static_type() -> Type {
        unsafe { from_glib(ffi::adw_tab_view_shortcuts_get_type()) }
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl glib::value::ValueType for TabViewShortcuts {
    type Type = Self;
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
unsafe impl<'a> FromValue<'a> for TabViewShortcuts {
    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))
    }
}

#[cfg(any(feature = "v1_2", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_2")))]
impl ToValue for TabViewShortcuts {
    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()
    }
}