From b532b8c65fd1828fd7d742d0994c6118880d07f0 Mon Sep 17 00:00:00 2001 From: Bryan Bell Date: Mon, 12 Jan 2015 16:22:37 -0800 Subject: Add mouse cursor support Add a new api, window.set_cursor, for setting the cursor. The enum MouseCursor lists the possible cursors. Only X11 is implemented. On OSX, Android, & Win32 the window.set_cursor function either does nothing or calls the "unimplemented!" macro. --- src/win32/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/win32/mod.rs') diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 168771d..0d72c17 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -285,6 +285,10 @@ impl Window { pub fn set_window_resize_callback(&mut self, _: Option) { } + + pub fn set_cursor(&self, cursor: MouseCursor) { + unimplemented!() + } } #[unsafe_destructor] -- cgit v1.2.3 From 5389c73b852d82ddfbc66ffacdf5620f431275dd Mon Sep 17 00:00:00 2001 From: Bryan Bell Date: Mon, 12 Jan 2015 19:45:20 -0800 Subject: Fix OS X & Win32 builds --- src/osx/mod.rs | 2 +- src/win32/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/win32/mod.rs') diff --git a/src/osx/mod.rs b/src/osx/mod.rs index 2052286..7b362ba 100644 --- a/src/osx/mod.rs +++ b/src/osx/mod.rs @@ -1,7 +1,7 @@ #[cfg(feature = "headless")] pub use self::headless::HeadlessContext; -use {CreationError, Event}; +use {CreationError, Event, MouseCursor}; use CreationError::OsError; use libc; diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 0d72c17..463d5fe 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -4,7 +4,7 @@ use std::ffi::CString; use std::collections::RingBuf; use std::sync::mpsc::Receiver; use libc; -use {CreationError, Event}; +use {CreationError, Event, MouseCursor}; use BuilderAttribs; -- cgit v1.2.3