Change grab_cursor and ungrab_cursor to set_cursor_state

This commit is contained in:
Pierre Krieger 2015-03-26 17:04:01 +01:00
parent d6ebaaaf5c
commit 3d692870e2
7 changed files with 76 additions and 51 deletions

View file

@ -1,7 +1,7 @@
#[cfg(feature = "headless")]
pub use self::headless::HeadlessContext;
use {CreationError, Event, MouseCursor};
use {CreationError, Event, MouseCursor, CursorState};
use CreationError::OsError;
use libc;
@ -661,6 +661,10 @@ impl Window {
}
}
pub fn set_cursor_state(&self, state: CursorState) -> Result<(), String> {
unimplemented!();
}
pub fn hidpi_factor(&self) -> f32 {
unsafe {
NSWindow::backingScaleFactor(*self.window) as f32