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

Added a more complete docstring for SemanticsFlags #19817

Merged
merged 2 commits into from
Jul 16, 2020
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
10 changes: 6 additions & 4 deletions lib/ui/semantics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ 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
// `lib/ui/semantics/semantics_node.h` and in each of the embedders *must* be
// updated.
///
/// \warning 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.
/// See also:
/// - file://./../../lib/ui/semantics/semantics_node.h
Comment on lines +11 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of years later... #52229

class SemanticsAction {
const SemanticsAction._(this.index) : assert(index != null); // ignore: unnecessary_null_comparison

Expand Down
7 changes: 6 additions & 1 deletion lib/ui/semantics/semantics_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ const int kScrollableSemanticsActions =
static_cast<int32_t>(SemanticsAction::kScrollUp) |
static_cast<int32_t>(SemanticsAction::kScrollDown);

// Must match the SemanticsFlags enum in semantics.dart.
/// C/C++ representation of `SemanticsFlags` defined in
/// `lib/ui/semantics.dart`.
///\warning This must match the `SemanticsFlags` enum in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does \ do ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's doxygen commands which is what we use for c/c++/objc documentation: https://www.doxygen.nl/manual/commands.html

/// `lib/ui/semantics.dart`.
/// See also:
/// - file://./../../../lib/ui/semantics.dart
enum class SemanticsFlags : int32_t {
kHasCheckedState = 1 << 0,
kIsChecked = 1 << 1,
Expand Down