@@ -198,12 +198,12 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
198
198
FlutterEngine* engine = GetFlutterEngine ();
199
199
// Capture the update callbacks before the embedder API initializes.
200
200
auto original_init = engine.embedderAPI .Initialize ;
201
- std::function<void (const FlutterSemanticsUpdate *, void *)> update_semantics_callback;
201
+ std::function<void (const FlutterSemanticsUpdate2 *, void *)> update_semantics_callback;
202
202
engine.embedderAPI .Initialize = MOCK_ENGINE_PROC (
203
203
Initialize, ([&update_semantics_callback, &original_init](
204
204
size_t version, const FlutterRendererConfig* config,
205
205
const FlutterProjectArgs* args, void * user_data, auto engine_out) {
206
- update_semantics_callback = args->update_semantics_callback ;
206
+ update_semantics_callback = args->update_semantics_callback2 ;
207
207
return original_init (version, config, args, user_data, engine_out);
208
208
}));
209
209
EXPECT_TRUE ([engine runWithEntrypoint: @" main" ]);
@@ -222,7 +222,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
222
222
engine.semanticsEnabled = YES ;
223
223
EXPECT_TRUE (enabled_called);
224
224
// Send flutter semantics updates.
225
- FlutterSemanticsNode root;
225
+ FlutterSemanticsNode2 root;
226
226
root.id = 0 ;
227
227
root.flags = static_cast <FlutterSemanticsFlag>(0 );
228
228
root.actions = static_cast <FlutterSemanticsAction>(0 );
@@ -239,7 +239,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
239
239
root.children_in_traversal_order = children;
240
240
root.custom_accessibility_actions_count = 0 ;
241
241
242
- FlutterSemanticsNode child1;
242
+ FlutterSemanticsNode2 child1;
243
243
child1.id = 1 ;
244
244
child1.flags = static_cast <FlutterSemanticsFlag>(0 );
245
245
child1.actions = static_cast <FlutterSemanticsAction>(0 );
@@ -254,11 +254,11 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
254
254
child1.child_count = 0 ;
255
255
child1.custom_accessibility_actions_count = 0 ;
256
256
257
- FlutterSemanticsUpdate update;
258
- update.nodes_count = 2 ;
259
- FlutterSemanticsNode nodes[] = {root, child1};
257
+ FlutterSemanticsUpdate2 update;
258
+ update.node_count = 2 ;
259
+ FlutterSemanticsNode2* nodes[] = {& root, & child1};
260
260
update.nodes = nodes;
261
- update.custom_actions_count = 0 ;
261
+ update.custom_action_count = 0 ;
262
262
update_semantics_callback (&update, (__bridge void *)engine);
263
263
264
264
// Verify the accessibility tree is attached to the flutter view.
@@ -292,12 +292,12 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
292
292
FlutterEngine* engine = GetFlutterEngine ();
293
293
// Capture the update callbacks before the embedder API initializes.
294
294
auto original_init = engine.embedderAPI .Initialize ;
295
- std::function<void (const FlutterSemanticsUpdate *, void *)> update_semantics_callback;
295
+ std::function<void (const FlutterSemanticsUpdate2 *, void *)> update_semantics_callback;
296
296
engine.embedderAPI .Initialize = MOCK_ENGINE_PROC (
297
297
Initialize, ([&update_semantics_callback, &original_init](
298
298
size_t version, const FlutterRendererConfig* config,
299
299
const FlutterProjectArgs* args, void * user_data, auto engine_out) {
300
- update_semantics_callback = args->update_semantics_callback ;
300
+ update_semantics_callback = args->update_semantics_callback2 ;
301
301
return original_init (version, config, args, user_data, engine_out);
302
302
}));
303
303
EXPECT_TRUE ([engine runWithEntrypoint: @" main" ]);
@@ -312,7 +312,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
312
312
engine.semanticsEnabled = YES ;
313
313
EXPECT_TRUE (enabled_called);
314
314
// Send flutter semantics updates.
315
- FlutterSemanticsNode root;
315
+ FlutterSemanticsNode2 root;
316
316
root.id = 0 ;
317
317
root.flags = static_cast <FlutterSemanticsFlag>(0 );
318
318
root.actions = static_cast <FlutterSemanticsAction>(0 );
@@ -329,7 +329,7 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
329
329
root.children_in_traversal_order = children;
330
330
root.custom_accessibility_actions_count = 0 ;
331
331
332
- FlutterSemanticsNode child1;
332
+ FlutterSemanticsNode2 child1;
333
333
child1.id = 1 ;
334
334
child1.flags = static_cast <FlutterSemanticsFlag>(0 );
335
335
child1.actions = static_cast <FlutterSemanticsAction>(0 );
@@ -344,11 +344,11 @@ - (nonnull NSView*)createWithViewIdentifier:(int64_t)viewId arguments:(nullable
344
344
child1.child_count = 0 ;
345
345
child1.custom_accessibility_actions_count = 0 ;
346
346
347
- FlutterSemanticsUpdate update;
348
- update.nodes_count = 2 ;
349
- FlutterSemanticsNode nodes[] = {root, child1};
347
+ FlutterSemanticsUpdate2 update;
348
+ update.node_count = 2 ;
349
+ FlutterSemanticsNode2* nodes[] = {& root, & child1};
350
350
update.nodes = nodes;
351
- update.custom_actions_count = 0 ;
351
+ update.custom_action_count = 0 ;
352
352
// This call updates semantics for the default view, which does not exist,
353
353
// and therefore this call is invalid. But the engine should not crash.
354
354
update_semantics_callback (&update, (__bridge void *)engine);
0 commit comments