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