feat: subsurfaces

This commit is contained in:
Ashley Wulber 2025-03-14 11:16:25 -04:00 • committed by Ashley Wulber
parent 0f37c9922d
commit 93bc4bbd88
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
33 changed files with 1898 additions and 2651 deletions

View file

@ -0,0 +1,28 @@
use crate::core::window::Id as SurfaceId;
pub use cctk::sctk::shell::wlr_layer::{Anchor, KeyboardInteractivity, Layer};
use iced_runtime::{
self,
platform_specific::{
self,
wayland::{self, subsurface::SctkSubsurfaceSettings},
},
task, Action, Task,
};
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 },
)),
))
}