refactored window storage;
new helper window events (Destroyed, Created); clippy + fmt;
This commit is contained in:
parent
633f405f3f
commit
d53ccc857d
56 changed files with 1508 additions and 1819 deletions
12
core/src/window/settings/macos.rs
Normal file
12
core/src/window/settings/macos.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
//! 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,
|
||||
}
|
||||
3
core/src/window/settings/other.rs
Normal file
3
core/src/window/settings/other.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
/// The platform specific window settings of an application.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub struct PlatformSpecific;
|
||||
11
core/src/window/settings/wasm.rs
Normal file
11
core/src/window/settings/wasm.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
//! Platform specific settings for WebAssembly.
|
||||
|
||||
/// The platform specific window settings of an application.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default)]
|
||||
pub struct PlatformSpecific {
|
||||
/// The identifier of a DOM element that will be replaced with the
|
||||
/// application.
|
||||
///
|
||||
/// If set to `None`, the application will be appended to the HTML body.
|
||||
pub target: Option<String>,
|
||||
}
|
||||
21
core/src/window/settings/windows.rs
Normal file
21
core/src/window/settings/windows.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
//! Platform specific settings for Windows.
|
||||
use raw_window_handle::RawWindowHandle;
|
||||
|
||||
/// The platform specific window settings of an application.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct PlatformSpecific {
|
||||
/// Parent window
|
||||
pub parent: Option<RawWindowHandle>,
|
||||
|
||||
/// Drag and drop support
|
||||
pub drag_and_drop: bool,
|
||||
}
|
||||
|
||||
impl Default for PlatformSpecific {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
parent: None,
|
||||
drag_and_drop: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue