From 2ed46c5fe6e148f4acb42482da0db674f0aad41a Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 28 Jan 2021 18:19:27 +0100 Subject: [PATCH] feat(api): set max height --- src/shim.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shim.rs b/src/shim.rs index 6fa8b0e6ca..452d69a9b3 100644 --- a/src/shim.rs +++ b/src/shim.rs @@ -32,6 +32,10 @@ pub fn open_file(path: &Path) { unsafe { host_open_file() }; } +pub fn set_max_height(max_height: i32) { + unsafe { host_set_max_height(max_height) }; +} + pub fn set_selectable(selectable: bool) { let selectable = if selectable { 1 } else { 0 }; unsafe { host_set_selectable(selectable) }; @@ -51,6 +55,7 @@ fn deserialize_from_stdin() -> Option { #[link(wasm_import_module = "mosaic")] extern "C" { fn host_open_file(); + fn host_set_max_height(max_height: i32); fn host_set_selectable(selectable: i32); fn host_get_help(); }