aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2021-01-28 18:23:47 +0100
committerGitHub <noreply@github.com>2021-01-28 18:23:47 +0100
commit6bce06f73bbf1f9a5ca4414a813f6ba0078674dc (patch)
tree302ba92bf09ce2ed74ccd19d107f82c7737015d2 /src
parentAdd get_help function (diff)
parentfeat(api): set max height (diff)
downloadsl0ppij-6bce06f73bbf1f9a5ca4414a813f6ba0078674dc.tar.gz
sl0ppij-6bce06f73bbf1f9a5ca4414a813f6ba0078674dc.tar.xz
sl0ppij-6bce06f73bbf1f9a5ca4414a813f6ba0078674dc.zip
Merge pull request #1 from mosaic-org/max-height
feat(api): set max height
Diffstat (limited to 'src')
-rw-r--r--src/shim.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shim.rs b/src/shim.rs
index 6fa8b0e6..452d69a9 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<T: DeserializeOwned>() -> Option<T> {
#[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();
}