Flutter Engine
 
Loading...
Searching...
No Matches
ax_platform_node_mac.h
Go to the documentation of this file.
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_MAC_H_
6#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_MAC_H_
7
8#import <Cocoa/Cocoa.h>
9
10#include "base/macros.h"
11
12#include "ax/ax_export.h"
13
15
17
18namespace ui {
19
21 public:
23
24 // AXPlatformNode.
27 void AnnounceText(const std::u16string& text) override;
28
29 // AXPlatformNodeBase.
30 void Destroy() override;
31 bool IsPlatformCheckable() const override;
32
33 protected:
34 void AddAttributeToList(const char* name,
35 const char* value,
36 PlatformAttributeList* attributes) override;
37
38 private:
39 ~AXPlatformNodeMac() override;
40
41 AXPlatformNodeCocoa* native_node_;
42
44};
45
46// Convenience function to determine whether an internal object role should
47// expose its accessible name in AXValue (as opposed to AXTitle/AXDescription).
49
50} // namespace ui
51
53@interface AXPlatformNodeCocoa : NSAccessibilityElement <NSAccessibility>
54
55// Maps AX roles to native roles. Returns NSAccessibilityUnknownRole if not
56// found.
57+ (NSString*)nativeRoleFromAXRole:(ax::mojom::Role)role;
58
59// Maps AX roles to native subroles. Returns nil if not found.
60+ (NSString*)nativeSubroleFromAXRole:(ax::mojom::Role)role;
61
62// Maps AX events to native notifications. Returns nil if not found.
63+ (NSString*)nativeNotificationFromAXEvent:(ax::mojom::Event)event;
64
65- (instancetype)initWithNode:(ui::AXPlatformNodeBase*)node;
66- (void)detach;
67
68@property(nonatomic, readonly) NSRect boundsInScreen;
69@property(nonatomic, readonly) ui::AXPlatformNodeBase* node;
70
71@end
72
73#endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_MAC_H_
ax::mojom::Event event_type
#define AX_EXPORT
Definition ax_export.h:29
std::vector< std::u16string > PlatformAttributeList
gfx::NativeViewAccessible GetNativeViewAccessible() override
void NotifyAccessibilityEvent(ax::mojom::Event event_type) override
bool IsPlatformCheckable() const override
void AnnounceText(const std::u16string &text) override
void AddAttributeToList(const char *name, const char *value, PlatformAttributeList *attributes) override
int32_t value
const char * name
Definition fuchsia.cc:49
ui::AXPlatformNodeBase * node
std::u16string text
UnimplementedNativeViewAccessible * NativeViewAccessible
AX_EXPORT bool IsNameExposedInAXValueForRole(ax::mojom::Role role)
#define BASE_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:8