Implement set_maximized, get_current_monitor, set_fullscreen and set_decorations for MacOS (#465)
* Added helper function for make monitor from display. * Implement get_current_monitor for macos * Implemented with_fullscreen and set_fullscreen for macos * Implemented set_decorations for macos * Implement set_maximized and with_maximized for macos * Changed fullscreen example fullscreen keypress from F11 to F * Update CHANGELOG.md * Add and fixed some comments * Reformat and add more comments * Better handling window and maximized state * Reformat and typo fix
This commit is contained in:
parent
8fd49a4dbe
commit
0474dc9861
4 changed files with 318 additions and 45 deletions
|
|
@ -6,7 +6,7 @@ use std::collections::VecDeque;
|
|||
use super::EventsLoop;
|
||||
use super::window::IdRef;
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub struct MonitorId(CGDirectDisplayID);
|
||||
|
||||
impl EventsLoop {
|
||||
|
|
@ -25,6 +25,11 @@ impl EventsLoop {
|
|||
let id = MonitorId(CGDisplay::main().id);
|
||||
id
|
||||
}
|
||||
|
||||
pub fn make_monitor_from_display(id: CGDirectDisplayID) -> MonitorId {
|
||||
let id = MonitorId(id);
|
||||
id
|
||||
}
|
||||
}
|
||||
|
||||
impl MonitorId {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue