Adds support for pointer signals, in a way that will support both discrete events (e.g., scroll wheels, flutter/flutter#22762) and continuous gestures (e.g., trackpad scroll, flutter/flutter#21953).
Also exposes these new event options to the embedder. Does not include code to send the
new events from the platform shells.
This brings the Dart and C++ semantics flag enums back in sync.
In #5902, the ability to move the cursor forward and backward one word
were added to dart:ui, and to the Android embedder, but not to the
SemanticsAction enum on the C++ side.
This brings the Dart and C++ semantics flag enums back in sync.
In #5941, implicit scrolling support was added to SemanticsFlag in
dart:ui, and to the Android embedder, but not to the SemanticsFlags enum
on the C++ side.
This also clarifies/corrects the documentation for this value in dart:ui
and in the embedder API.
Fix for flutter/flutter#27700 and flutter/flutter#24207
There are 2 fixes included in this PR.
The intercepting views sometime pass up the touches events to flutter view, even after the forward gesture recognizer pass the event to the flutter view. We only want the event to be passed to the flutter view once. So we let the intercepting view 'consumes' the event in this PR to fix the problem.
When a touch sequence has multiple touch points participated(e.g. Pinch gesture), the touchesBegan and touchesEnded can be triggered multiple times if the touches do not happen simultaneously. One example would be: when performing a pinch gesture with 2 fingers, I put down one finger, keep the finger on the screen, then put down another finger, perform pinch, lift up both finger at the same time. In this sequence, touchesBegan is called twice with each touch in one of the calls and touchesEnded is called once and has 2 touches in the callback. To handle this issue, we added a count to count the touches in one touch sequence. We only set the state to fail when the count reaches 0(That is all the touches has began in the current sequence is ended).
Previously the transformation matrix returned on semantics nodes was
fetched by matrix col,row (incorrectly). This uses the SkMatrix
constants instead and adds a test.
Some embedders prefer to minimise the number of semantics node/custom
action updates sent back to the host platform -- for example due to
expensive serialisation mechanisms, etc.
This patch provides a 'batch end' signal that provides embedders with an
indication of when a self-consistent set of semantics node or custom action
updates have been sent.
We overload the node/action ID with information that conveys a batch end
by using an ID (-1) that is never allotted to semantics nodes by the
framework.
Link dart:* sources into engine for debugger source support
Currently, dart:* libraries appear to have no source in
debuggers like Observatory. With this change, these sources will be
available in debug mode applications. Sources for dart:* libraries are
lazily loaded on a script-by-script basis.
Refer to https://dart-review.googlesource.com/c/sdk/+/93375 for the Dart
SDK change.
If an app is using retainFlutterNativeView or a plugin wants to keep the
FlutterNativeView active, then the FlutterNativeView should not drop its
handle to the corresponding native platform view.
Fixes https://github.com/flutter/flutter/issues/26931
Flutter's accessibility APIs consist of three main calls from the
embedder to the Dart application:
1. FlutterEngineUpdateSemanticsEnabled: enables/disables semantics support.
2. FlutterEngineUpdateAccessibilityFeatures: sets embedder-specific
accessibility features.
3. FlutterEngineDispatchSemanticsAction: dispatches an action (tap,
long-press, scroll, etc.) to a semantics node.
and two main callbacks triggered by Dart code:
1. FlutterUpdateSemanticsNodeCallback: notifies the embedder of
updates to the properties of a given semantics node.
2. FlutterUpdateSemanticsCustomActionCallback: notifies the embedder
of updates to custom semantics actions registered in Dart code.
In the Flutter framework, when accessibility is first enabled, the
embedder will receive a stream of update callbacks notifying the
embedder of the full semantics tree. On further changes in the Dart
application, only updates will be sent.