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

Commit 891c857

Browse files
committed
Feedback
1 parent ea97a5e commit 891c857

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

shell/platform/embedder/embedder.h

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ typedef struct {
11101110
} FlutterSemanticsNode;
11111111

11121112
/// `FlutterSemanticsCustomAction` ID used as a sentinel to signal the end of a
1113-
/// batch of semantics custom action updates. This is unused if using
1113+
/// batch of semantics custom action updates. This is unused if using
11141114
/// `FlutterUpdateSemanticsCallback`.
11151115
FLUTTER_EXPORT
11161116
extern const int32_t kFlutterSemanticsCustomActionIdBatchEnd;
@@ -1759,16 +1759,6 @@ typedef struct {
17591759
/// The callback invoked by the engine in root isolate scope. Called
17601760
/// immediately after the root isolate has been created and marked runnable.
17611761
VoidCallback root_isolate_create_callback;
1762-
/// The callback invoked by the engine in order to give the embedder the
1763-
/// chance to respond to updates to semantics nodes and custom actions from
1764-
/// the Dart application.
1765-
///
1766-
/// The callback will be invoked on the thread on which the `FlutterEngineRun`
1767-
/// call is made.
1768-
///
1769-
/// If this callback is provided, update_semantics_node_callback and
1770-
/// update_semantics_custom_action_callback must not be provided.
1771-
FlutterUpdateSemanticsCallback update_semantics_callback;
17721762
/// The legacy callback invoked by the engine in order to give the embedder
17731763
/// the chance to respond to semantics node updates from the Dart application.
17741764
/// Semantics node updates are sent in batches terminated by a 'batch end'
@@ -1778,8 +1768,9 @@ typedef struct {
17781768
/// The callback will be invoked on the thread on which the `FlutterEngineRun`
17791769
/// call is made.
17801770
///
1781-
/// Embedders should use `update_semantics_callback` instead. If this callback
1782-
/// is provided, `update_semantics_callback` must not be provided.
1771+
/// @deprecated Prefer using `update_semantics_callback` instead. If this
1772+
/// calback is provided, `update_semantics_callback` must not
1773+
/// be provided.
17831774
FlutterUpdateSemanticsNodeCallback update_semantics_node_callback;
17841775
/// The legacy callback invoked by the engine in order to give the embedder
17851776
/// the chance to respond to updates to semantics custom actions from the Dart
@@ -1790,6 +1781,10 @@ typedef struct {
17901781
///
17911782
/// The callback will be invoked on the thread on which the `FlutterEngineRun`
17921783
/// call is made.
1784+
///
1785+
/// @deprecated Prefer using `update_semantics_callback` instead. If this
1786+
/// calback is provided, `update_semantics_callback` must not
1787+
/// be provided.
17931788
FlutterUpdateSemanticsCustomActionCallback
17941789
update_semantics_custom_action_callback;
17951790
/// Path to a directory used to store data that is cached across runs of a
@@ -1926,6 +1921,17 @@ typedef struct {
19261921
//
19271922
// The first argument is the `user_data` from `FlutterEngineInitialize`.
19281923
OnPreEngineRestartCallback on_pre_engine_restart_callback;
1924+
1925+
/// The callback invoked by the engine in order to give the embedder the
1926+
/// chance to respond to updates to semantics nodes and custom actions from
1927+
/// the Dart application.
1928+
///
1929+
/// The callback will be invoked on the thread on which the `FlutterEngineRun`
1930+
/// call is made.
1931+
///
1932+
/// If this callback is provided, update_semantics_node_callback and
1933+
/// update_semantics_custom_action_callback must not be provided.
1934+
FlutterUpdateSemanticsCallback update_semantics_callback;
19291935
} FlutterProjectArgs;
19301936

19311937
#ifndef FLUTTER_ENGINE_NO_PROTOTYPES

shell/platform/windows/flutter_windows_engine.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,12 @@ bool FlutterWindowsEngine::Run(std::string_view entrypoint) {
323323
auto host = static_cast<FlutterWindowsEngine*>(user_data);
324324

325325
for (size_t i = 0; i < update->nodes_count; i++) {
326-
const FlutterSemanticsNode* node = update->nodes + i;
326+
const FlutterSemanticsNode* node = &update->nodes[i];
327327
host->accessibility_bridge_->AddFlutterSemanticsNodeUpdate(node);
328328
}
329329

330330
for (size_t i = 0; i < update->custom_actions_count; i++) {
331-
const FlutterSemanticsCustomAction* action = update->custom_actions + i;
331+
const FlutterSemanticsCustomAction* action = &update->custom_actions[i];
332332
host->accessibility_bridge_->AddFlutterSemanticsCustomActionUpdate(
333333
action);
334334
}

0 commit comments

Comments
 (0)