pub struct UIAutomation { /* private fields */ }
Expand description
The top-level access to the UI.
let automation = UIAutomation::new();
for app in automation.applications() {
println!("Window \"{}\"", app.name());
}
Implementations§
Source§impl UIAutomation
impl UIAutomation
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
More examples
examples/vscode_click_on_search.rs (line 7)
6fn main() {
7 let ui = UIAutomation::new();
8
9 for app in ui.applications() {
10 println!("App {} {:?}", app.name(), app.owner().pid());
11 if app.name() == "Code" {
12 for window in app.windows() {
13 print_element(window, 0);
14 }
15 }
16 }
17}
pub fn backend_name(&self) -> &str
Sourcepub fn mouse_position(&self) -> Position
pub fn mouse_position(&self) -> Position
Sourcepub fn set_cursor_position(&self, position: impl Into<Position>)
pub fn set_cursor_position(&self, position: impl Into<Position>)
Sourcepub fn applications(&self) -> Vec<Application>
pub fn applications(&self) -> Vec<Application>
Examples found in repository?
More examples
examples/vscode_click_on_search.rs (line 9)
6fn main() {
7 let ui = UIAutomation::new();
8
9 for app in ui.applications() {
10 println!("App {} {:?}", app.name(), app.owner().pid());
11 if app.name() == "Code" {
12 for window in app.windows() {
13 print_element(window, 0);
14 }
15 }
16 }
17}
pub fn try_new() -> UIResult<Self>
pub fn try_mouse_position(&self) -> UIResult<Position>
pub fn try_set_cursor_position( &self, position: impl Into<Position>, ) -> UIResult<()>
pub fn try_applications(&self) -> UIResult<Vec<Application>>
Trait Implementations§
Source§impl Clone for UIAutomation
impl Clone for UIAutomation
Source§fn clone(&self) -> UIAutomation
fn clone(&self) -> UIAutomation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UIAutomation
impl !RefUnwindSafe for UIAutomation
impl !Send for UIAutomation
impl !Sync for UIAutomation
impl Unpin for UIAutomation
impl !UnwindSafe for UIAutomation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more