Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 68 lines (52 sloc) 2.264 kb
dc5be1c Initial check-in.
uli authored
1 //
2 // UKUIElement.h
3 // TalkingMoose
4 //
5 // Created by Uli Kusterer on 03.07.05.
720b0e7 @uliwitness Added licensing information to the source files.
authored
6 // Copyright 2005 Uli Kusterer.
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would be
19 // appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not be
22 // misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
dc5be1c Initial check-in.
uli authored
26 //
27
28 #import <Cocoa/Cocoa.h>
29
30
31 @interface UKUIElement : NSObject
32 {
33 AXUIElementRef theUIElement;
34 }
35
36 +(BOOL) makeSureAccessibilityIsEnabled;
37 +(BOOL) isAccessibilityEnabled;
38
39 +(UKUIElement*) systemWideUIElement; // The "system wide" UI Element.
40 +(UKUIElement*) uiElementForApplicationWithPID: (pid_t)thepid; // UI Element for another app.
41 +(UKUIElement*) applicationUIElement; // UI Element for current app.
42
43 -(id) initWithUIElementRef: (AXUIElementRef)ref;
44
45 -(NSArray*) allKeys; // List of all attribute names.
46 -(id) objectForKey: (NSString*)keyStr; // Get an attribute's value.
47 -(NSArray*) arrayForKey: (NSString*)keyStr;
48 -(void) setObject: (id)val forKey: (NSString*)keyStr; // CHange an attribute's value.
49
50 -(pid_t) owningAppPID;
51
52 -(AXUIElementRef) uiElementRef;
53
54 @end
55
56
57 @interface UKUINotificationCenter : NSObject
58 {
59 AXObserverRef theObserver;
60 }
61
62 -(id) initWithPID: (pid_t)thepid;
63
64 -(void) addObserver: (id)object selector: (SEL)sel name: (NSString*)nm object: (UKUIElement*)ele;
65 -(void) removeObserver: (id)object;
66
67
68 @end
Something went wrong with that request. Please try again.