michael@0: /* -*- Mode: Objective-C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #import michael@0: michael@0: #import "mozView.h" michael@0: michael@0: /* This protocol's primary use is so widget/cocoa can talk back to us michael@0: properly. michael@0: michael@0: ChildView owns the topmost mozRootAccessible, and needs to take care of setting up michael@0: that parent/child relationship. michael@0: michael@0: This protocol is thus used to make sure it knows it's talking to us, and not michael@0: just some random |id|. michael@0: */ michael@0: michael@0: @protocol mozAccessible michael@0: michael@0: // returns whether this accessible is the root accessible. there is one michael@0: // root accessible per window. michael@0: - (BOOL)isRoot; michael@0: michael@0: // some mozAccessibles implement accessibility support in place of another object. for example, michael@0: // ChildView gets its support from us. michael@0: // michael@0: // instead of returning a mozAccessible to the OS when it wants an object, we need to pass the view we represent, so the michael@0: // OS doesn't get confused and think we return some random object. michael@0: - (BOOL)hasRepresentedView; michael@0: - (id)representedView; michael@0: michael@0: #ifdef DEBUG michael@0: // debug utility that will print the native accessibility tree, starting michael@0: // at this node. michael@0: - (void)printHierarchy; michael@0: #endif michael@0: michael@0: /*** general ***/ michael@0: michael@0: // returns the accessible at the specified point. michael@0: - (id)accessibilityHitTest:(NSPoint)point; michael@0: michael@0: // whether this element is flagged as ignored. michael@0: - (BOOL)accessibilityIsIgnored; michael@0: michael@0: // currently focused UI element (possibly a child accessible) michael@0: - (id)accessibilityFocusedUIElement; michael@0: michael@0: /*** attributes ***/ michael@0: michael@0: // all supported attributes michael@0: - (NSArray*)accessibilityAttributeNames; michael@0: michael@0: // value for given attribute. michael@0: - (id)accessibilityAttributeValue:(NSString*)attribute; michael@0: michael@0: // whether a particular attribute can be modified michael@0: - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute; michael@0: michael@0: /*** actions ***/ michael@0: michael@0: - (NSArray*)accessibilityActionNames; michael@0: - (NSString*)accessibilityActionDescription:(NSString*)action; michael@0: - (void)accessibilityPerformAction:(NSString*)action; michael@0: michael@0: @end michael@0: