tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mozAccessibleProtocol.h (2055B)


      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/. */
      7 
      8 #import <Cocoa/Cocoa.h>
      9 
     10 #import "mozView.h"
     11 
     12 /* This protocol's primary use is so widget/cocoa can talk back to us
     13   properly.
     14 
     15   ChildView owns the topmost mozRootAccessible, and needs to take care of
     16   setting up that parent/child relationship.
     17 
     18   This protocol is thus used to make sure it knows it's talking to us, and not
     19   just some random |id|.
     20 */
     21 
     22 @protocol mozAccessible <NSObject>
     23 
     24 // returns whether this accessible is the root accessible. there is one
     25 // root accessible per window.
     26 - (BOOL)isRoot;
     27 
     28 // some mozAccessibles implement accessibility support in place of another
     29 // object. for example, ChildView gets its support from us.
     30 //
     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;
     36 
     37 /*** general ***/
     38 
     39 // returns the accessible at the specified point.
     40 - (id)accessibilityHitTest:(NSPoint)point;
     41 
     42 // whether this element should be exposed to platform.
     43 - (BOOL)isAccessibilityElement;
     44 
     45 // currently focused UI element (possibly a child accessible)
     46 - (id)accessibilityFocusedUIElement;
     47 
     48 - (NSArray*)accessibilityCustomActions;
     49 
     50 /*** attributes ***/
     51 
     52 // all supported attributes
     53 - (NSArray*)accessibilityAttributeNames;
     54 
     55 // value for given attribute.
     56 - (id)accessibilityAttributeValue:(NSString*)attribute;
     57 
     58 // whether a particular attribute can be modified
     59 - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute;
     60 
     61 /*** actions ***/
     62 
     63 - (NSArray*)accessibilityActionNames;
     64 - (NSString*)accessibilityActionDescription:(NSString*)action;
     65 - (void)accessibilityPerformAction:(NSString*)action;
     66 
     67 @end