summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/src/window.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index 598ee491..cdef70e3 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -164,6 +164,9 @@ pub enum Action {
/// Set the maximum inner window size.
SetMaxSize(Id, Option<Size>),
+
+ /// Set the window to be resizable or not.
+ SetResizable(Id, bool),
}
/// Subscribes to the frames of the window of the running application.
@@ -274,6 +277,11 @@ pub fn resize<T>(id: Id, new_size: Size) -> Task<T> {
task::effect(crate::Action::Window(Action::Resize(id, new_size)))
}
+/// Set the window to be resizable or not.
+pub fn resizable<T>(id: Id, resizable: bool) -> Task<T> {
+ task::effect(crate::Action::Window(Action::SetResizable(id, resizable)))
+}
+
/// Get the window's size in logical dimensions.
pub fn get_size(id: Id) -> Task<Size> {
task::oneshot(move |channel| {