Flutter Engine
semantics_update_builder.h
Go to the documentation of this file.
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_SEMANTICS_UPDATE_BUILDER_H_
6 #define FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_UPDATE_BUILDER_H_
7 
8 #include "flutter/lib/ui/dart_wrapper.h"
9 #include "flutter/lib/ui/semantics/semantics_update.h"
11 
12 namespace flutter {
13 
15  : public RefCountedDartWrappable<SemanticsUpdateBuilder> {
16  DEFINE_WRAPPERTYPEINFO();
17  FML_FRIEND_MAKE_REF_COUNTED(SemanticsUpdateBuilder);
18 
19  public:
21  return fml::MakeRefCounted<SemanticsUpdateBuilder>();
22  }
23 
24  ~SemanticsUpdateBuilder() override;
25 
26  void updateNode(int id,
27  int flags,
28  int actions,
29  int maxValueLength,
30  int currentValueLength,
31  int textSelectionBase,
32  int textSelectionExtent,
33  int platformViewId,
34  int scrollChildren,
35  int scrollIndex,
36  double scrollPosition,
37  double scrollExtentMax,
38  double scrollExtentMin,
39  double left,
40  double top,
41  double right,
42  double bottom,
43  double elevation,
44  double thickness,
45  std::string label,
46  std::string hint,
47  std::string value,
48  std::string increasedValue,
49  std::string decreasedValue,
50  int textDirection,
51  const tonic::Float64List& transform,
52  const tonic::Int32List& childrenInTraversalOrder,
53  const tonic::Int32List& childrenInHitTestOrder,
54  const tonic::Int32List& customAccessibilityActions);
55 
56  void updateCustomAction(int id,
57  std::string label,
58  std::string hint,
59  int overrideId);
60 
61  void build(Dart_Handle semantics_update_handle);
62 
63  static void RegisterNatives(tonic::DartLibraryNatives* natives);
64 
65  private:
66  explicit SemanticsUpdateBuilder();
67 
68  SemanticsNodeUpdates nodes_;
70 };
71 
72 } // namespace flutter
73 
74 #endif // FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_UPDATE_BUILDER_H_
void updateNode(int id, int flags, int actions, int maxValueLength, int currentValueLength, int textSelectionBase, int textSelectionExtent, int platformViewId, int scrollChildren, int scrollIndex, double scrollPosition, double scrollExtentMax, double scrollExtentMin, double left, double top, double right, double bottom, double elevation, double thickness, std::string label, std::string hint, std::string value, std::string increasedValue, std::string decreasedValue, int textDirection, const tonic::Float64List &transform, const tonic::Int32List &childrenInTraversalOrder, const tonic::Int32List &childrenInHitTestOrder, const tonic::Int32List &customAccessibilityActions)
void build(Dart_Handle semantics_update_handle)
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
void updateCustomAction(int id, std::string label, std::string hint, int overrideId)
uint8_t value
static void RegisterNatives(tonic::DartLibraryNatives *natives)
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
static fml::RefPtr< SemanticsUpdateBuilder > create()
DEF_SWITCHES_START snapshot asset Path to the directory containing the four files specified by VmSnapshotInstructions and IsolateSnapshotInstructions vm snapshot The VM instructions snapshot that will be memory mapped as read and executable SnapshotAssetPath must be present isolate snapshot The isolate instructions snapshot that will be memory mapped as read and executable SnapshotAssetPath must be present icu symbol Prefix for the symbols representing ICU data linked into the Flutter library dart flags
Definition: switches.h:66