Skip to content

Commit

Permalink
Merge pull request #1 from mosaic-org/max-height
Browse files Browse the repository at this point in the history
feat(api): set max height
  • Loading branch information
imsnif authored Jan 28, 2021
2 parents 680a986 + 2ed46c5 commit 6bce06f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) };
Expand All @@ -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();
}

0 comments on commit 6bce06f

Please sign in to comment.