1pub use gpui::layer_shell::*;
2
3use wayland_protocols_wlr::layer_shell::v1::client::{zwlr_layer_shell_v1, zwlr_layer_surface_v1};
4
5pub(crate) fn wayland_layer(layer: Layer) -> zwlr_layer_shell_v1::Layer {
6 match layer {
7 Layer::Background => zwlr_layer_shell_v1::Layer::Background,
8 Layer::Bottom => zwlr_layer_shell_v1::Layer::Bottom,
9 Layer::Top => zwlr_layer_shell_v1::Layer::Top,
10 Layer::Overlay => zwlr_layer_shell_v1::Layer::Overlay,
11 }
12}
13
14pub(crate) fn wayland_anchor(anchor: Anchor) -> zwlr_layer_surface_v1::Anchor {
15 zwlr_layer_surface_v1::Anchor::from_bits_truncate(anchor.bits())
16}
17
18pub(crate) fn wayland_keyboard_interactivity(
19 value: KeyboardInteractivity,
20) -> zwlr_layer_surface_v1::KeyboardInteractivity {
21 match value {
22 KeyboardInteractivity::None => zwlr_layer_surface_v1::KeyboardInteractivity::None,
23 KeyboardInteractivity::Exclusive => zwlr_layer_surface_v1::KeyboardInteractivity::Exclusive,
24 KeyboardInteractivity::OnDemand => zwlr_layer_surface_v1::KeyboardInteractivity::OnDemand,
25 }
26}