Fix compilation errors

This commit is contained in:
Ryan Goldstein 2019-09-24 19:39:13 -04:00
parent 3e8669ea7f
commit 6732fa731d
5 changed files with 54 additions and 8 deletions

View file

@ -2,7 +2,9 @@ use crate::dpi::{LogicalPosition, LogicalSize};
use crate::error::{ExternalError, NotSupportedError, OsError as RootOE};
use crate::icon::Icon;
use crate::monitor::MonitorHandle as RootMH;
use crate::window::{CursorIcon, WindowAttributes, WindowId as RootWI};
use crate::window::{CursorIcon, Fullscreen, WindowAttributes, WindowId as RootWI};
use raw_window_handle::{RawWindowHandle, web::WebHandle};
use super::{backend, monitor, EventLoopWindowTarget};
@ -203,13 +205,13 @@ impl Window {
}
#[inline]
pub fn fullscreen(&self) -> Option<RootMH> {
pub fn fullscreen(&self) -> Option<Fullscreen> {
// TODO: should there be a maximization / fullscreen API?
None
}
#[inline]
pub fn set_fullscreen(&self, _monitor: Option<RootMH>) {
pub fn set_fullscreen(&self, _monitor: Option<Fullscreen>) {
// TODO: should there be a maximization / fullscreen API?
}
@ -254,6 +256,16 @@ impl Window {
pub fn id(&self) -> Id {
return self.id;
}
#[inline]
pub fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {
let handle = WebHandle {
id: self.id.0,
..WebHandle::empty()
};
raw_window_handle::RawWindowHandle::Web(handle)
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]