Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
[gecko.git] / accessible / mac / mozAccessibleProtocol.h
blobbc418fa4f5d48f4b4664978def9a6bc2cba954ba
1 /* clang-format off */
2 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* clang-format on */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #import <Cocoa/Cocoa.h>
10 #import "mozView.h"
12 /* This protocol's primary use is so widget/cocoa can talk back to us
13 properly.
15 ChildView owns the topmost mozRootAccessible, and needs to take care of
16 setting up that parent/child relationship.
18 This protocol is thus used to make sure it knows it's talking to us, and not
19 just some random |id|.
22 @protocol mozAccessible <NSObject>
24 // returns whether this accessible is the root accessible. there is one
25 // root accessible per window.
26 - (BOOL)isRoot;
28 // some mozAccessibles implement accessibility support in place of another
29 // object. for example, ChildView gets its support from us.
31 // instead of returning a mozAccessible to the OS when it wants an object, we
32 // need to pass the view we represent, so the OS doesn't get confused and think
33 // we return some random object.
34 - (BOOL)hasRepresentedView;
35 - (id)representedView;
37 /*** general ***/
39 // returns the accessible at the specified point.
40 - (id)accessibilityHitTest:(NSPoint)point;
42 // whether this element should be exposed to platform.
43 - (BOOL)isAccessibilityElement;
45 // currently focused UI element (possibly a child accessible)
46 - (id)accessibilityFocusedUIElement;
48 /*** attributes ***/
50 // all supported attributes
51 - (NSArray*)accessibilityAttributeNames;
53 // value for given attribute.
54 - (id)accessibilityAttributeValue:(NSString*)attribute;
56 // whether a particular attribute can be modified
57 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
59 /*** actions ***/
61 - (NSArray*)accessibilityActionNames;
62 - (NSString*)accessibilityActionDescription:(NSString*)action;
63 - (void)accessibilityPerformAction:(NSString*)action;
65 @end