2025-03-14 11:16:25 -04:00
|
|
|
use crate::core::window::Id as SurfaceId;
|
|
|
|
|
pub use cctk::sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer};
|
|
|
|
|
use iced_runtime::{
|
2026-06-25 15:27:31 -04:00
|
|
|
self, Action, Task,
|
2025-03-14 11:16:25 -04:00
|
|
|
platform_specific::{
|
|
|
|
|
self,
|
|
|
|
|
wayland::{self, subsurface::SctkSubsurfaceSettings},
|
|
|
|
|
},
|
2026-06-25 15:27:31 -04:00
|
|
|
task,
|
2025-03-14 11:16:25 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
pub fn get_subsurface<Message>(
|
|
|
|
|
subsurface: SctkSubsurfaceSettings,
|
|
|
|
|
) -> Task<Message> {
|
|
|
|
|
task::effect(Action::PlatformSpecific(
|
|
|
|
|
platform_specific::Action::Wayland(wayland::Action::Subsurface(
|
|
|
|
|
wayland::subsurface::Action::Subsurface { subsurface },
|
|
|
|
|
)),
|
|
|
|
|
))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn destroy_subsurface<Message>(id: SurfaceId) -> Task<Message> {
|
|
|
|
|
task::effect(Action::PlatformSpecific(
|
|
|
|
|
platform_specific::Action::Wayland(wayland::Action::Subsurface(
|
|
|
|
|
wayland::subsurface::Action::Destroy { id },
|
|
|
|
|
)),
|
|
|
|
|
))
|
|
|
|
|
}
|
2025-08-25 00:16:31 -04:00
|
|
|
|
|
|
|
|
pub fn reposition_subsurface<Message>(
|
|
|
|
|
id: SurfaceId,
|
|
|
|
|
x: i32,
|
|
|
|
|
y: i32,
|
|
|
|
|
) -> Task<Message> {
|
|
|
|
|
task::effect(Action::PlatformSpecific(
|
|
|
|
|
platform_specific::Action::Wayland(wayland::Action::Subsurface(
|
|
|
|
|
wayland::subsurface::Action::Reposition { id, x, y },
|
|
|
|
|
)),
|
|
|
|
|
))
|
|
|
|
|
}
|