Feat/fullscreen getters (#838)
* feat: [macos] add get_fullscreen and get_simple_fullscreen * feat: [windows] add get_fullscreen * feat: [ios] add get_fullscreen * feat: [android] add get_fullscreen * feat: [emscripten] add get_fullscreen * feat: [linux] add get_fullscreen * feedback: `get_fullscreen() -> bool` -> `get_fullscreen() -> Option<Id>`
This commit is contained in:
parent
fa99b9ff5a
commit
062e0e52ee
11 changed files with 96 additions and 3 deletions
|
|
@ -618,6 +618,11 @@ impl WindowExt for Window2 {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_simple_fullscreen(&self) -> bool {
|
||||
self.delegate.state.is_simple_fullscreen.get()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn set_simple_fullscreen(&self, fullscreen: bool) -> bool {
|
||||
let state = &self.delegate.state;
|
||||
|
|
@ -1137,6 +1142,14 @@ impl Window2 {
|
|||
self.delegate.state.perform_maximized(maximized)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_fullscreen(&self) -> Option<RootMonitorHandle> {
|
||||
let state = &self.delegate.state;
|
||||
let win_attribs = state.win_attribs.borrow();
|
||||
|
||||
win_attribs.fullscreen.clone()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// TODO: Right now set_fullscreen do not work on switching monitors
|
||||
/// in fullscreen mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue