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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ..
// from ../gir-files
// DO NOT EDIT

use crate::{ffi};
use glib::{translate::*};

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkLayerShellEdge")]
pub enum Edge {
    /// The left edge of the screen.
    #[doc(alias = "GTK_LAYER_SHELL_EDGE_LEFT")]
    Left,
    /// The right edge of the screen.
    #[doc(alias = "GTK_LAYER_SHELL_EDGE_RIGHT")]
    Right,
    /// The top edge of the screen.
    #[doc(alias = "GTK_LAYER_SHELL_EDGE_TOP")]
    Top,
    /// The bottom edge of the screen.
    #[doc(alias = "GTK_LAYER_SHELL_EDGE_BOTTOM")]
    Bottom,
    /// Should not be used except to get the number of entries. (NOTE: may change in
    /// future releases as more entries are added)
    #[doc(alias = "GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER")]
    EntryNumber,
#[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl IntoGlib for Edge {
    type GlibType = ffi::GtkLayerShellEdge;

    #[inline]
fn into_glib(self) -> ffi::GtkLayerShellEdge {
match self {
            Self::Left => ffi::GTK_LAYER_SHELL_EDGE_LEFT,
            Self::Right => ffi::GTK_LAYER_SHELL_EDGE_RIGHT,
            Self::Top => ffi::GTK_LAYER_SHELL_EDGE_TOP,
            Self::Bottom => ffi::GTK_LAYER_SHELL_EDGE_BOTTOM,
            Self::EntryNumber => ffi::GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER,
            Self::__Unknown(value) => value,
}
}
}

#[doc(hidden)]
impl FromGlib<ffi::GtkLayerShellEdge> for Edge {
    #[inline]
unsafe fn from_glib(value: ffi::GtkLayerShellEdge) -> Self {
        skip_assert_initialized!();
        
match value {
            ffi::GTK_LAYER_SHELL_EDGE_LEFT => Self::Left,
            ffi::GTK_LAYER_SHELL_EDGE_RIGHT => Self::Right,
            ffi::GTK_LAYER_SHELL_EDGE_TOP => Self::Top,
            ffi::GTK_LAYER_SHELL_EDGE_BOTTOM => Self::Bottom,
            ffi::GTK_LAYER_SHELL_EDGE_ENTRY_NUMBER => Self::EntryNumber,
            value => Self::__Unknown(value),
}
}
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkLayerShellKeyboardMode")]
pub enum KeyboardMode {
    /// This window should not receive keyboard events.
    #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_NONE")]
    None,
    /// This window should have exclusive focus if it is on the top or overlay layer.
    #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE")]
    Exclusive,
    /// The user should be able to focus and unfocues this window in an implementation
    /// defined way. Not supported for protocol version < 4.
    #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND")]
    OnDemand,
    /// Should not be used except to get the number of entries. (NOTE: may change in
    /// future releases as more entries are added)
    #[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER")]
    EntryNumber,
#[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl IntoGlib for KeyboardMode {
    type GlibType = ffi::GtkLayerShellKeyboardMode;

    #[inline]
fn into_glib(self) -> ffi::GtkLayerShellKeyboardMode {
match self {
            Self::None => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_NONE,
            Self::Exclusive => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE,
            Self::OnDemand => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND,
            Self::EntryNumber => ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER,
            Self::__Unknown(value) => value,
}
}
}

#[doc(hidden)]
impl FromGlib<ffi::GtkLayerShellKeyboardMode> for KeyboardMode {
    #[inline]
unsafe fn from_glib(value: ffi::GtkLayerShellKeyboardMode) -> Self {
        skip_assert_initialized!();
        
match value {
            ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_NONE => Self::None,
            ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE => Self::Exclusive,
            ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND => Self::OnDemand,
            ffi::GTK_LAYER_SHELL_KEYBOARD_MODE_ENTRY_NUMBER => Self::EntryNumber,
            value => Self::__Unknown(value),
}
}
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkLayerShellLayer")]
pub enum Layer {
    /// The background layer.
    #[doc(alias = "GTK_LAYER_SHELL_LAYER_BACKGROUND")]
    Background,
    /// The bottom layer.
    #[doc(alias = "GTK_LAYER_SHELL_LAYER_BOTTOM")]
    Bottom,
    /// The top layer.
    #[doc(alias = "GTK_LAYER_SHELL_LAYER_TOP")]
    Top,
    /// The overlay layer.
    #[doc(alias = "GTK_LAYER_SHELL_LAYER_OVERLAY")]
    Overlay,
    /// Should not be used except to get the number of entries. (NOTE: may change in
    /// future releases as more entries are added)
    #[doc(alias = "GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER")]
    EntryNumber,
#[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl IntoGlib for Layer {
    type GlibType = ffi::GtkLayerShellLayer;

    #[inline]
fn into_glib(self) -> ffi::GtkLayerShellLayer {
match self {
            Self::Background => ffi::GTK_LAYER_SHELL_LAYER_BACKGROUND,
            Self::Bottom => ffi::GTK_LAYER_SHELL_LAYER_BOTTOM,
            Self::Top => ffi::GTK_LAYER_SHELL_LAYER_TOP,
            Self::Overlay => ffi::GTK_LAYER_SHELL_LAYER_OVERLAY,
            Self::EntryNumber => ffi::GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER,
            Self::__Unknown(value) => value,
}
}
}

#[doc(hidden)]
impl FromGlib<ffi::GtkLayerShellLayer> for Layer {
    #[inline]
unsafe fn from_glib(value: ffi::GtkLayerShellLayer) -> Self {
        skip_assert_initialized!();
        
match value {
            ffi::GTK_LAYER_SHELL_LAYER_BACKGROUND => Self::Background,
            ffi::GTK_LAYER_SHELL_LAYER_BOTTOM => Self::Bottom,
            ffi::GTK_LAYER_SHELL_LAYER_TOP => Self::Top,
            ffi::GTK_LAYER_SHELL_LAYER_OVERLAY => Self::Overlay,
            ffi::GTK_LAYER_SHELL_LAYER_ENTRY_NUMBER => Self::EntryNumber,
            value => Self::__Unknown(value),
}
}
}