5#include "flutter/lib/ui/semantics/semantics_update_builder.h"
9#include "flutter/lib/ui/floating_point.h"
10#include "flutter/lib/ui/ui_dart_state.h"
21 const std::vector<NativeStringAttribute*>& native_attributes) {
22 for (
const auto& native_attribute : native_attributes) {
23 destination.push_back(native_attribute->GetAttribute());
29SemanticsUpdateBuilder::SemanticsUpdateBuilder() =
default;
38 int currentValueLength,
39 int textSelectionBase,
40 int textSelectionExtent,
44 double scrollPosition,
45 double scrollExtentMax,
46 double scrollExtentMin,
55 const std::vector<NativeStringAttribute*>& labelAttributes,
57 const std::vector<NativeStringAttribute*>& valueAttributes,
58 std::string increasedValue,
59 const std::vector<NativeStringAttribute*>& increasedValueAttributes,
60 std::string decreasedValue,
61 const std::vector<NativeStringAttribute*>& decreasedValueAttributes,
63 const std::vector<NativeStringAttribute*>& hintAttributes,
67 const tonic::Int32List& childrenInTraversalOrder,
68 const tonic::Int32List& childrenInHitTestOrder,
69 const tonic::Int32List& localContextActions,
72 (scrollChildren > 0 && childrenInHitTestOrder.data()))
73 <<
"Semantics update contained scrollChildren but did not have "
74 "childrenInHitTestOrder";
94 node.
label = std::move(label);
102 node.
hint = std::move(hint);
104 node.
tooltip = std::move(tooltip);
107 for (
int i = 0;
i < 16; ++
i) {
112 std::vector<int32_t>(childrenInTraversalOrder.data(),
113 childrenInTraversalOrder.data() +
114 childrenInTraversalOrder.num_elements());
116 childrenInHitTestOrder.data(),
117 childrenInHitTestOrder.data() + childrenInHitTestOrder.num_elements());
119 localContextActions.data(),
120 localContextActions.data() + localContextActions.num_elements());
132 action.overrideId = overrideId;
133 action.label = std::move(label);
134 action.hint = std::move(hint);
140 std::move(actions_));
static SkM44 ColMajor(const SkScalar c[16])
void build(Dart_Handle semantics_update_handle)
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, int headingLevel)
void updateCustomAction(int id, std::string label, std::string hint, int overrideId)
~SemanticsUpdateBuilder() override
static void create(Dart_Handle semantics_update_handle, SemanticsNodeUpdates nodes, CustomAccessibilityActionUpdates actions)
static SkString identifier(const FontFamilyDesc &family, const FontDesc &font)
struct _Dart_Handle * Dart_Handle
FlutterSemanticsFlag flags
#define FML_CHECK(condition)
IMPLEMENT_WRAPPERTYPEINFO(flutter_gpu, FlutterGpuTestClass)
void pushStringAttributes(StringAttributes &destination, const std::vector< NativeStringAttribute * > &native_attributes)
static float SafeNarrow(double value)
std::vector< StringAttributePtr > StringAttributes
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
StringAttributes decreasedValueAttributes
std::string increasedValue
StringAttributes hintAttributes
StringAttributes increasedValueAttributes
StringAttributes valueAttributes
StringAttributes labelAttributes
std::vector< int32_t > childrenInHitTestOrder
int32_t textSelectionExtent
int32_t currentValueLength
std::vector< int32_t > customAccessibilityActions
std::string decreasedValue
std::vector< int32_t > childrenInTraversalOrder
int32_t textSelectionBase