1 | // Copyright 2013 The Flutter 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 FLUTTER_LIB_UI_SEMANTICS_CUSTOM_ACCESSIBILITY_ACTION_H_ |
6 | #define FLUTTER_LIB_UI_SEMANTICS_CUSTOM_ACCESSIBILITY_ACTION_H_ |
7 | |
8 | #include "third_party/tonic/dart_library_natives.h" |
9 | #include "third_party/tonic/dart_wrappable.h" |
10 | #include "third_party/tonic/typed_data/typed_list.h" |
11 | |
12 | namespace flutter { |
13 | |
14 | /// A custom accessibility action is used to indicate additional semantics |
15 | /// actions that a user can perform on a semantics node beyond the |
16 | /// preconfigured options. |
17 | struct CustomAccessibilityAction { |
18 | CustomAccessibilityAction(); |
19 | ~CustomAccessibilityAction(); |
20 | |
21 | int32_t id = 0; |
22 | int32_t overrideId = -1; |
23 | std::string label; |
24 | std::string hint; |
25 | }; |
26 | |
27 | // Contains custom accessibility actions that need to be updated. |
28 | // |
29 | // The keys in the map are stable action IDs, and the values contain |
30 | // semantic information for the action corresponding to that id. |
31 | using CustomAccessibilityActionUpdates = |
32 | std::unordered_map<int32_t, CustomAccessibilityAction>; |
33 | |
34 | } // namespace flutter |
35 | |
36 | #endif // FLUTTER_LIB_UI_SEMANTICS_LOCAL_CONTEXT_ACTION_H_ |
37 | |