-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
lib.rs
30 lines (26 loc) · 1.04 KB
/
lib.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use ctor::*;
#[cfg_attr(target_arch = "x86", link(name = "cleo_redux"))]
#[cfg_attr(target_arch = "x86_64", link(name = "cleo_redux64"))]
extern crate cleo_redux_sdk;
mod r#impl;
#[ctor]
fn init() {
use cleo_redux_sdk::{
log, on_after_scripts, on_before_scripts, on_runtime_init, register_command,
};
use r#impl::*;
log("Input plugin 1.3");
register_command("IS_KEY_PRESSED", is_key_pressed, None);
register_command("IS_KEY_DOWN", is_key_down, None);
register_command("IS_KEY_UP", is_key_up, None);
register_command("GET_LAST_KEY", get_last_key, None);
register_command("TEST_CHEAT", test_cheat, None);
register_command("HOLD_KEY", hold_key, None);
register_command("RELEASE_KEY", release_key, None);
register_command("SET_CURSOR_POS", set_cursor_pos, None);
register_command("GET_CURSOR_POS", get_cursor_pos, None);
// update state on host events
on_before_scripts(on_before_scripts_callback);
on_after_scripts(on_after_scripts_callback);
on_runtime_init(on_runtime_init_callback);
}