diff options
Diffstat (limited to 'winit/src/settings')
-rw-r--r-- | winit/src/settings/macos.rs | 13 | ||||
-rw-r--r-- | winit/src/settings/not_windows.rs | 6 | ||||
-rw-r--r-- | winit/src/settings/other.rs | 3 | ||||
-rw-r--r-- | winit/src/settings/windows.rs | 16 |
4 files changed, 30 insertions, 8 deletions
diff --git a/winit/src/settings/macos.rs b/winit/src/settings/macos.rs new file mode 100644 index 00000000..ad4c8cae --- /dev/null +++ b/winit/src/settings/macos.rs @@ -0,0 +1,13 @@ +#![cfg(target_os = "macos")] +//! Platform specific settings for macOS. + +/// The platform specific window settings of an application. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub struct PlatformSpecific { + /// Hides the window title. + pub title_hidden: bool, + /// Makes the titlebar transparent and allows the content to appear behind it. + pub titlebar_transparent: bool, + /// Makes the window content appear behind the titlebar. + pub fullsize_content_view: bool, +} diff --git a/winit/src/settings/not_windows.rs b/winit/src/settings/not_windows.rs deleted file mode 100644 index 5d703f84..00000000 --- a/winit/src/settings/not_windows.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![cfg(not(target_os = "windows"))] -//! Platform specific settings for not Windows. - -/// The platform specific window settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] -pub struct PlatformSpecific {} diff --git a/winit/src/settings/other.rs b/winit/src/settings/other.rs new file mode 100644 index 00000000..b1103f62 --- /dev/null +++ b/winit/src/settings/other.rs @@ -0,0 +1,3 @@ +/// The platform specific window settings of an application. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub struct PlatformSpecific; diff --git a/winit/src/settings/windows.rs b/winit/src/settings/windows.rs index 76b8d067..fc26acd7 100644 --- a/winit/src/settings/windows.rs +++ b/winit/src/settings/windows.rs @@ -2,8 +2,20 @@ //! Platform specific settings for Windows. /// The platform specific window settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct PlatformSpecific { - /// Parent Window + /// Parent window pub parent: Option<winapi::shared::windef::HWND>, + + /// Drag and drop support + pub drag_and_drop: bool, +} + +impl Default for PlatformSpecific { + fn default() -> Self { + Self { + parent: None, + drag_and_drop: true, + } + } } |