aumate/
lib.rs

1//! Aumate - Cross-platform desktop automation library
2//!
3//! This library provides core functionality for desktop automation:
4//! - Mouse and keyboard input control
5//! - Screen capture and pixel operations
6//! - Clipboard text and image operations
7//! - Window management
8//! - Screenshot with interactive UI
9//! - Floating window system with particle effects
10//!
11//! # Features
12//!
13//! - `input` - Mouse and keyboard control (enabled by default)
14//! - `screen` - Screen capture operations (enabled by default)
15//! - `clipboard` - Clipboard operations (enabled by default)
16//! - `window` - Window management (enabled by default)
17//! - `gui` - Full GUI support including screenshot UI and floating windows (enabled by default)
18//!
19//! # Example
20//!
21//! ```no_run
22//! use aumate::prelude::*;
23//!
24//! // Mouse operations
25//! let mouse = Mouse::new().unwrap();
26//! mouse.move_mouse(100, 100).unwrap();
27//!
28//! // Keyboard operations
29//! let keyboard = Keyboard::new().unwrap();
30//! keyboard.type_string("Hello, World!").unwrap();
31//! ```
32
33pub mod error;
34
35#[cfg(feature = "input")]
36pub mod input;
37
38#[cfg(feature = "screen")]
39pub mod screen;
40
41#[cfg(feature = "clipboard")]
42pub mod clipboard;
43
44#[cfg(feature = "window")]
45pub mod window;
46
47#[cfg(feature = "gui")]
48pub mod screenshot;
49
50#[cfg(feature = "gui")]
51pub mod gui;
52
53#[cfg(feature = "gui")]
54pub mod clipboard_manager;
55
56#[cfg(feature = "eventhooks")]
57pub mod eventhooks;
58
59#[cfg(feature = "ml")]
60pub mod ml;
61
62#[cfg(feature = "stt")]
63pub mod stt;
64
65#[cfg(feature = "ocr")]
66pub mod ocr;
67
68#[cfg(feature = "image_match")]
69pub mod image_match;
70
71#[cfg(all(feature = "click_helper", target_os = "macos"))]
72pub mod click_helper;
73
74/// Prelude module for convenient imports
75pub mod prelude {
76    pub use crate::error::{AumateError, Result};
77
78    #[cfg(feature = "input")]
79    pub use crate::input::{Keyboard, Mouse, MouseButton, MousePosition};
80
81    #[cfg(feature = "screen")]
82    pub use crate::screen::{
83        MonitorInfo, PixelColor, ScreenCapture, ScreenSize, capture_screen, capture_screen_region,
84        get_monitors, get_pixel_color, get_screen_size,
85    };
86
87    #[cfg(feature = "clipboard")]
88    pub use crate::clipboard;
89
90    #[cfg(feature = "window")]
91    pub use crate::window::{
92        WindowInfo, find_windows_by_process, find_windows_by_title, get_active_window_info,
93        get_all_windows,
94    };
95
96    #[cfg(feature = "gui")]
97    pub use crate::gui::prelude::*;
98
99    #[cfg(feature = "gui")]
100    pub use crate::screenshot::{ScreenRegion, ScreenshotResult};
101}