1mod client;
7mod event;
8mod map;
9mod utils;
10
11pub(crate) use client::IpcEventWaitHandle;
12pub use client::{EventWaitResult, IpcClient};
13pub use event::IpcEvent;
14
15#[cfg(target_os = "macos")]
17pub use map::{
18 convert_nsevent_to_chrome_key_event, convert_nsevent_to_chrome_mouse_event,
19 convert_nsevent_to_chrome_mouse_wheel_event, convert_nsevent_to_key_event,
20 convert_nsevent_to_mouse_event, convert_nsevent_to_mouse_wheel_event,
21 convert_nspasteboard_to_drag_data,
22};
23
24#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
26pub enum BridgeError {
27 #[error("failed to load the runtime bridge library")]
29 BridgeLoadFailed,
30 #[error("invalid bridge state")]
32 InvalidState,
33 #[error("bridge returned an invalid IPC channel argument")]
35 InvalidChannelArgument,
36 #[error("failed to connect to the IPC channel")]
38 ConnectionFailed,
39 #[error("failed to authenticate bridge session")]
41 AuthenticationFailed,
42 #[error("bridge operation failed: {operation}")]
44 OperationFailed { operation: &'static str },
45 #[error("invalid input for the FFI layer")]
47 InvalidInput,
48 #[error("failed to parse IPC event")]
50 InvalidEvent,
51}