Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add missing values to semantics action enums #8033

Merged
merged 1 commit into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ part of dart.ui;
/// The possible actions that can be conveyed from the operating system
/// accessibility APIs to a semantics node.
//
// When changes are made to this class, the equivalent APIs in each of the
// embedders *must* be updated.
// When changes are made to this class, the equivalent APIs in
// `lib/ui/semantics/semantics_node.h` and in each of the embedders *must* be
// updated.
class SemanticsAction {
const SemanticsAction._(this.index);

Expand Down
5 changes: 4 additions & 1 deletion lib/ui/semantics/semantics_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

namespace blink {

// Must match the SemanticsAction enum in semantics.dart.
// Must match the SemanticsAction enum in semantics.dart and in each of the
// embedders.
enum class SemanticsAction : int32_t {
kTap = 1 << 0,
kLongPress = 1 << 1,
Expand All @@ -37,6 +38,8 @@ enum class SemanticsAction : int32_t {
kDidLoseAccessibilityFocus = 1 << 16,
kCustomAction = 1 << 17,
kDismiss = 1 << 18,
kMoveCursorForwardByWordIndex = 1 << 19,
kMoveCursorBackwardByWordIndex = 1 << 20,
};

const int kScrollableSemanticsActions =
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ typedef enum {
kFlutterSemanticsActionCustomAction = 1 << 17,
// A request that the node should be dismissed.
kFlutterSemanticsActionDismiss = 1 << 18,
// Move the cursor forward by one word.
kFlutterSemanticsActionMoveCursorForwardByWordIndex = 1 << 19,
// Move the cursor backward by one word.
kFlutterSemanticsActionMoveCursorBackwardByWordIndex = 1 << 20,
} FlutterSemanticsAction;

// The set of properties that may be associated with a semantics node.
Expand Down