accessible/src/mac/mozAccessibleProtocol.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:23dc201d5ef6
1 /* -*- Mode: Objective-C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #import <Cocoa/Cocoa.h>
7
8 #import "mozView.h"
9
10 /* This protocol's primary use is so widget/cocoa can talk back to us
11 properly.
12
13 ChildView owns the topmost mozRootAccessible, and needs to take care of setting up
14 that parent/child relationship.
15
16 This protocol is thus used to make sure it knows it's talking to us, and not
17 just some random |id|.
18 */
19
20 @protocol mozAccessible
21
22 // returns whether this accessible is the root accessible. there is one
23 // root accessible per window.
24 - (BOOL)isRoot;
25
26 // some mozAccessibles implement accessibility support in place of another object. for example,
27 // ChildView gets its support from us.
28 //
29 // instead of returning a mozAccessible to the OS when it wants an object, we need to pass the view we represent, so the
30 // OS doesn't get confused and think we return some random object.
31 - (BOOL)hasRepresentedView;
32 - (id)representedView;
33
34 #ifdef DEBUG
35 // debug utility that will print the native accessibility tree, starting
36 // at this node.
37 - (void)printHierarchy;
38 #endif
39
40 /*** general ***/
41
42 // returns the accessible at the specified point.
43 - (id)accessibilityHitTest:(NSPoint)point;
44
45 // whether this element is flagged as ignored.
46 - (BOOL)accessibilityIsIgnored;
47
48 // currently focused UI element (possibly a child accessible)
49 - (id)accessibilityFocusedUIElement;
50
51 /*** attributes ***/
52
53 // all supported attributes
54 - (NSArray*)accessibilityAttributeNames;
55
56 // value for given attribute.
57 - (id)accessibilityAttributeValue:(NSString*)attribute;
58
59 // whether a particular attribute can be modified
60 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
61
62 /*** actions ***/
63
64 - (NSArray*)accessibilityActionNames;
65 - (NSString*)accessibilityActionDescription:(NSString*)action;
66 - (void)accessibilityPerformAction:(NSString*)action;
67
68 @end
69

mercurial