mod client;
mod event;
mod map;
mod utils;
pub(crate) use client::IpcEventWaitHandle;
pub use client::{EventWaitResult, IpcClient};
pub use event::IpcEvent;
#[cfg(target_os = "macos")]
pub use map::{
convert_nsevent_to_chrome_key_event, convert_nsevent_to_chrome_mouse_event,
convert_nsevent_to_chrome_mouse_wheel_event, convert_nsevent_to_key_event,
convert_nsevent_to_mouse_event, convert_nsevent_to_mouse_wheel_event,
convert_nspasteboard_to_drag_data,
};
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum BridgeError {
#[error("failed to load the runtime bridge library")]
BridgeLoadFailed,
#[error("invalid bridge state")]
InvalidState,
#[error("bridge returned an invalid IPC channel argument")]
InvalidChannelArgument,
#[error("failed to connect to the IPC channel")]
ConnectionFailed,
#[error("failed to authenticate bridge session")]
AuthenticationFailed,
#[error("bridge operation failed: {operation}")]
OperationFailed { operation: &'static str },
#[error("invalid input for the FFI layer")]
InvalidInput,
#[error("failed to parse IPC event")]
InvalidEvent,
}