aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 029b576..a1c0a28 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -482,6 +482,14 @@ 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.
+ #[experimental]
+ pub fn set_window_resize_callback(&mut self, callback: Option<fn(uint, uint)>) {
+ self.window.set_window_resize_callback(callback);
+ }
}
#[cfg(feature = "window")]
@@ -542,6 +550,10 @@ impl HeadlessContext {
pub fn get_api(&self) -> Api {
self.context.get_api()
}
+
+ #[experimental]
+ pub fn set_window_resize_callback(&mut self, _: Option<fn(uint, uint)>) {
+ }
}
#[cfg(feature = "headless")]