mirror of
https://github.com/storytold/winit.git
synced 2026-11-29 09:44:58 +01:00
Add Window::title getter on Windows and macOS
This commit is contained in:
1 parent
a7a7cc64cd
commit
08f9e374e0
11 files changed
+64
-7
No files matched your search
@@ -589,6 +589,11 @@ impl Window {
|
||||
pub fn theme(&self) -> Option<Theme> {
|
||||
x11_or_wayland!(match self; Window(window) => window.theme())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn title(&self) -> String {
|
||||
x11_or_wayland!(match self; Window(window) => window.title())
|
||||
}
|
||||
}
|
||||
|
||||
/// Hooks for X11 errors.
|
||||
|
||||
@@ -624,6 +624,11 @@ impl Window {
|
||||
pub fn theme(&self) -> Option<Theme> {
|
||||
None
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn title(&self) -> String {
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Window {
|
||||
|
||||
@@ -1551,4 +1551,9 @@ impl UnownedWindow {
|
||||
pub fn theme(&self) -> Option<Theme> {
|
||||
None
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn title(&self) -> String {
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user