nativeshell 0.1.16

NativeShell Rust package
Documentation
use core_foundation::base::OSStatus;

/* automatically generated by rust-bindgen 0.58.1 */

pub type EventTargetRef = *mut ::std::os::raw::c_void;
pub type EventHandlerRef = *mut ::std::os::raw::c_void;
pub type EventHandlerCallRef = *mut ::std::os::raw::c_void;
pub type EventRef = *mut ::std::os::raw::c_void;
pub type EventHandlerUPP = ::std::option::Option<
    unsafe extern "C" fn(
        inHandlerCallRef: EventHandlerCallRef,
        inEvent: EventRef,
        inUserData: *mut ::std::os::raw::c_void,
    ) -> OSStatus,
>;
pub type ItemCount = ::std::os::raw::c_ulong;
pub type OSType = u32;
#[repr(C)]
#[allow(non_snake_case)]
#[derive(Debug, Copy, Clone)]
pub struct EventTypeSpec {
    pub eventClass: OSType,
    pub eventKind: u32,
}
#[allow(non_upper_case_globals)]
pub const kEventClassKeyboard: OSType = 1801812322;
#[allow(non_upper_case_globals)]
pub const kEventHotKeyPressed: u32 = 5;
extern "C" {
    pub fn InstallEventHandler(
        inTarget: EventTargetRef,
        inHandler: EventHandlerUPP,
        inNumTypes: ItemCount,
        inList: *const EventTypeSpec,
        inUserData: *mut ::std::os::raw::c_void,
        outRef: *mut EventHandlerRef,
    ) -> OSStatus;
}
extern "C" {
    pub fn RemoveEventHandler(inHandlerRef: EventHandlerRef) -> OSStatus;
}
pub type EventParamName = OSType;
pub type EventParamType = OSType;
pub type ByteCount = ::std::os::raw::c_ulong;
#[allow(non_upper_case_globals)]
pub const kEventParamDirectObject: EventParamName = 757935405;
#[allow(non_upper_case_globals)]
pub const typeEventHotKeyID: OSType = 1751869796;
extern "C" {
    pub fn GetEventParameter(
        inEvent: EventRef,
        inName: EventParamName,
        inDesiredType: EventParamType,
        outActualType: *mut EventParamType,
        inBufferSize: ByteCount,
        outActualSize: *mut ByteCount,
        outData: *mut ::std::os::raw::c_void,
    ) -> OSStatus;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct EventHotKeyID {
    pub signature: OSType,
    pub id: u32,
}
pub type OptionBits = u32;
pub type EventHotKeyRef = *mut ::std::os::raw::c_void;
extern "C" {
    pub fn RegisterEventHotKey(
        inHotKeyCode: u32,
        inHotKeyModifiers: u32,
        inHotKeyID: EventHotKeyID,
        inTarget: EventTargetRef,
        inOptions: OptionBits,
        outRef: *mut EventHotKeyRef,
    ) -> OSStatus;
}
extern "C" {
    pub fn UnregisterEventHotKey(inHotKey: EventHotKeyRef) -> OSStatus;
}
extern "C" {
    pub fn GetEventDispatcherTarget() -> EventTargetRef;
}