From 9dc5689eef87cace5e6ac6b5438928a1c99688c4 Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 17 Dec 2014 14:49:11 +1000 Subject: Introduce a WindowProxy for accessing a subset of functionality from other threads. This currently provides a way for other threads to wakeup a blocked event loop on X11. Other platforms have stub functions that need to be implemented. This is similar to the functionality of glfwPostEmptyEvent. --- src/android/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/android') diff --git a/src/android/mod.rs b/src/android/mod.rs index 8093d50..fd0a857 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -207,6 +207,10 @@ impl Window { pub fn set_inner_size(&self, _x: uint, _y: uint) { } + pub fn create_window_proxy(&self) -> WindowProxy { + WindowProxy + } + pub fn poll_events(&self) -> Vec { use std::time::Duration; use std::io::timer; @@ -271,6 +275,16 @@ impl Window { } } +#[cfg(feature = "window")] +#[deriving(Clone)] +pub struct WindowProxy; + +impl WindowProxy { + pub fn wakeup_event_loop(&self) { + // TODO + } +} + #[unsafe_destructor] impl Drop for Window { fn drop(&mut self) { -- cgit v1.2.3 From 95f82927b37e27f1880e9941b316227f6c6baebc Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Fri, 19 Dec 2014 05:00:43 +1000 Subject: Change todo to unimplemented --- src/android/mod.rs | 2 +- src/win32/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/android') diff --git a/src/android/mod.rs b/src/android/mod.rs index fd0a857..8bc82ce 100644 --- a/src/android/mod.rs +++ b/src/android/mod.rs @@ -281,7 +281,7 @@ pub struct WindowProxy; impl WindowProxy { pub fn wakeup_event_loop(&self) { - // TODO + unimplemented!() } } diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 099c126..978e3b5 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -89,7 +89,7 @@ pub struct WindowProxy; impl WindowProxy { pub fn wakeup_event_loop(&self) { - // TODO + unimplemented!() } } -- cgit v1.2.3