Skip to content

Commit 3038c66

Browse files
authored
Sync accessibility flags in embedder.h (#264)
The following enum types in `embedder.h` must match with the corresponding Dart/C++ classes in `dart:ui` but some values are missing. - `FlutterAccessibilityFeature` - `FlutterSemanticsAction` - `FlutterSemanticsFlag` The comments say https://github.com/flutter/engine/blob/2d29e2f3b5e4c951809eb7578ff5f114f91efbeb/shell/platform/embedder/embedder.h#L83 https://github.com/flutter/engine/blob/2d29e2f3b5e4c951809eb7578ff5f114f91efbeb/lib/ui/window.dart#L784-L785
1 parent e36df21 commit 3038c66

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

shell/platform/embedder/embedder.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ typedef enum {
9191
/// Request that text be rendered at a bold font weight.
9292
kFlutterAccessibilityFeatureBoldText = 1 << 3,
9393
/// Request that certain animations be simplified and parallax effects
94-
// removed.
94+
/// removed.
9595
kFlutterAccessibilityFeatureReduceMotion = 1 << 4,
96+
/// Request that UI be rendered with darker colors.
97+
kFlutterAccessibilityFeatureHighContrast = 1 << 5,
9698
} FlutterAccessibilityFeature;
9799

98100
/// The set of possible actions that can be conveyed to a semantics node.
@@ -148,6 +150,8 @@ typedef enum {
148150
kFlutterSemanticsActionMoveCursorForwardByWord = 1 << 19,
149151
/// Move the cursor backward by one word.
150152
kFlutterSemanticsActionMoveCursorBackwardByWord = 1 << 20,
153+
/// Replace the current text in the text field.
154+
kFlutterSemanticsActionSetText = 1 << 21,
151155
} FlutterSemanticsAction;
152156

153157
/// The set of properties that may be associated with a semantics node.
@@ -202,6 +206,12 @@ typedef enum {
202206
/// `PageView` widget does not have implicit scrolling, so that users don't
203207
/// navigate to the next page when reaching the end of the current one.
204208
kFlutterSemanticsFlagHasImplicitScrolling = 1 << 18,
209+
/// Whether the value of the semantics node is coming from a multi-line text
210+
/// field.
211+
///
212+
/// This is used for text fields to distinguish single-line text fields from
213+
/// multi-line ones.
214+
kFlutterSemanticsFlagIsMultiline = 1 << 19,
205215
/// Whether the semantic node is read only.
206216
///
207217
/// Only applicable when kFlutterSemanticsFlagIsTextField flag is on.

0 commit comments

Comments
 (0)