summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-17 13:24:46 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-17 13:24:46 +0100
commitdb65c6904d38fe37ad0c31a11242d55f5f773c94 (patch)
tree9211457e4a8366b4c730cc0aea1ebd10bd0aee0b
parentdf861d9ece5e8695d05d08f104d37f55222fb363 (diff)
downloadiced-db65c6904d38fe37ad0c31a11242d55f5f773c94.tar.gz
iced-db65c6904d38fe37ad0c31a11242d55f5f773c94.tar.bz2
iced-db65c6904d38fe37ad0c31a11242d55f5f773c94.zip
Expose `change_always_on_top` helper in `window` module
-rw-r--r--winit/src/window.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs
index 6e3a383a..3d5a765b 100644
--- a/winit/src/window.rs
+++ b/winit/src/window.rs
@@ -23,13 +23,17 @@ pub fn resize<Message>(width: u32, height: u32) -> Command<Message> {
}
/// Maximizes the window.
-pub fn maximize<Message>(value: bool) -> Command<Message> {
- Command::single(command::Action::Window(window::Action::Maximize(value)))
+pub fn maximize<Message>(maximized: bool) -> Command<Message> {
+ Command::single(command::Action::Window(window::Action::Maximize(
+ maximized,
+ )))
}
/// Minimes the window.
-pub fn minimize<Message>(value: bool) -> Command<Message> {
- Command::single(command::Action::Window(window::Action::Minimize(value)))
+pub fn minimize<Message>(minimized: bool) -> Command<Message> {
+ Command::single(command::Action::Window(window::Action::Minimize(
+ minimized,
+ )))
}
/// Moves a window to the given logical coordinates.
@@ -84,3 +88,10 @@ pub fn request_user_attention<Message>(
pub fn gain_focus<Message>() -> Command<Message> {
Command::single(command::Action::Window(window::Action::GainFocus))
}
+
+/// Changes whether or not the window will always be on top of other windows.
+pub fn change_always_on_top<Message>(on_top: bool) -> Command<Message> {
+ Command::single(command::Action::Window(window::Action::ChangeAlwaysOnTop(
+ on_top,
+ )))
+}