From e953b1828d5b8dbdd145829f47c4817137e37f0d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 9 Nov 2019 05:06:04 +0100 Subject: Allow applications to control the window title `iced_winit` will change the window title dynamically at runtime! --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index da108804..52b0ff8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,8 @@ pub use platform::*; pub trait Application { type Message: std::fmt::Debug; + fn title(&self) -> String; + fn update(&mut self, message: Self::Message); fn view(&mut self) -> Element; @@ -33,6 +35,10 @@ where type Renderer = Renderer; type Message = A::Message; + fn title(&self) -> String { + self.0.title() + } + fn update(&mut self, message: Self::Message) { self.0.update(message); } -- cgit