pub struct AXUIElement(/* private fields */);Implementations§
Source§impl AXUIElement
impl AXUIElement
pub fn system_wide() -> Self
pub fn application(pid: pid_t) -> Self
pub fn application_with_bundle(bundle_id: &str) -> Result<Self, Error>
pub fn application_with_bundle_timeout( bundle_id: &str, timeout: Duration, ) -> Result<Self, Error>
pub fn pid(&self) -> Result<pid_t, Error>
pub fn attribute_names(&self) -> Result<CFArray<CFString>, Error>
pub fn parameterized_attribute_names(&self) -> Result<CFArray<CFString>, Error>
pub fn attribute<T: TCFType>( &self, attribute: &AXAttribute<T>, ) -> Result<T, Error>
pub fn set_attribute<T: TCFType>( &self, attribute: &AXAttribute<T>, value: impl Into<T>, ) -> Result<(), Error>
pub fn is_settable<T: TCFType>( &self, attribute: &AXAttribute<T>, ) -> Result<bool, Error>
pub fn parameterized_attribute<T: TCFType, U: TCFType>( &self, attribute: &AXAttribute<T>, parameter: &U, ) -> Result<T, Error>
pub fn action_names(&self) -> Result<CFArray<CFString>, Error>
pub fn perform_action(&self, name: &CFString) -> Result<(), Error>
pub fn set_messaging_timeout(&self, timeout: f32) -> Result<(), Error>
Sourcepub fn application_is_trusted() -> bool
pub fn application_is_trusted() -> bool
Checks whether or not this application is a trusted accessibility client.
Sourcepub fn application_is_trusted_with_prompt() -> bool
pub fn application_is_trusted_with_prompt() -> bool
Same as [application_is_trusted], but also shows the user a prompt asking them to allow accessibility API access if it hasn’t already been given.
Trait Implementations§
Source§impl AXUIElementActions for AXUIElement
impl AXUIElementActions for AXUIElement
fn press(&self) -> Result<(), Error>
fn increment(&self) -> Result<(), Error>
fn decrement(&self) -> Result<(), Error>
fn confirm(&self) -> Result<(), Error>
fn show_alternate_ui(&self) -> Result<(), Error>
fn show_default_ui(&self) -> Result<(), Error>
fn raise(&self) -> Result<(), Error>
fn pick(&self) -> Result<(), Error>
Source§impl AXUIElementAttributes for AXUIElement
impl AXUIElementAttributes for AXUIElement
fn allowed_values(&self) -> Result<CFArray<CFType>, Error>
fn children(&self) -> Result<CFArray<AXUIElement>, Error>
fn contents(&self) -> Result<AXUIElement, Error>
fn description(&self) -> Result<CFString, Error>
fn document(&self) -> Result<CFString, Error>
fn element_busy(&self) -> Result<CFBoolean, Error>
fn enabled(&self) -> Result<CFBoolean, Error>
fn focused_application(&self) -> Result<AXUIElement, Error>
fn focused_uielement(&self) -> Result<AXUIElement, Error>
fn focused(&self) -> Result<CFBoolean, Error>
fn focused_window(&self) -> Result<AXUIElement, Error>
fn frontmost(&self) -> Result<CFBoolean, Error>
fn set_frontmost(&self, value: impl Into<CFBoolean>) -> Result<(), Error>
fn frame(&self) -> Result<AXValue, Error>
fn help(&self) -> Result<CFString, Error>
fn identifier(&self) -> Result<CFString, Error>
fn label_value(&self) -> Result<CFString, Error>
fn main(&self) -> Result<CFBoolean, Error>
fn set_main(&self, value: impl Into<CFBoolean>) -> Result<(), Error>
fn main_window(&self) -> Result<AXUIElement, Error>
fn max_value(&self) -> Result<CFType, Error>
fn min_value(&self) -> Result<CFType, Error>
fn minimized(&self) -> Result<CFBoolean, Error>
fn number_of_characters(&self) -> Result<CFNumber, Error>
fn parent(&self) -> Result<AXUIElement, Error>
fn placeholder_value(&self) -> Result<CFString, Error>
fn position(&self) -> Result<AXValue, Error>
fn role(&self) -> Result<CFString, Error>
fn role_description(&self) -> Result<CFString, Error>
fn selected_children(&self) -> Result<CFArray<AXUIElement>, Error>
fn subrole(&self) -> Result<CFString, Error>
fn size(&self) -> Result<AXValue, Error>
fn selected_text(&self) -> Result<CFString, Error>
fn selected_text_range(&self) -> Result<AXValue, Error>
fn title(&self) -> Result<CFString, Error>
fn top_level_ui_element(&self) -> Result<AXUIElement, Error>
fn value(&self) -> Result<CFType, Error>
fn set_value(&self, value: impl Into<CFType>) -> Result<(), Error>
fn value_description(&self) -> Result<CFString, Error>
fn value_increment(&self) -> Result<CFType, Error>
fn visible_children(&self) -> Result<CFArray<AXUIElement>, Error>
fn window(&self) -> Result<AXUIElement, Error>
fn windows(&self) -> Result<CFArray<AXUIElement>, Error>
fn visible_character_range(&self) -> Result<AXValue, Error>
fn bounds_for_range(&self) -> Result<AXValue, Error>
fn line_for_index(&self) -> Result<CFNumber, Error>
fn range_for_line(&self) -> Result<AXValue, Error>
fn range_for_position(&self) -> Result<AXValue, Error>
fn next_line_range_for_index(&self) -> Result<AXValue, Error>
fn previous_line_range_for_index(&self) -> Result<AXValue, Error>
fn attributed_string_for_range(&self) -> Result<CFAttributedString, Error>
Source§impl Clone for AXUIElement
impl Clone for AXUIElement
Source§fn clone(&self) -> AXUIElement
fn clone(&self) -> AXUIElement
Returns a duplicate 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 moreSource§impl Debug for AXUIElement
impl Debug for AXUIElement
Source§impl Drop for AXUIElement
impl Drop for AXUIElement
Source§impl Hash for AXUIElement
impl Hash for AXUIElement
Source§impl PartialEq for AXUIElement
impl PartialEq for AXUIElement
Source§impl TCFType for AXUIElement
impl TCFType for AXUIElement
Source§type Ref = *mut __AXUIElement
type Ref = *mut __AXUIElement
The reference type wrapped inside this type.
Source§fn as_concrete_TypeRef(&self) -> AXUIElementRef
fn as_concrete_TypeRef(&self) -> AXUIElementRef
Returns the object as its concrete
TypeRef.Source§unsafe fn wrap_under_get_rule(reference: AXUIElementRef) -> Self
unsafe fn wrap_under_get_rule(reference: AXUIElementRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.Source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef. The reference count is not adjusted.Source§unsafe fn wrap_under_create_rule(reference: AXUIElementRef) -> Self
unsafe fn wrap_under_create_rule(reference: AXUIElementRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.Source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType. The reference count is incremented by one.Source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
Returns the object as a wrapped
CFType. Consumes self and avoids changing the reference
count.Source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
Source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
Returns
true if this value is an instance of another type.Source§impl<'a> ToVoid<AXUIElement> for &'a AXUIElement
impl<'a> ToVoid<AXUIElement> for &'a AXUIElement
Source§impl ToVoid<AXUIElement> for AXUIElementRef
impl ToVoid<AXUIElement> for AXUIElementRef
Source§impl ToVoid<AXUIElement> for AXUIElement
impl ToVoid<AXUIElement> for AXUIElement
impl ConcreteCFType for AXUIElement
impl Eq for AXUIElement
impl Send for AXUIElement
impl Sync for AXUIElement
Auto Trait Implementations§
impl Freeze for AXUIElement
impl RefUnwindSafe for AXUIElement
impl Unpin for AXUIElement
impl UnwindSafe for AXUIElement
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