aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-03-11 09:01:20 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-03-11 09:01:20 +0100
commit4dc14280a8f192961a46e70267cf7eae78416582 (patch)
tree841976b471235813010fb65a4e540e607e04bb77 /src/window.rs
parent277b66a70852661f7eb645e3e216c927eb94dffb (diff)
parentc61c33a833ebbf874885d3c48491f8307bffe68e (diff)
downloadglutin-4dc14280a8f192961a46e70267cf7eae78416582.tar.gz
glutin-4dc14280a8f192961a46e70267cf7eae78416582.zip
Merge pull request #308 from tomaka/cursor-pos
Add set_cursor_position function
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs5
1 files changed, 5 insertions, 0 deletions
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 {