Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2a813919
Commit
2a813919
authored
Sep 17, 2016
by
Ian Hickson
Committed by
GitHub
Sep 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some semantics documentation. (#5922)
parent
2d4d1713
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
semantics.dart
packages/flutter/lib/src/rendering/semantics.dart
+44
-0
No files found.
packages/flutter/lib/src/rendering/semantics.dart
View file @
2a813919
...
...
@@ -13,14 +13,53 @@ import 'package:vector_math/vector_math_64.dart';
import
'node.dart'
;
/// The possible actions that can be conveyed from the operating system
/// accessibility APIs to a [SemanticsNode] object.
enum
SemanticAction
{
/// The equivalent of a user briefly tapping the screen with the finger
/// without moving it.
tap
,
/// The equivalent of a user pressing and holding the screen with the finger
/// for a few seconds without moving it.
longPress
,
/// The equivalent of a user moving their finger across the screen from right
/// to left.
///
/// This action should be recognized by controls that are horizontally
/// scrollable.
scrollLeft
,
/// The equivalent of a user moving their finger across the screen from left
/// to right.
///
/// This action should be recognized by controls that are horizontally
/// scrollable.
scrollRight
,
/// The equivalent of a user moving their finger across the screen from
/// bottom to top.
///
/// This action should be recognized by controls that are vertically
/// scrollable.
scrollUp
,
/// The equivalent of a user moving their finger across the screen from top
/// to bottom.
///
/// This action should be recognized by controls that are vertically
/// scrollable.
scrollDown
,
/// A request to increase the value represented by the [SemanticsNode].
///
/// For example, this action might be recognized by a slider control.
increase
,
/// A request to decrease the value represented by the [SemanticsNode].
///
/// For example, this action might be recognized by a slider control.
decrease
,
}
...
...
@@ -32,6 +71,11 @@ enum SemanticAction {
/// [SemanticsNode.canBeTapped] is true, [handleSemanticScrollDown]() will only
/// be called if [SemanticsNode.canBeScrolledVertically] is true, etc).
abstract
class
SemanticActionHandler
{
// ignore: one_member_abstracts
/// Called when the object implementing this interface receives a
/// [SemanticAction]. For example, if the user of an accessibility tool
/// instructs their device that they wish to tap a button, the [RenderObject]
/// behind that button would have its [performAction] method called with the
/// [SemanticAction.tap] action.
void
performAction
(
SemanticAction
action
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment