The GDAccessibilityManager handles a working with the Accessibility api for you. More...
#import <GDAccessibilityManager.h>
Public Member Functions | |
| (Boolean) | - isAccessibilityEnabled |
| Whether or not the accessibility API is on. | |
| (Boolean) | - isAXUIElementRef:attributeSettable: |
| Returns whether or not an AXUIElementRef's attribute is settable. | |
| (Boolean) | - doesElementRef:exposeAttribute: |
| Checks whether an attribute is exposed on the AXUIElementRef. | |
| (Boolean) | - doesElementRef:actAsRole: |
| Whether or not an AXUIElementRef acts as a particular role. | |
| (Boolean) | - isCGPoint: |
| Check if a CFTypeRef is a CGPoint. | |
| (Boolean) | - isCGRect: |
| Check if a CFTypeRef is a CGRect. | |
| (Boolean) | - isCGSize: |
| Check if a CFTypeRef is a CGSize. | |
| (Boolean) | - isCFRange: |
| Check if a CFTypeRef is a CFRange. | |
| (Boolean) | - isNSString: |
| Check if a CFTypeRef is an NSString. | |
| (Boolean) | - isNSValue: |
| Check if a CFTypeRef is an NSValue. | |
| (pid_t) | - forAXUIElementRefGetPID: |
| Returns a pid_t for the given AXUIElementRef or -1. | |
| (GDAccessibilityOperationResult *) | - sysWide |
| Get the system wide accessibility object. | |
| (GDAccessibilityOperationResult *) | - focusedApplicationRef |
| Get the current focused application. | |
| (GDAccessibilityOperationResult *) | - focusedWindowForFocusedApplication |
| Get the focused window for the currently focused application. | |
| (GDAccessibilityOperationResult *) | - focusedWindowForApplication: |
| Get the focused window for an application. | |
| (GDAccessibilityOperationResult *) | - applicationRefFromPid: |
| Get an application AXUIElementRef from a process id. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRefGetRoleAttribute: |
| Gets the role attribute for an element ref. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRefGetRoleDescriptionAttribute: |
| Gets the role description for an element ref. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRefGetTitleAttribute: |
| Get the title for an element ref. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:getAttributeValue: |
| Gets the value of an attribute for an element ref. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:getAttributeValueCount: |
| Gets the attribute value count of an attribute's value for an element ref. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSValue: |
| Sets the value of an attribute for an AXUIElementRef - it does not accept NSStrings. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSPoint: |
| Set an attribute's value to an NSPoint. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSRect: |
| Set an attribute's value to an NSRect. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSRange: |
| Set an attribute's value to an NSRange. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSSize: |
| Set an attribute's value to an NSSize. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:setAttribute:toNSString: |
| Set an attribute's value to an NSString. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRefGetAttributeNames: |
| Gets attribute names for an AXUIElementRef. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRefGetActionNames: |
| Gets action names for an AXUIElementRef. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:getActionDescription: |
| Gets an action description on an AXUIElementRef. | |
| (GDAccessibilityOperationResult *) | - forAXUIElementRef:performAction: |
| Performs an action on an AXUIElementRef. | |
| (GDAccessibilityOperationResult *) | - getAPIDisabledOperationResult |
| [Internal] Shortcut to get a preconfigured api disabled operation result. | |
| (GDAccessibilityOperationResult *) | - getCannotCreateValueOperationResult |
| [internal] Shhortcut to get a preconfigured operation result for cases where an AXValueRef couldn't be created. | |
Static Public Member Functions | |
| (GDAccessibilityManager *) | + sharedInstance |
| Singleton instance. | |
The GDAccessibilityManager handles a working with the Accessibility api for you.
The Accessibility API is quite large, this manager handles most of the common operations.
| - (GDAccessibilityOperationResult *) applicationRefFromPid: | (pid_t) | pid |
Get an application AXUIElementRef from a process id.
| pid | The pid_t for the application. |
| - (Boolean) doesElementRef: | (AXUIElementRef) | element | ||
| actAsRole: | (NSString *) | role | ||
Whether or not an AXUIElementRef acts as a particular role.
| element | An AXUIElementRef. | |
| role | The accessibility role to test for. |
| - (Boolean) doesElementRef: | (AXUIElementRef) | elementRef | ||
| exposeAttribute: | (NSString *) | attribute | ||
Checks whether an attribute is exposed on the AXUIElementRef.
| elementRef | An AXUIElementRef. | |
| attribute | The accessibility attribute to test. |
| - (GDAccessibilityOperationResult *) focusedWindowForApplication: | (AXUIElementRef) | applicationRef |
Get the focused window for an application.
| applicationRef | An AXUIElementRef who's role is NSAccessibilityApplicationRole. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| getActionDescription: | (NSString *) | action | ||
Gets an action description on an AXUIElementRef.
| element | An AXUIElementRef. | |
| action | The action name for the description. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| getAttributeValue: | (NSString *) | attribute | ||
Gets the value of an attribute for an element ref.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| getAttributeValueCount: | (NSString *) | attribute | ||
Gets the attribute value count of an attribute's value for an element ref.
| element | An AXUIElementRef. | |
| attribute | The accessiblity attribute. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| performAction: | (NSString *) | action | ||
Performs an action on an AXUIElementRef.
| element | An AXUIElementRef. | |
| action | The action to perform. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSPoint: | (NSPoint) | point | ||
Set an attribute's value to an NSPoint.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. | |
| point | An NSPoint to set the attribute value to. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSRange: | (NSRange) | range | ||
Set an attribute's value to an NSRange.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. | |
| range | An NSRange to set the attribute value to. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSRect: | (NSRect) | rect | ||
Set an attribute's value to an NSRect.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. | |
| rect | An NSRect to set the attribute value to. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSSize: | (NSSize) | size | ||
Set an attribute's value to an NSSize.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. | |
| size | An NSSize to set the attribute value to. |
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSString: | (NSString *) | string | ||
| - (GDAccessibilityOperationResult *) forAXUIElementRef: | (AXUIElementRef) | element | ||
| setAttribute: | (NSString *) | attribute | ||
| toNSValue: | (NSValue *) | nsvalue | ||
Sets the value of an attribute for an AXUIElementRef - it does not accept NSStrings.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute. | |
| nsvalue | The value to set the attribute value to. |
| - (GDAccessibilityOperationResult *) forAXUIElementRefGetActionNames: | (AXUIElementRef) | element |
Gets action names for an AXUIElementRef.
| element | An AXUIElementRef. |
| - (GDAccessibilityOperationResult *) forAXUIElementRefGetAttributeNames: | (AXUIElementRef) | element |
Gets attribute names for an AXUIElementRef.
| element | An AXUIElementRef. |
| - (pid_t) forAXUIElementRefGetPID: | (AXUIElementRef) | element |
Returns a pid_t for the given AXUIElementRef or -1.
| element | An AXUIElementRef. |
| - (GDAccessibilityOperationResult *) forAXUIElementRefGetRoleAttribute: | (AXUIElementRef) | element |
Gets the role attribute for an element ref.
| element | An AXUIElementRef. |
| - (GDAccessibilityOperationResult *) forAXUIElementRefGetRoleDescriptionAttribute: | (AXUIElementRef) | element |
Gets the role description for an element ref.
| element | An AXUIElementRef. |
| - (GDAccessibilityOperationResult *) forAXUIElementRefGetTitleAttribute: | (AXUIElementRef) | element |
Get the title for an element ref.
| element | An AXUIElementRef. |
| - (Boolean) isAXUIElementRef: | (AXUIElementRef) | element | ||
| attributeSettable: | (NSString *) | attribute | ||
Returns whether or not an AXUIElementRef's attribute is settable.
| element | An AXUIElementRef. | |
| attribute | The accessibility attribute to test. |
| - (Boolean) isCFRange: | (CFTypeRef) | possibleCFRange |
Check if a CFTypeRef is a CFRange.
| possibleCFRange | An object that might be a CFRange. |
| - (Boolean) isCGPoint: | (CFTypeRef) | possibleCGPointRef |
Check if a CFTypeRef is a CGPoint.
| possibleCGPointRef | An object that might be a CGPoint. |
| - (Boolean) isCGRect: | (CFTypeRef) | possibleCGRectRef |
Check if a CFTypeRef is a CGRect.
| possibleCGRectRef | An object that might be a CGRect. |
| - (Boolean) isCGSize: | (CFTypeRef) | possibleCGSize |
Check if a CFTypeRef is a CGSize.
| possibleCGSize | An object that might be a CGSize. |
| - (Boolean) isNSString: | (CFTypeRef) | possibleString |
| - (Boolean) isNSValue: | (CFTypeRef) | possibleNSValue |
Check if a CFTypeRef is an NSValue.
| possibleNSValue | An object that might be an NSValue. |