aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2014-12-16 15:49:22 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2014-12-19 05:44:20 +1000
commit0ad9c3d453076adc5d94008d7e155d7ee5536225 (patch)
tree21deae10784df127b9989e2cfe4a472686ff1655 /src/lib.rs
parent0164449955d1b4787fce03f8800e32f19fd04a01 (diff)
downloadglutin-0ad9c3d453076adc5d94008d7e155d7ee5536225.tar.gz
glutin-0ad9c3d453076adc5d94008d7e155d7ee5536225.zip
Add callback function to allow resize messages to be sent on mac.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 029b576..48fcc85 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -482,6 +482,13 @@ impl Window {
proxy: self.window.create_window_proxy()
}
}
+
+ /// Sets a resize callback that is called by Mac (and potentially other
+ /// operating systems) during resize operations. This can be used to repaint
+ /// during window resizing.
+ pub fn set_window_resize_callback(&mut self, callback: fn(uint, uint)) {
+ self.window.set_window_resize_callback(callback);
+ }
}
#[cfg(feature = "window")]
@@ -542,6 +549,9 @@ impl HeadlessContext {
pub fn get_api(&self) -> Api {
self.context.get_api()
}
+
+ pub fn set_window_resize_callback(&mut self, _: fn(uint, uint)) {
+ }
}
#[cfg(feature = "headless")]