espanso/src/bridge/macos.rs

19 lines
660 B
Rust
Raw Normal View History

2019-09-09 13:15:01 +00:00
use std::os::raw::{c_void, c_char};
#[allow(improper_ctypes)]
#[link(name="macbridge", kind="static")]
extern {
2019-09-09 13:46:57 +00:00
// System
pub fn get_active_app_bundle(buffer: *mut c_char, size: i32) -> i32;
pub fn get_active_app_identifier(buffer: *mut c_char, size: i32) -> i32;
// Keyboard
2019-09-09 13:15:01 +00:00
pub fn register_keypress_callback(s: *const c_void,
cb: extern fn(_self: *mut c_void, *const u8,
i32, i32, i32));
pub fn initialize();
pub fn eventloop();
pub fn send_string(string: *const c_char);
pub fn send_vkey(vk: i32);
pub fn delete_string(count: i32);
}