aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2014-12-17 14:49:11 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2014-12-17 14:50:05 +1000
commit9dc5689eef87cace5e6ac6b5438928a1c99688c4 (patch)
tree224ec970788ed9d1f6830381946421a05d9c8741 /src/win32
parent19d120b8b19d85e9cea5c3e8851b8809d072b8bd (diff)
downloadglutin-9dc5689eef87cace5e6ac6b5438928a1c99688c4.tar.gz
glutin-9dc5689eef87cace5e6ac6b5438928a1c99688c4.zip
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.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index 5ba5a26..099c126 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -83,6 +83,16 @@ impl Window {
}
}
+#[cfg(feature = "window")]
+#[deriving(Clone)]
+pub struct WindowProxy;
+
+impl WindowProxy {
+ pub fn wakeup_event_loop(&self) {
+ // TODO
+ }
+}
+
impl Window {
/// See the docs in the crate root file.
pub fn is_closed(&self) -> bool {
@@ -180,6 +190,10 @@ impl Window {
}
}
+ pub fn create_window_proxy(&self) -> WindowProxy {
+ WindowProxy
+ }
+
/// See the docs in the crate root file.
// TODO: return iterator
pub fn poll_events(&self) -> Vec<Event> {