git.iko.soy/rowtype-yoga/purescript-tauri
on main help sign in
32 lines 2.1 kB history raw
1const host = () => {
2 const native = globalThis.__purescriptNativeHost;
3 if (!native) throw new Error("Tauri.Native requires tauri-native-host");
4 return native;
5};
7const nativeArguments = () => host().call("arguments");
8export { nativeArguments as arguments };
9export const version = () => host().call("version");
10export const isStdinTTY = () => host().call("isStdinTTY");
11export const readStdin = () => host().call("readStdin");
12export const readLineImpl = () => host().call("readLine");
13export const readText = path => () => host().call("readText", path);
14export const writeText = path => text => () => { host().call("writeText", path, text); };
15export const stdout = text => () => { host().call("stdout", text); };
16export const stderr = text => () => { host().call("stderr", text); };
17export const absolutePath = path => () => host().call("absolutePath", path);
18export const environment = name => () => host().call("environment", name);
19export const monotonicMilliseconds = () => host().call("monotonicMilliseconds");
20export const platform = () => host().call("platform");
21export const runApplicationTaskImpl = args => input => () => host().call("runApplicationTask", args, input);
22export const runApplicationImpl = args => input => () => host().call("runApplication", args, input);
23export const measureText = font => text => () => host().call("measureText", font, text);
24export const beginVideo = options => () => host().call("beginVideo", options);
25export const writeVideoFrame = video => surface => () => { host().call("writeVideoFrame", video, surface); };
26export const finishVideo = video => () => { host().call("finishVideo", video); };
27export const cancelVideo = video => () => { host().call("cancelVideo", video); };
28export const enterTerminal = () => { host().call("enterTerminal"); };
29export const restoreTerminal = () => { host().call("restoreTerminal"); };
30export const terminalSize = () => host().call("terminalSize");
31export const readKey = () => host().call("readKey");
32export const sleepMilliseconds = milliseconds => () => { host().call("sleepMilliseconds", milliseconds); };