feat(api): set max height
This commit is contained in:
parent
680a986cf6
commit
2ed46c5fe6
1 changed files with 5 additions and 0 deletions
|
|
@ -32,6 +32,10 @@ pub fn open_file(path: &Path) {
|
||||||
unsafe { host_open_file() };
|
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) {
|
pub fn set_selectable(selectable: bool) {
|
||||||
let selectable = if selectable { 1 } else { 0 };
|
let selectable = if selectable { 1 } else { 0 };
|
||||||
unsafe { host_set_selectable(selectable) };
|
unsafe { host_set_selectable(selectable) };
|
||||||
|
|
@ -51,6 +55,7 @@ fn deserialize_from_stdin<T: DeserializeOwned>() -> Option<T> {
|
||||||
#[link(wasm_import_module = "mosaic")]
|
#[link(wasm_import_module = "mosaic")]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn host_open_file();
|
fn host_open_file();
|
||||||
|
fn host_set_max_height(max_height: i32);
|
||||||
fn host_set_selectable(selectable: i32);
|
fn host_set_selectable(selectable: i32);
|
||||||
fn host_get_help();
|
fn host_get_help();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue