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:
Edwin Cheng 2018-04-18 02:07:54 +08:00 committed by Francesca Frangipane
parent 8fd49a4dbe
commit 0474dc9861
4 changed files with 318 additions and 45 deletions

View file

@ -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 {