1#![deny(unsafe_code)]
20
21pub mod adapters;
22mod attempt;
23pub mod audit;
24pub mod backend;
25pub mod browser;
26pub mod cache;
27mod doctor;
28pub mod element;
29pub mod error;
30mod foreground;
31mod image_util;
32mod input_session;
33pub mod isolation;
34pub mod keys;
35pub mod menu_path;
36pub mod overlay;
37pub mod policy;
38pub mod protocol;
39pub mod scroll;
40pub mod shortcuts;
41pub mod state;
42pub mod target;
43mod tier;
44pub mod tree;
45pub mod types;
46pub mod vision;
47pub mod window_groups;
48
49#[cfg(test)]
50pub(crate) mod test_backend;
51
52pub use backend::{create_desktop_backend, Backend, DesktopBackend};
53pub use error::{ComputerError, ErrorBody};
54pub use image_util::{
55 encode_image, image_to_screen, screen_to_image, EncodedImage, MapFormulas, MapPoint,
56 ScreenshotMap,
57};
58pub use input_session::InputSession;
59pub use keys::{parse_key_combo, parse_key_sequence, KeyCombo};
60pub use protocol::{
61 dispatch, dispatch_context, dispatch_with, handle_request_line, handle_request_line_with,
62 parse_request, Action, CallContext, Request, Response,
63};
64pub use types::{
65 parse_path, parse_region, DisplayInfo, Frame, FrontmostInfo, ImageFormat, Modifier,
66 MouseButton, Point, Region, ScrollDirection,
67};
68
69pub fn shutdown_sessions() {
75 backend::shutdown_sessions();
76}
77
78#[cfg(target_os = "linux")]
79pub use backend::LinuxDesktopBackend;
80#[cfg(target_os = "macos")]
81pub use backend::MacOsDesktopBackend;
82#[cfg(target_os = "windows")]
83pub use backend::WindowsDesktopBackend;