diff options
Diffstat (limited to 'winit/src/window.rs')
| -rw-r--r-- | winit/src/window.rs | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/winit/src/window.rs b/winit/src/window.rs index 961562bd..ba0180c8 100644 --- a/winit/src/window.rs +++ b/winit/src/window.rs @@ -2,7 +2,9 @@  use crate::command::{self, Command};  use iced_native::window; -pub use window::{frames, Event, Mode, RedrawRequest, UserAttention}; +pub use window::{ +    frames, icon, Event, Icon, Mode, RedrawRequest, UserAttention, +};  /// Closes the current window and exits the application.  pub fn close<Message>() -> Command<Message> { @@ -104,3 +106,8 @@ pub fn fetch_id<Message>(          f,      ))))  } + +/// Changes the [`Icon`] of the window. +pub fn change_icon<Message>(icon: Icon) -> Command<Message> { +    Command::single(command::Action::Window(window::Action::ChangeIcon(icon))) +}  | 
