Skip to main content

rusteal_core/
input.rs

1use rusteal_ffi::UObjectHandle;
2
3use crate::error::{RustealResult, check_ffi_ctx};
4use crate::ffi_dispatch;
5
6pub fn bind_action_raw(
7    actor: UObjectHandle,
8    action: UObjectHandle,
9    trigger_event: u8,
10    function: &str,
11) -> RustealResult<()> {
12    check_ffi_ctx(
13        unsafe {
14            ffi_dispatch::input_bind_action(
15                actor,
16                action,
17                trigger_event,
18                function.as_ptr(),
19                function.len() as u32,
20            )
21        },
22        function,
23    )
24}
25
26pub fn should_display_touch_interface() -> bool {
27    unsafe { ffi_dispatch::input_should_display_touch_interface() }
28}