feat: add Window::is_visible (#2169)

* feat: add `Window::is_visible`

* use `Option<bool>`

* update doc

* move it right after `set_visible`
This commit is contained in:
Amr Bashir
2022-02-17 20:44:14 +02:00
committed by GitHub
parent ac1c9b1218
commit f9643917d3
10 changed files with 54 additions and 0 deletions

View File

@@ -97,6 +97,11 @@ impl Window {
});
}
#[inline]
pub fn is_visible(&self) -> Option<bool> {
Some(unsafe { winuser::IsWindowVisible(self.window.0) == 1 })
}
#[inline]
pub fn request_redraw(&self) {
unsafe {