From c61c33a833ebbf874885d3c48491f8307bffe68e Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 10 Mar 2015 10:29:07 +0100 Subject: Add set_cursor_position function --- src/window.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index 1bab245..bd5fc14 100644 --- a/src/window.rs +++ b/src/window.rs @@ -409,6 +409,11 @@ impl Window { pub fn hidpi_factor(&self) -> f32 { self.window.hidpi_factor() } + + /// Changes the position of the cursor in window coordinates. + pub fn set_cursor_position(&self, x: i32, y: i32) -> Result<(), ()> { + self.window.set_cursor_position(x, y) + } } impl gl_common::GlFunctionsSource for Window { -- cgit v1.2.3