yoda: fork pivot — Wayland-only + ungate winit + soft-fork libcosmic-yoda (squashed)
Squash of 7 yoda commits forming the fork pivot: -255cf7ccrename: libcosmic -> libcosmic-yoda (fork 0.1.0-yoda) -8701aa31feat(yoda): Wayland-only cut — drop winit and x11 features -6736a596yoda: soft-fork pivot — keep Cargo name 'libcosmic' for dep unification -3e23d087yoda: re-apply hard rename — libcosmic -> libcosmic-yoda (0.1.0-yoda) -aec3eb61yoda: ungate remaining winit+wayland combined cfgs -8ab7b158yoda-v2: color_picker Theme ref + context_menu/menu ungate winit -8d1d8739yoda: drop x11 defaults on iced_winit + iced_tiny_skia
This commit is contained in:
parent
261a211647
commit
45eaaf1605
101 changed files with 82 additions and 103 deletions
|
|
@ -2,13 +2,12 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::Action;
|
||||
#[cfg(feature = "winit")]
|
||||
use crate::Application;
|
||||
|
||||
use iced::{Rectangle, window};
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
use iced_runtime::platform_specific::wayland::CornerRadius;
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
use iced_runtime::platform_specific::wayland::layer_surface::IcedMargin;
|
||||
use std::any::Any;
|
||||
use std::sync::Arc;
|
||||
|
|
@ -40,17 +39,17 @@ pub fn destroy_layer_shell(id: iced_core::window::Id) -> Action {
|
|||
|
||||
#[derive(Debug, Default, Copy, Clone)]
|
||||
pub struct LiveSettings {
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
/// Override the surface padding value for the surface type.
|
||||
pub padding: Option<IcedMargin>,
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
/// Override the default corner radius value for the surface type.
|
||||
pub corners: Option<CornerRadius>,
|
||||
/// Override the default blur setting for the surface type.
|
||||
pub blur: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
type BoxedView<App> = Option<
|
||||
Box<
|
||||
dyn Fn(&App) -> crate::Element<'_, crate::Action<<App as Application>::Message>>
|
||||
|
|
@ -60,7 +59,7 @@ type BoxedView<App> = Option<
|
|||
>,
|
||||
>;
|
||||
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn app_window<App: Application>(
|
||||
live_settings: impl Fn(&App) -> LiveSettings + Send + Sync + 'static,
|
||||
|
|
@ -92,7 +91,7 @@ pub fn app_window<App: Application>(
|
|||
}
|
||||
|
||||
/// Used to create a window message from within a widget.
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn simple_window<Message: 'static>(
|
||||
live_settings: impl Fn() -> LiveSettings + Send + Sync + 'static,
|
||||
|
|
@ -129,7 +128,7 @@ pub fn simple_window<Message: 'static>(
|
|||
)
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn app_popup<App: Application>(
|
||||
live_settings: impl Fn(&App) -> LiveSettings + Send + Sync + 'static,
|
||||
|
|
@ -162,7 +161,7 @@ pub fn app_popup<App: Application>(
|
|||
}
|
||||
|
||||
/// Used to create a subsurface message from within a widget.
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn simple_subsurface<Message: 'static>(
|
||||
settings: impl Fn() -> iced_runtime::platform_specific::wayland::subsurface::SctkSubsurfaceSettings
|
||||
|
|
@ -192,7 +191,7 @@ pub fn simple_subsurface<Message: 'static>(
|
|||
}
|
||||
|
||||
/// Used to create a popup message from within a widget.
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn simple_popup<Message: 'static>(
|
||||
live_settings: impl Fn() -> LiveSettings + Send + Sync + 'static,
|
||||
|
|
@ -228,7 +227,7 @@ pub fn simple_popup<Message: 'static>(
|
|||
)
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "wayland", target_os = "linux", feature = "winit"))]
|
||||
#[cfg(all(feature = "wayland", target_os = "linux"))]
|
||||
#[must_use]
|
||||
pub fn subsurface<App: Application>(
|
||||
settings: impl Fn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue