chore: cleanup platform specific code
This commit is contained in:
parent
a11b828280
commit
3b7f0bec0e
18 changed files with 109 additions and 101 deletions
|
|
@ -17,7 +17,7 @@ workspace = true
|
|||
debug = []
|
||||
selector = ["dep:iced_selector"]
|
||||
a11y = ["iced_accessibility", "iced_core/a11y"]
|
||||
wayland = ["iced_core/wayland", "cctk"]
|
||||
cctk = ["iced_core/cctk", "dep:cctk"]
|
||||
|
||||
[dependencies]
|
||||
bytes.workspace = true
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
use std::fmt;
|
||||
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(all(feature = "cctk", target_os = "linux"))]
|
||||
/// Platform specific actions defined for wayland
|
||||
pub mod wayland;
|
||||
|
||||
/// Platform specific actions defined for wayland
|
||||
pub enum Action {
|
||||
/// Wayland Specific Actions
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(all(feature = "cctk", target_os = "linux"))]
|
||||
Wayland(wayland::Action),
|
||||
}
|
||||
|
||||
impl fmt::Debug for Action {
|
||||
fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(all(feature = "cctk", target_os = "linux"))]
|
||||
Action::Wayland(action) => action.fmt(_f),
|
||||
#[cfg(not(feature = "wayland"))]
|
||||
_ => Ok(()),
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ pub fn frames() -> Subscription<(Id, Instant)> {
|
|||
_ => None,
|
||||
})
|
||||
}
|
||||
#[cfg(feature = "wayland")]
|
||||
#[cfg(all(feature = "cctk", target_os = "linux"))]
|
||||
/// Subscribes to the frames of the window of the running application.
|
||||
///
|
||||
/// The resulting [`Subscription`] will produce items at a rate equal to the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue