winit-core: drop all cfg except web
This commit is contained in:
parent
cf5e422dc8
commit
634b9baea2
3 changed files with 1 additions and 26 deletions
|
|
@ -6,21 +6,6 @@ fn main() {
|
||||||
|
|
||||||
// Setup cfg aliases.
|
// Setup cfg aliases.
|
||||||
cfg_aliases! {
|
cfg_aliases! {
|
||||||
// Systems.
|
|
||||||
android_platform: { target_os = "android" },
|
|
||||||
web_platform: { all(target_family = "wasm", target_os = "unknown") },
|
web_platform: { all(target_family = "wasm", target_os = "unknown") },
|
||||||
macos_platform: { target_os = "macos" },
|
|
||||||
ios_platform: { all(target_vendor = "apple", not(target_os = "macos")) },
|
|
||||||
windows_platform: { target_os = "windows" },
|
|
||||||
free_unix: { all(unix, not(target_vendor = "apple"), not(android_platform), not(target_os = "emscripten")) },
|
|
||||||
redox: { target_os = "redox" },
|
|
||||||
|
|
||||||
// Native displays.
|
|
||||||
x11_platform: { all(feature = "x11", free_unix, not(redox)) },
|
|
||||||
wayland_platform: { all(feature = "wayland", free_unix, not(redox)) },
|
|
||||||
orbital_platform: { redox },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Winit defined cfgs.
|
|
||||||
println!("cargo:rustc-check-cfg=cfg(unreleased_changelogs)");
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,6 @@ pub enum StartCause {
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum WindowEvent {
|
pub enum WindowEvent {
|
||||||
/// The activation token was delivered back and now could be used.
|
/// The activation token was delivered back and now could be used.
|
||||||
#[cfg_attr(not(any(x11_platform, wayland_platform)), allow(rustdoc::broken_intra_doc_links))]
|
|
||||||
/// Delivered in response to [`request_activation_token`].
|
|
||||||
///
|
|
||||||
/// [`request_activation_token`]: crate::platform::startup_notify::WindowExtStartupNotify::request_activation_token
|
|
||||||
ActivationTokenDone { serial: AsyncRequestSerial, token: ActivationToken },
|
ActivationTokenDone { serial: AsyncRequestSerial, token: ActivationToken },
|
||||||
|
|
||||||
/// The size of the window's surface has changed.
|
/// The size of the window's surface has changed.
|
||||||
|
|
@ -1083,7 +1079,6 @@ pub struct SurfaceSizeWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SurfaceSizeWriter {
|
impl SurfaceSizeWriter {
|
||||||
#[cfg(not(orbital_platform))]
|
|
||||||
pub fn new(new_surface_size: Weak<Mutex<PhysicalSize<u32>>>) -> Self {
|
pub fn new(new_surface_size: Weak<Mutex<PhysicalSize<u32>>>) -> Self {
|
||||||
Self { new_surface_size }
|
Self { new_surface_size }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1546,12 +1546,7 @@ impl ActivationToken {
|
||||||
/// only result in the side effect of the operation involving it being ignored (e.g. window
|
/// only result in the side effect of the operation involving it being ignored (e.g. window
|
||||||
/// won't get focused automatically), but won't yield any errors.
|
/// won't get focused automatically), but won't yield any errors.
|
||||||
///
|
///
|
||||||
/// To obtain a valid token, use
|
/// To obtain a valid token consult the backend implementation.
|
||||||
#[cfg_attr(
|
|
||||||
any(x11_platform, wayland_platform),
|
|
||||||
doc = " [`request_activation_token`](crate::platform::startup_notify::WindowExtStartupNotify::request_activation_token)."
|
|
||||||
)]
|
|
||||||
#[cfg_attr(not(any(x11_platform, wayland_platform)), doc = " `request_activation_token`.")]
|
|
||||||
pub fn from_raw(token: String) -> Self {
|
pub fn from_raw(token: String) -> Self {
|
||||||
Self { token }
|
Self { token }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue