AXUIElement

Struct AXUIElement 

Source
pub struct AXUIElement(/* private fields */);

Implementations§

Source§

impl AXUIElement

Source

pub fn system_wide() -> Self

Source

pub fn application(pid: pid_t) -> Self

Source

pub fn application_with_bundle(bundle_id: &str) -> Result<Self, Error>

Source

pub fn application_with_bundle_timeout( bundle_id: &str, timeout: Duration, ) -> Result<Self, Error>

Source

pub fn pid(&self) -> Result<pid_t, Error>

Source

pub fn attribute_names(&self) -> Result<CFArray<CFString>, Error>

Source

pub fn parameterized_attribute_names(&self) -> Result<CFArray<CFString>, Error>

Source

pub fn attribute<T: TCFType>( &self, attribute: &AXAttribute<T>, ) -> Result<T, Error>

Source

pub fn set_attribute<T: TCFType>( &self, attribute: &AXAttribute<T>, value: impl Into<T>, ) -> Result<(), Error>

Source

pub fn is_settable<T: TCFType>( &self, attribute: &AXAttribute<T>, ) -> Result<bool, Error>

Source

pub fn parameterized_attribute<T: TCFType, U: TCFType>( &self, attribute: &AXAttribute<T>, parameter: &U, ) -> Result<T, Error>

Source

pub fn action_names(&self) -> Result<CFArray<CFString>, Error>

Source

pub fn perform_action(&self, name: &CFString) -> Result<(), Error>

Source

pub fn set_messaging_timeout(&self, timeout: f32) -> Result<(), Error>

Source

pub fn application_is_trusted() -> bool

Checks whether or not this application is a trusted accessibility client.

Source

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

Source§

impl AXUIElementAttributes for AXUIElement

Source§

fn allowed_values(&self) -> Result<CFArray<CFType>, Error>

Source§

fn children(&self) -> Result<CFArray<AXUIElement>, Error>

Source§

fn contents(&self) -> Result<AXUIElement, Error>

Source§

fn description(&self) -> Result<CFString, Error>

Source§

fn document(&self) -> Result<CFString, Error>

Source§

fn element_busy(&self) -> Result<CFBoolean, Error>

Source§

fn enabled(&self) -> Result<CFBoolean, Error>

Source§

fn focused_application(&self) -> Result<AXUIElement, Error>

Source§

fn focused_uielement(&self) -> Result<AXUIElement, Error>

Source§

fn focused(&self) -> Result<CFBoolean, Error>

Source§

fn focused_window(&self) -> Result<AXUIElement, Error>

Source§

fn frontmost(&self) -> Result<CFBoolean, Error>

Source§

fn set_frontmost(&self, value: impl Into<CFBoolean>) -> Result<(), Error>

Source§

fn frame(&self) -> Result<AXValue, Error>

Source§

fn help(&self) -> Result<CFString, Error>

Source§

fn identifier(&self) -> Result<CFString, Error>

Source§

fn label_value(&self) -> Result<CFString, Error>

Source§

fn main(&self) -> Result<CFBoolean, Error>

Source§

fn set_main(&self, value: impl Into<CFBoolean>) -> Result<(), Error>

Source§

fn main_window(&self) -> Result<AXUIElement, Error>

Source§

fn max_value(&self) -> Result<CFType, Error>

Source§

fn menu_item_cmd_modifier(&self) -> Result<CFNumber, Error>

Source§

fn menu_item_cmd_char(&self) -> Result<CFString, Error>

Source§

fn menu_item_cmd_virtual_key(&self) -> Result<CFString, Error>

Source§

fn menu_item_mark_char(&self) -> Result<CFString, Error>

Source§

fn menu_item_cmd_glyph(&self) -> Result<CFString, Error>

Source§

fn min_value(&self) -> Result<CFType, Error>

Source§

fn minimized(&self) -> Result<CFBoolean, Error>

Source§

fn number_of_characters(&self) -> Result<CFNumber, Error>

Source§

fn parent(&self) -> Result<AXUIElement, Error>

Source§

fn placeholder_value(&self) -> Result<CFString, Error>

Source§

fn position(&self) -> Result<AXValue, Error>

Source§

fn role(&self) -> Result<CFString, Error>

Source§

fn role_description(&self) -> Result<CFString, Error>

Source§

fn selected_children(&self) -> Result<CFArray<AXUIElement>, Error>

Source§

fn subrole(&self) -> Result<CFString, Error>

Source§

fn size(&self) -> Result<AXValue, Error>

Source§

fn selected_text(&self) -> Result<CFString, Error>

Source§

fn selected_text_range(&self) -> Result<AXValue, Error>

Source§

fn title(&self) -> Result<CFString, Error>

Source§

fn top_level_ui_element(&self) -> Result<AXUIElement, Error>

Source§

fn value(&self) -> Result<CFType, Error>

Source§

fn set_value(&self, value: impl Into<CFType>) -> Result<(), Error>

Source§

fn value_description(&self) -> Result<CFString, Error>

Source§

fn value_increment(&self) -> Result<CFType, Error>

Source§

fn visible_children(&self) -> Result<CFArray<AXUIElement>, Error>

Source§

fn window(&self) -> Result<AXUIElement, Error>

Source§

fn windows(&self) -> Result<CFArray<AXUIElement>, Error>

Source§

fn visible_character_range(&self) -> Result<AXValue, Error>

Source§

fn bounds_for_range(&self) -> Result<AXValue, Error>

Source§

fn line_for_index(&self) -> Result<CFNumber, Error>

Source§

fn range_for_line(&self) -> Result<AXValue, Error>

Source§

fn range_for_position(&self) -> Result<AXValue, Error>

Source§

fn next_line_range_for_index(&self) -> Result<AXValue, Error>

Source§

fn previous_line_range_for_index(&self) -> Result<AXValue, Error>

Source§

fn attributed_string_for_range(&self) -> Result<CFAttributedString, Error>

Source§

impl Clone for AXUIElement

Source§

fn clone(&self) -> AXUIElement

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AXUIElement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for AXUIElement

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Hash for AXUIElement

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AXUIElement

Source§

fn eq(&self, other: &AXUIElement) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TCFType for AXUIElement

Source§

type Ref = *mut __AXUIElement

The reference type wrapped inside this type.
Source§

fn as_concrete_TypeRef(&self) -> AXUIElementRef

Returns the object as its concrete TypeRef.
Source§

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

Returns the object as a raw CFTypeRef. The reference count is not adjusted.
Source§

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 type_id() -> CFTypeID

Returns the type ID for this class.
Source§

fn as_CFType(&self) -> CFType

Returns the object as a wrapped CFType. The reference count is incremented by one.
Source§

fn into_CFType(self) -> CFType
where Self: Sized,

Returns the object as a wrapped CFType. Consumes self and avoids changing the reference count.
Source§

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 type_of(&self) -> usize

Returns the type ID of this object.
Source§

fn show(&self)

Writes a debugging version of this object on standard error.
Source§

fn instance_of<OtherCFType>(&self) -> bool
where OtherCFType: TCFType,

Returns true if this value is an instance of another type.
Source§

impl<'a> ToVoid<AXUIElement> for &'a AXUIElement

Source§

impl ToVoid<AXUIElement> for AXUIElementRef

Source§

impl ToVoid<AXUIElement> for AXUIElement

Source§

impl ConcreteCFType for AXUIElement

Source§

impl Eq for AXUIElement

Source§

impl Send for AXUIElement

Source§

impl Sync for AXUIElement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromMutVoid for T
where T: TCFType,

Source§

unsafe fn from_mut_void<'a>(x: *mut c_void) -> ItemMutRef<'a, T>

Source§

impl<T> FromVoid for T
where T: TCFType,

Source§

unsafe fn from_void<'a>(x: *const c_void) -> ItemRef<'a, T>

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.