diff options
Diffstat (limited to 'runtime/src/window.rs')
-rw-r--r-- | runtime/src/window.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs index 236064f7..833a1125 100644 --- a/runtime/src/window.rs +++ b/runtime/src/window.rs @@ -5,7 +5,7 @@ pub use action::Action; use crate::command::{self, Command}; use crate::core::time::Instant; -use crate::core::window::{Event, Mode, UserAttention}; +use crate::core::window::{Event, Icon, Mode, UserAttention}; use crate::futures::subscription::{self, Subscription}; /// Subscribes to the frames of the window of the running application. @@ -110,3 +110,8 @@ pub fn fetch_id<Message>( ) -> Command<Message> { Command::single(command::Action::Window(Action::FetchId(Box::new(f)))) } + +/// Changes the [`Icon`] of the window. +pub fn change_icon<Message>(icon: Icon) -> Command<Message> { + Command::single(command::Action::Window(Action::ChangeIcon(icon))) +} |