Flutter Engine
The 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"
12
13#include "ax/ax_export.h"
14
16
18
19namespace ui {
20
22 public:
24
25 // AXPlatformNode.
28 void AnnounceText(const std::u16string& text) override;
29
30 // AXPlatformNodeBase.
31 void Destroy() override;
32 bool IsPlatformCheckable() const override;
33
34 protected:
35 void AddAttributeToList(const char* name,
36 const char* value,
37 PlatformAttributeList* attributes) override;
38
39 private:
40 ~AXPlatformNodeMac() override;
41
43
45};
46
47// Convenience function to determine whether an internal object role should
48// expose its accessible name in AXValue (as opposed to AXTitle/AXDescription).
50
51} // namespace ui
52
54@interface AXPlatformNodeCocoa : NSAccessibilityElement <NSAccessibility>
55
56// Maps AX roles to native roles. Returns NSAccessibilityUnknownRole if not
57// found.
58+ (NSString*)nativeRoleFromAXRole:(ax::mojom::Role)role;
59
60// Maps AX roles to native subroles. Returns nil if not found.
61+ (NSString*)nativeSubroleFromAXRole:(ax::mojom::Role)role;
62
63// Maps AX events to native notifications. Returns nil if not found.
64+ (NSString*)nativeNotificationFromAXEvent:(ax::mojom::Event)event;
65
66- (instancetype)initWithNode:(ui::AXPlatformNodeBase*)node;
67- (void)detach;
68
69@property(nonatomic, readonly) NSRect boundsInScreen;
70@property(nonatomic, readonly) ui::AXPlatformNodeBase* node;
71
72@end
73
74#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
uint8_t value
const char * name
Definition fuchsia.cc:50
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