feat: add window title api

This commit is contained in:
mrxiaozhuox committed 2022-02-10 12:35:17 +08:00
1 parent 67766c7b59
commit 6eaad850ee
2 files changed
+15

No files matched your search

+7
View File
@@ -57,6 +57,13 @@ impl DesktopContext {
pub fn focus(&self) {
let _ = self.proxy.send_event(UserWindowEvent::FocusWindow);
}
/// set window title
pub fn title(&self, title: &str) {
let _ = self
.proxy
.send_event(UserWindowEvent::Title(String::from(title)));
}
}
/// use this function can get the `DesktopContext` context.