pub struct AXObserver(/* private fields */);Implementations§
Source§impl AXObserver
impl AXObserver
pub fn new(pid: pid_t, callback: AXObserverCallback) -> Result<Self, Error>
pub fn new_with_info( pid: pid_t, callback: AXObserverCallbackWithInfo, ) -> Result<Self, Error>
pub fn new_from_bundle( bundle_id: &str, callback: AXObserverCallback, ) -> Result<Self, Error>
pub fn new_from_bundle_with_info( bundle_id: &str, callback: AXObserverCallbackWithInfo, ) -> Result<Self, Error>
pub fn add_notification<T>( &mut self, notification: &str, ui_element: &AXUIElement, ctx: T, ) -> Result<(), Error>
pub fn remove_notification( &mut self, notification: &str, ui_element: &AXUIElement, ) -> Result<(), Error>
pub fn start(&self)
pub fn stop(&self)
Trait Implementations§
Source§impl Clone for AXObserver
impl Clone for AXObserver
Source§fn clone(&self) -> AXObserver
fn clone(&self) -> AXObserver
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 AXObserver
impl Debug for AXObserver
Source§impl Drop for AXObserver
impl Drop for AXObserver
Source§impl PartialEq for AXObserver
impl PartialEq for AXObserver
Source§impl TCFType for AXObserver
impl TCFType for AXObserver
Source§type Ref = *mut __AXObserver
type Ref = *mut __AXObserver
The reference type wrapped inside this type.
Source§fn as_concrete_TypeRef(&self) -> AXObserverRef
fn as_concrete_TypeRef(&self) -> AXObserverRef
Returns the object as its concrete
TypeRef.Source§unsafe fn wrap_under_get_rule(reference: AXObserverRef) -> Self
unsafe fn wrap_under_get_rule(reference: AXObserverRef) -> 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: AXObserverRef) -> Self
unsafe fn wrap_under_create_rule(reference: AXObserverRef) -> 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<AXObserver> for &'a AXObserver
impl<'a> ToVoid<AXObserver> for &'a AXObserver
Source§impl ToVoid<AXObserver> for AXObserverRef
impl ToVoid<AXObserver> for AXObserverRef
Source§impl ToVoid<AXObserver> for AXObserver
impl ToVoid<AXObserver> for AXObserver
impl ConcreteCFType for AXObserver
impl Eq for AXObserver
impl Send for AXObserver
Auto Trait Implementations§
impl Freeze for AXObserver
impl RefUnwindSafe for AXObserver
impl !Sync for AXObserver
impl Unpin for AXObserver
impl UnwindSafe for AXObserver
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