Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 <any>
9#include <list>
10
11#include "flutter/lib/ui/dart_wrapper.h"
12#include "flutter/lib/ui/semantics/semantics_update.h"
13#include "flutter/lib/ui/ui_dart_state.h"
15
16namespace flutter {
17
19 : public RefCountedDartWrappable<SemanticsUpdateBuilder> {
20 DEFINE_WRAPPERTYPEINFO();
22
23 public:
24 static void Create(Dart_Handle wrapper) {
26 auto res = fml::MakeRefCounted<SemanticsUpdateBuilder>();
27 res->AssociateWithDartWrapper(wrapper);
28 }
29
31
32 void updateNode(
33 int id,
34 int flags,
35 int actions,
36 int maxValueLength,
37 int currentValueLength,
38 int textSelectionBase,
39 int textSelectionExtent,
40 int platformViewId,
41 int scrollChildren,
42 int scrollIndex,
43 double scrollPosition,
44 double scrollExtentMax,
45 double scrollExtentMin,
46 double left,
47 double top,
48 double right,
49 double bottom,
50 double elevation,
51 double thickness,
52 std::string identifier,
53 std::string label,
54 const std::vector<NativeStringAttribute*>& labelAttributes,
55 std::string value,
56 const std::vector<NativeStringAttribute*>& valueAttributes,
57 std::string increasedValue,
58 const std::vector<NativeStringAttribute*>& increasedValueAttributes,
59 std::string decreasedValue,
60 const std::vector<NativeStringAttribute*>& decreasedValueAttributes,
61 std::string hint,
62 const std::vector<NativeStringAttribute*>& hintAttributes,
63 std::string tooltip,
64 int textDirection,
65 const tonic::Float64List& transform,
66 const tonic::Int32List& childrenInTraversalOrder,
67 const tonic::Int32List& childrenInHitTestOrder,
68 const tonic::Int32List& customAccessibilityActions);
69
70 void updateCustomAction(int id,
71 std::string label,
72 std::string hint,
73 int overrideId);
74
75 void build(Dart_Handle semantics_update_handle);
76
77 private:
78 explicit SemanticsUpdateBuilder();
81};
82
83} // namespace flutter
84
85#endif // FLUTTER_LIB_UI_SEMANTICS_SEMANTICS_UPDATE_BUILDER_H_
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
void updateCustomAction(int id, std::string label, std::string hint, int overrideId)
static void Create(Dart_Handle wrapper)
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 identifier, std::string label, const std::vector< NativeStringAttribute * > &labelAttributes, std::string value, const std::vector< NativeStringAttribute * > &valueAttributes, std::string increasedValue, const std::vector< NativeStringAttribute * > &increasedValueAttributes, std::string decreasedValue, const std::vector< NativeStringAttribute * > &decreasedValueAttributes, std::string hint, const std::vector< NativeStringAttribute * > &hintAttributes, std::string tooltip, int textDirection, const tonic::Float64List &transform, const tonic::Int32List &childrenInTraversalOrder, const tonic::Int32List &childrenInHitTestOrder, const tonic::Int32List &customAccessibilityActions)
static void ThrowIfUIOperationsProhibited()
static SkString identifier(const FontFamilyDesc &family, const FontDesc &font)
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
FlutterSemanticsFlag flags
Definition build.py:1
std::unordered_map< int32_t, SemanticsNode > SemanticsNodeUpdates
std::unordered_map< int32_t, CustomAccessibilityAction > CustomAccessibilityActionUpdates
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition p3.cpp:47
#define FML_FRIEND_MAKE_REF_COUNTED(T)