use crate::{ffi};
use glib::{translate::*};
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GtkLayerShellEdge")]
pub enum Edge {
#[doc(alias = "GTK_LAYER_SHELL_EDGE_LEFT")]
Left,
#[doc(alias = "GTK_LAYER_SHELL_EDGE_RIGHT")]
Right,
#[doc(alias = "GTK_LAYER_SHELL_EDGE_TOP")]
Top,
#[doc(alias = "GTK_LAYER_SHELL_EDGE_BOTTOM")]
Bottom,
#[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 {
#[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_NONE")]
None,
#[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_EXCLUSIVE")]
Exclusive,
#[doc(alias = "GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND")]
OnDemand,
#[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 {
#[doc(alias = "GTK_LAYER_SHELL_LAYER_BACKGROUND")]
Background,
#[doc(alias = "GTK_LAYER_SHELL_LAYER_BOTTOM")]
Bottom,
#[doc(alias = "GTK_LAYER_SHELL_LAYER_TOP")]
Top,
#[doc(alias = "GTK_LAYER_SHELL_LAYER_OVERLAY")]
Overlay,
#[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),
}
}
}