diff --git a/src/macos/window.rs b/src/macos/window.rs index e6185b9c..4bdc62e5 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -23,8 +23,8 @@ use raw_window_handle::{ }; use crate::{ - Event, EventStatus, Size, WindowEvent, WindowHandler, WindowInfo, WindowOpenOptions, - WindowScalePolicy, + Event, EventStatus, MouseCursor, Size, WindowEvent, WindowHandler, WindowInfo, + WindowOpenOptions, WindowScalePolicy, }; use super::keyboard::KeyboardState; @@ -300,6 +300,10 @@ impl Window { } } + pub fn set_mouse_cursor(&mut self, _mouse_cursor: MouseCursor) { + todo!() + } + #[cfg(feature = "opengl")] pub fn gl_context(&self) -> Option<&GlContext> { self.gl_context.as_ref() diff --git a/src/win/window.rs b/src/win/window.rs index 5ae57378..885027c7 100644 --- a/src/win/window.rs +++ b/src/win/window.rs @@ -34,7 +34,7 @@ use raw_window_handle::{ const BV_WINDOW_MUST_CLOSE: UINT = WM_USER + 1; use crate::{ - Event, MouseButton, MouseEvent, PhyPoint, PhySize, ScrollDelta, Size, WindowEvent, + Event, MouseButton, MouseCursor, MouseEvent, PhyPoint, PhySize, ScrollDelta, Size, WindowEvent, WindowHandler, WindowInfo, WindowOpenOptions, WindowScalePolicy, }; @@ -765,6 +765,10 @@ impl Window<'_> { self.state.deferred_tasks.borrow_mut().push_back(task); } + pub fn set_mouse_cursor(&mut self, _mouse_cursor: MouseCursor) { + todo!() + } + #[cfg(feature = "opengl")] pub fn gl_context(&self) -> Option<&GlContext> { self.state.gl_context.as_ref() diff --git a/src/window.rs b/src/window.rs index 4fac86bc..e0372f89 100644 --- a/src/window.rs +++ b/src/window.rs @@ -6,7 +6,7 @@ use raw_window_handle::{ use crate::event::{Event, EventStatus}; use crate::window_open_options::WindowOpenOptions; -use crate::Size; +use crate::{MouseCursor, Size}; #[cfg(target_os = "macos")] use crate::macos as platform; @@ -101,6 +101,10 @@ impl<'a> Window<'a> { self.window.resize(size); } + pub fn set_mouse_cursor(&mut self, cursor: MouseCursor) { + self.window.set_mouse_cursor(cursor); + } + /// If provided, then an OpenGL context will be created for this window. You'll be able to /// access this context through [crate::Window::gl_context]. #[cfg(feature = "opengl")]