GDAccessibilityManager Class Reference

The GDAccessibilityManager handles a working with the Accessibility api for you. More...

#import <GDAccessibilityManager.h>

List of all members.

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.

Detailed Description

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.

See also:
See GDAccessibilityManager.h for typdefs.
http://developer.apple.com/mac/library/documentation/Accessibility/Reference/AccessibilityLowlevel/index.html
http://developer.apple.com/mac/library/documentation/Accessibility/Reference/AccessibilityLowlevel/accessibility-functions.html
http://developer.apple.com/mac/library/documentation/Accessibility/Reference/AccessibilityCarbonRef/Reference/reference.html
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSAccessibility_Protocol/Reference/Reference.html
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Accessibility/cocoaAXIntro/cocoaAXintro.html
http://developer.apple.com/mac/library/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXIntro/OSXAXintro.html

Member Function Documentation

- (GDAccessibilityOperationResult *) applicationRefFromPid: (pid_t)  pid  

Get an application AXUIElementRef from a process id.

Parameters:
pid The pid_t for the application.
- (Boolean) doesElementRef: (AXUIElementRef)  element
actAsRole: (NSString *)  role 

Whether or not an AXUIElementRef acts as a particular role.

Parameters:
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.

Parameters:
elementRef An AXUIElementRef.
attribute The accessibility attribute to test.
- (GDAccessibilityOperationResult *) focusedWindowForApplication: (AXUIElementRef)  applicationRef  

Get the focused window for an application.

Parameters:
applicationRef An AXUIElementRef who's role is NSAccessibilityApplicationRole.
- (GDAccessibilityOperationResult *) forAXUIElementRef: (AXUIElementRef)  element
getActionDescription: (NSString *)  action 

Gets an action description on an AXUIElementRef.

Parameters:
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.

Parameters:
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.

Parameters:
element An AXUIElementRef.
attribute The accessiblity attribute.
- (GDAccessibilityOperationResult *) forAXUIElementRef: (AXUIElementRef)  element
performAction: (NSString *)  action 

Performs an action on an AXUIElementRef.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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 

Set an attribute's value to an NSString.

Parameters:
element An AXUIElementRef.
attribute The accessibility attribute.
string An NSString to set the attribute value to.
- (GDAccessibilityOperationResult *) forAXUIElementRef: (AXUIElementRef)  element
setAttribute: (NSString *)  attribute
toNSValue: (NSValue *)  nsvalue 

Sets the value of an attribute for an AXUIElementRef - it does not accept NSStrings.

Parameters:
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.

Parameters:
element An AXUIElementRef.
- (GDAccessibilityOperationResult *) forAXUIElementRefGetAttributeNames: (AXUIElementRef)  element  

Gets attribute names for an AXUIElementRef.

Parameters:
element An AXUIElementRef.
- (pid_t) forAXUIElementRefGetPID: (AXUIElementRef)  element  

Returns a pid_t for the given AXUIElementRef or -1.

Parameters:
element An AXUIElementRef.
- (GDAccessibilityOperationResult *) forAXUIElementRefGetRoleAttribute: (AXUIElementRef)  element  

Gets the role attribute for an element ref.

Parameters:
element An AXUIElementRef.
- (GDAccessibilityOperationResult *) forAXUIElementRefGetRoleDescriptionAttribute: (AXUIElementRef)  element  

Gets the role description for an element ref.

Parameters:
element An AXUIElementRef.
- (GDAccessibilityOperationResult *) forAXUIElementRefGetTitleAttribute: (AXUIElementRef)  element  

Get the title for an element ref.

Parameters:
element An AXUIElementRef.
- (Boolean) isAXUIElementRef: (AXUIElementRef)  element
attributeSettable: (NSString *)  attribute 

Returns whether or not an AXUIElementRef's attribute is settable.

Parameters:
element An AXUIElementRef.
attribute The accessibility attribute to test.
- (Boolean) isCFRange: (CFTypeRef)  possibleCFRange  

Check if a CFTypeRef is a CFRange.

Parameters:
possibleCFRange An object that might be a CFRange.
- (Boolean) isCGPoint: (CFTypeRef)  possibleCGPointRef  

Check if a CFTypeRef is a CGPoint.

Parameters:
possibleCGPointRef An object that might be a CGPoint.
- (Boolean) isCGRect: (CFTypeRef)  possibleCGRectRef  

Check if a CFTypeRef is a CGRect.

Parameters:
possibleCGRectRef An object that might be a CGRect.
- (Boolean) isCGSize: (CFTypeRef)  possibleCGSize  

Check if a CFTypeRef is a CGSize.

Parameters:
possibleCGSize An object that might be a CGSize.
- (Boolean) isNSString: (CFTypeRef)  possibleString  

Check if a CFTypeRef is an NSString.

Parameters:
possibleString An object that might be an NSString.
- (Boolean) isNSValue: (CFTypeRef)  possibleNSValue  

Check if a CFTypeRef is an NSValue.

Parameters:
possibleNSValue An object that might be an NSValue.

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines