5#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"
6#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"
15#include "flutter/fml/synchronization/waitable_event.h"
16#include "flutter/lib/ui/window/platform_message.h"
17#include "flutter/shell/platform/common/accessibility_bridge.h"
18#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h"
19#import "flutter/shell/platform/darwin/common/framework/Source/FlutterBinaryMessengerRelay.h"
20#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h"
21#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppLifecycleDelegate.h"
22#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h"
23#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
24#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
25#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTestUtils.h"
26#include "flutter/shell/platform/embedder/embedder.h"
27#include "flutter/shell/platform/embedder/embedder_engine.h"
28#include "flutter/shell/platform/embedder/test_utils/proc_table_replacement.h"
29#include "flutter/testing/stream_capture.h"
30#include "flutter/testing/test_dart_native_resolver.h"
31#include "gtest/gtest.h"
53 arguments:(nullable
id)
args {
54 return viewIdentifier == 42 ? [[NSView alloc] init] : nil;
63- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication* _Nonnull)sender {
65 return NSTerminateCancel;
73@property(nonatomic, strong, readonly) NSPointerArray* registeredDelegates;
76- (
BOOL)hasDelegate:(nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate;
92- (void)addApplicationLifecycleDelegate:(nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
93 _delegates.push_back((__bridge
void*)delegate);
96- (void)removeApplicationLifecycleDelegate:
97 (nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
100 @"Attempting to unregister a delegate that was not registered.");
104- (
BOOL)hasDelegate:(nonnull NSObject<FlutterAppLifecycleDelegate>*)delegate {
117+ (void)registerWithRegistrar:(id<FlutterPluginRegistrar>)registrar {
127- (NSArray<NSScreen*>*)
screens {
128 id mockScreen = OCMClassMock([NSScreen
class]);
129 OCMStub([mockScreen backingScaleFactor]).andReturn(2.0);
130 OCMStub([mockScreen deviceDescription]).andReturn(@{
131 @"NSScreenNumber" : [NSNumber numberWithInt:10]
133 OCMStub([mockScreen
frame]).andReturn(NSMakeRect(10, 20, 30, 40));
134 return [NSArray arrayWithObject:mockScreen];
150 std::string executable_name = [[engine executableName] UTF8String];
151 ASSERT_FALSE(executable_name.empty());
158 EXPECT_EQ(executable_name, dart_string);
168#ifndef FLUTTER_RELEASE
170 setenv(
"FLUTTER_ENGINE_SWITCHES",
"2", 1);
171 setenv(
"FLUTTER_ENGINE_SWITCH_1",
"abc", 1);
172 setenv(
"FLUTTER_ENGINE_SWITCH_2",
"foo=\"bar, baz\"", 1);
176 ASSERT_EQ(switches.size(), 2UL);
177 EXPECT_EQ(switches[0],
"--abc");
178 EXPECT_EQ(switches[1],
"--foo=\"bar, baz\"");
180 unsetenv(
"FLUTTER_ENGINE_SWITCHES");
181 unsetenv(
"FLUTTER_ENGINE_SWITCH_1");
182 unsetenv(
"FLUTTER_ENGINE_SWITCH_2");
190 NSData* test_message = [@"a message" dataUsingEncoding:NSUTF8StringEncoding];
194 SendPlatformMessage, ([&called, test_message](
auto engine,
auto message) {
196 EXPECT_STREQ(
message->channel,
"test");
197 EXPECT_EQ(memcmp(
message->message, test_message.bytes,
message->message_size), 0);
201 [engine.binaryMessenger sendOnChannel:@"test" message:test_message];
208 AddNativeCallback(
"SignalNativeTest",
221 stdout_capture.
Stop();
235 if (rootLayer.backgroundColor != nil) {
236 NSColor* actualBackgroundColor =
237 [NSColor colorWithCGColor:rootLayer.backgroundColor];
238 EXPECT_EQ(actualBackgroundColor, [NSColor blackColor]);
250 [viewController loadView];
264 if (rootLayer.backgroundColor != nil) {
265 NSColor* actualBackgroundColor =
266 [NSColor colorWithCGColor:rootLayer.backgroundColor];
267 EXPECT_EQ(actualBackgroundColor, [NSColor whiteColor]);
279 [viewController loadView];
292 Initialize, ([&update_semantics_callback, &original_init](
295 update_semantics_callback =
args->update_semantics_callback2;
303 [viewController loadView];
305 bool enabled_called =
false;
308 enabled_called = enabled;
318 root.text_selection_base = -1;
319 root.text_selection_extent = -1;
323 root.increased_value =
"";
324 root.decreased_value =
"";
326 root.child_count = 1;
327 int32_t children[] = {1};
328 root.children_in_traversal_order = children;
329 root.custom_accessibility_actions_count = 0;
337 child1.
label =
"child 1";
350 update.custom_action_count = 0;
351 update_semantics_callback(&
update, (__bridge
void*)
engine);
356 std::string root_label = [native_root.accessibilityLabel UTF8String];
358 EXPECT_EQ(native_root.accessibilityRole, NSAccessibilityGroupRole);
359 EXPECT_EQ([native_root.accessibilityChildren
count], 1u);
360 NSAccessibilityElement* native_child1 = native_root.accessibilityChildren[0];
361 std::string child1_value = [native_child1.accessibilityValue UTF8String];
363 EXPECT_EQ(native_child1.accessibilityRole, NSAccessibilityStaticTextRole);
364 EXPECT_EQ([native_child1.accessibilityChildren
count], 0u);
366 bool semanticsEnabled =
true;
369 semanticsEnabled = enabled;
373 EXPECT_FALSE(semanticsEnabled);
377 [engine setViewController:nil];
386 Initialize, ([&update_semantics_callback, &original_init](
389 update_semantics_callback =
args->update_semantics_callback2;
395 bool enabled_called =
false;
398 enabled_called = enabled;
408 root.text_selection_base = -1;
409 root.text_selection_extent = -1;
413 root.increased_value =
"";
414 root.decreased_value =
"";
416 root.child_count = 1;
417 int32_t children[] = {1};
418 root.children_in_traversal_order = children;
419 root.custom_accessibility_actions_count = 0;
427 child1.
label =
"child 1";
440 update.custom_action_count = 0;
443 update_semantics_callback(&
update, (__bridge
void*)
engine);
449 bool semanticsEnabled =
true;
452 semanticsEnabled = enabled;
456 EXPECT_FALSE(semanticsEnabled);
466 bool enabled_called =
false;
469 enabled_called = enabled;
488 bool latch_called =
false;
499 ASSERT_TRUE(latch_called);
505 initWithAssetsPath:fixtures
506 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
512 [viewController loadView];
513 [viewController viewDidLoad];
519 withId:@"factory_id"];
520 [engine.platformViewController
524 @"viewType" : @"factory_id",
529 [engine.testThreadSynchronizer blockUntilFrameAvailable];
534 EXPECT_EQ(rootLayer.sublayers.count, 2u);
539 [engine shutDownEngine];
550 compositor = *
args->compositor;
557 [viewController loadView];
572 .backing_store = &backing_store,
574 std::vector<FlutterLayer*> layers = {&layer};
579 .layers =
const_cast<const FlutterLayer**
>(layers.data()),
588 [engine shutDownEngine];
594 initWithAssetsPath:fixtures
595 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
597 project.dartEntrypointArguments = @[ @"arg1", @"arg2" ];
607 EXPECT_EQ(
args->dart_entrypoint_argc, 2);
608 NSString* arg1 = [[NSString alloc] initWithCString:args->dart_entrypoint_argv[0]
609 encoding:NSUTF8StringEncoding];
610 NSString* arg2 = [[NSString alloc] initWithCString:args->dart_entrypoint_argv[1]
611 encoding:NSUTF8StringEncoding];
631 id<FlutterBinaryMessenger> binaryMessenger = nil;
636 initWithAssetsPath:fixtures
637 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
640 allowHeadlessExecution:YES];
647 EXPECT_NE(binaryMessenger, nil);
648 EXPECT_EQ(weakEngine, nil);
655 id<FlutterTextureRegistry> textureRegistry;
660 initWithAssetsPath:fixtures
661 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
664 allowHeadlessExecution:YES];
665 id<FlutterPluginRegistrar> registrar = [engine registrarForPlugin:@"MyPlugin"];
666 textureRegistry = registrar.textures;
671 EXPECT_NE(textureRegistry, nil);
672 EXPECT_EQ(weakEngine, nil);
678 initWithAssetsPath:fixtures
679 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
682 allowHeadlessExecution:YES];
684 EXPECT_EQ([
engine valuePublishedByPlugin:
@"NoSuchPlugin"], nil);
690 initWithAssetsPath:fixtures
691 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
694 allowHeadlessExecution:YES];
695 NSString* pluginName =
@"MyPlugin";
697 [engine registrarForPlugin:pluginName];
701 EXPECT_EQ([
engine valuePublishedByPlugin:pluginName], [NSNull null]);
707 initWithAssetsPath:fixtures
708 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
711 allowHeadlessExecution:YES];
712 NSString* pluginName =
@"MyPlugin";
713 id<FlutterPluginRegistrar> registrar = [engine registrarForPlugin:pluginName];
715 NSString* firstValue =
@"A published value";
716 NSArray* secondValue = @[ @"A different published value" ];
718 [registrar publish:firstValue];
719 EXPECT_EQ([
engine valuePublishedByPlugin:pluginName], firstValue);
721 [registrar publish:secondValue];
722 EXPECT_EQ([
engine valuePublishedByPlugin:pluginName], secondValue);
735 NSString* channel =
@"_test_";
736 NSData* channel_data = [channel dataUsingEncoding:NSUTF8StringEncoding];
742 SendPlatformMessage, ([](
auto engine_,
auto message_) {
743 if (strcmp(message_->channel,
"test/send_message") == 0) {
745 std::string message = R
"|({"method": "a"})|";
746 std::string channel(reinterpret_cast<const char*>(message_->message),
747 message_->message_size);
748 reinterpret_cast<EmbedderEngine*>(engine_)
751 ->HandlePlatformMessage(std::make_unique<PlatformMessage>(
752 channel.c_str(), fml::MallocMapping::Copy(message.c_str(), message.length()),
753 fml::RefPtr<PlatformMessageResponse>()));
758 __block
int record = 0;
768 [engine.binaryMessenger sendOnChannel:@"test/send_message" message:channel_data];
769 EXPECT_EQ(record, 1);
779 [engine.binaryMessenger sendOnChannel:@"test/send_message" message:channel_data];
780 EXPECT_EQ(record, 11);
784 [engine.binaryMessenger sendOnChannel:@"test/send_message" message:channel_data];
785 EXPECT_EQ(record, 21);
792 __block
bool calledAfterClear =
false;
793 __block
bool valueAfterClear;
795 calledAfterClear =
true;
796 NSNumber* valueNumber = [result valueForKey:@"value"];
797 valueAfterClear = [valueNumber boolValue];
801 [engineMock handleMethodCall:methodCallAfterClear result:resultAfterClear];
803 EXPECT_FALSE(valueAfterClear);
810 __block
bool called =
false;
814 NSNumber* valueNumber = [result valueForKey:@"value"];
815 value = [valueNumber boolValue];
819 [engineMock handleMethodCall:methodCall result:result];
828 binaryMessenger:engine.binaryMessenger
830 __block
BOOL didCallCallback = NO;
834 didCallCallback = YES;
839 while (!didCallCallback) {
840 [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
848 binaryMessenger:engine.binaryMessenger
850 __block
BOOL didCallCallback = NO;
852 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
854 dispatch_async(dispatch_get_main_queue(), ^{
855 didCallCallback = YES;
861 while (!didCallCallback) {
862 [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
870 std::thread rasterThread([&threadSynchronizer] {
872 size:CGSizeMake(100, 100)
883 initWithAssetsPath:fixtures
884 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
892 EXPECT_EQ(viewController1.viewIdentifier, 0ll);
909 EXPECT_EQ(viewController1.viewIdentifier, 0ll);
918 allowHeadlessExecution:NO];
923 EXPECT_EQ(viewController1.viewIdentifier, 0ll);
931 EXPECT_EQ(viewController2.viewIdentifier, 0ll);
940 EXPECT_EQ(viewController1.viewIdentifier, 0ll);
945 __block NSString* nextResponse =
@"exit";
946 __block
BOOL triedToTerminate = NO;
949 terminator:^(id sender) {
950 triedToTerminate = TRUE;
953 OCMStub([engineMock terminationHandler]).andReturn(terminationHandler);
956 [engineMock binaryMessenger])
957 .andReturn(binaryMessengerMock);
958 OCMStub([engineMock sendOnChannel:
@"flutter/platform"
960 binaryReply:[OCMArg
any]])
961 .andDo((^(NSInvocation* invocation) {
962 [invocation retainArguments];
964 NSData* returnedMessage;
965 [invocation getArgument:&callback atIndex:4];
966 if ([nextResponse isEqualToString:
@"error"]) {
973 NSDictionary* responseDict = @{
@"response" : nextResponse};
979 __block NSString* calledAfterTerminate =
@"";
981 NSDictionary* resultDict =
result;
982 calledAfterTerminate = resultDict[@"response"];
989 triedToTerminate = NO;
990 calledAfterTerminate =
@"";
991 nextResponse =
@"cancel";
992 [engineMock handleMethodCall:methodExitApplication result:appExitResult];
993 EXPECT_STREQ([calledAfterTerminate UTF8String],
"");
998 triedToTerminate = NO;
999 calledAfterTerminate =
@"";
1000 nextResponse =
@"exit";
1001 [engineMock handleMethodCall:methodExitApplication result:appExitResult];
1002 EXPECT_STREQ([calledAfterTerminate UTF8String],
"exit");
1005 triedToTerminate = NO;
1006 calledAfterTerminate =
@"";
1007 nextResponse =
@"cancel";
1008 [engineMock handleMethodCall:methodExitApplication result:appExitResult];
1009 EXPECT_STREQ([calledAfterTerminate UTF8String],
"cancel");
1010 EXPECT_FALSE(triedToTerminate);
1013 triedToTerminate = NO;
1014 calledAfterTerminate =
@"";
1015 nextResponse =
@"error";
1016 [engineMock handleMethodCall:methodExitApplication result:appExitResult];
1017 EXPECT_STREQ([calledAfterTerminate UTF8String],
"");
1022 id<NSApplicationDelegate> previousDelegate = [[NSApplication sharedApplication] delegate];
1024 [NSApplication sharedApplication].delegate = plainDelegate;
1031 EXPECT_EQ([[[NSApplication sharedApplication] delegate] applicationShouldTerminate:NSApp],
1034 [NSApplication sharedApplication].delegate = previousDelegate;
1038 __block
BOOL announced = NO;
1041 OCMStub([engineMock announceAccessibilityMessage:[OCMArg
any]
1042 withPriority:NSAccessibilityPriorityMedium])
1043 .andDo((^(NSInvocation* invocation) {
1045 [invocation retainArguments];
1047 [invocation getArgument:&message atIndex:2];
1048 EXPECT_EQ(
message,
@"error message");
1051 NSDictionary<NSString*, id>* annotatedEvent =
1052 @{
@"type" :
@"announce",
1053 @"data" : @{
@"message" :
@"error message"}};
1055 [engineMock handleAccessibilityEvent:annotatedEvent];
1067 .andDo((^(NSInvocation* invocation) {
1071 .andDo((^(NSInvocation* invocation) {
1075 .andDo((^(NSInvocation* invocation) {
1079 .andDo((^(NSInvocation* invocation) {
1083 .andDo((^(NSInvocation* invocation) {
1087 __block NSApplicationOcclusionState visibility = NSApplicationOcclusionStateVisible;
1088 id mockApplication = OCMPartialMock([NSApplication sharedApplication]);
1089 OCMStub((NSApplicationOcclusionState)[mockApplication occlusionState])
1090 .andDo(^(NSInvocation* invocation) {
1091 [invocation setReturnValue:&visibility];
1094 NSNotification* willBecomeActive =
1095 [[NSNotification alloc] initWithName:NSApplicationWillBecomeActiveNotification
1098 NSNotification* willResignActive =
1099 [[NSNotification alloc] initWithName:NSApplicationWillResignActiveNotification
1103 NSNotification* didChangeOcclusionState;
1104 didChangeOcclusionState =
1105 [[NSNotification alloc] initWithName:NSApplicationDidChangeOcclusionStateNotification
1109 [engineMock handleDidChangeOcclusionState:didChangeOcclusionState];
1112 [engineMock handleWillBecomeActive:willBecomeActive];
1115 [engineMock handleWillResignActive:willResignActive];
1119 [engineMock handleDidChangeOcclusionState:didChangeOcclusionState];
1122 [engineMock handleWillBecomeActive:willBecomeActive];
1125 [engineMock handleWillResignActive:willResignActive];
1128 [mockApplication stopMocking];
1132 id<NSApplicationDelegate> previousDelegate = [[NSApplication sharedApplication] delegate];
1134 [NSApplication sharedApplication].delegate = fakeAppDelegate;
1139 [[engine registrarForPlugin:@"TestPlugin"] addApplicationDelegate:plugin];
1141 EXPECT_TRUE([fakeAppDelegate hasDelegate:plugin]);
1143 [NSApplication sharedApplication].delegate = previousDelegate;
1147 id<NSApplicationDelegate> previousDelegate = [[NSApplication sharedApplication] delegate];
1149 [NSApplication sharedApplication].delegate = fakeAppDelegate;
1156 [[engine registrarForPlugin:@"TestPlugin"] addApplicationDelegate:plugin];
1157 EXPECT_TRUE([fakeAppDelegate hasDelegate:plugin]);
1162 EXPECT_FALSE([fakeAppDelegate hasDelegate:plugin]);
1164 [NSApplication sharedApplication].delegate = previousDelegate;
1172 NotifyDisplayUpdate, ([&updated, &original_update_displays](
1173 auto engine,
auto update_type,
auto* displays,
auto display_count) {
1175 return original_update_displays(
engine, update_type, displays, display_count);
1182 [[NSNotificationCenter defaultCenter]
1183 postNotificationName:NSApplicationDidChangeScreenParametersNotification
1193 SendWindowMetricsEvent,
1194 ([&updated, &original_set_viewport_metrics](
auto engine,
auto* window_metrics) {
1196 return original_set_viewport_metrics(
engine, window_metrics);
1202 [[NSNotificationCenter defaultCenter] postNotificationName:NSWindowDidChangeScreenNotification
1205 EXPECT_FALSE(updated);
1210 [viewController loadView];
1213 [[NSNotificationCenter defaultCenter] postNotificationName:NSWindowDidChangeScreenNotification
1221 initWithAssetsPath:fixtures
1222 ICUDataPath:[fixtures stringByAppendingString:@"/icudtl.dat"]];
1226 allowHeadlessExecution:true];
1230 NotifyDisplayUpdate, ([&updated, &original_update_displays](
1231 auto engine,
auto update_type,
auto* displays,
auto display_count) {
1232 EXPECT_EQ(display_count, 1UL);
1233 EXPECT_EQ(displays->display_id, 10UL);
1234 EXPECT_EQ(displays->width, 60UL);
1235 EXPECT_EQ(displays->height, 80UL);
1236 EXPECT_EQ(displays->device_pixel_ratio, 2UL);
1238 return original_update_displays(
engine, update_type, displays, display_count);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterBinaryReply)(NSData *_Nullable reply)
void(^ FlutterResult)(id _Nullable result)
NSPointerArray * _delegates
int find(T *array, int N, T item)
FlutterEngine * engine() const
std::string GetOutput() const
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
struct _Dart_NativeArguments * Dart_NativeArguments
@ kFlutterLayerContentTypeBackingStore
struct _FlutterEngine * FLUTTER_API_SYMBOL(FlutterEngine)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
void setMessageHandler:(FlutterMessageHandler _Nullable handler)
void(* rootIsolateCreateCallback)(void *_Nullable)
FlutterEngineProcTable & embedderAPI()
NSObject< FlutterBinaryMessenger > * binaryMessenger
std::vector< std::string > switches()
FlutterViewController * viewController
instancetype errorWithCode:message:details:(NSString *code,[message] NSString *_Nullable message,[details] id _Nullable details)
instancetype sharedInstance()
instancetype methodCallWithMethodName:arguments:(NSString *method,[arguments] id _Nullable arguments)
void setMethodCallHandler:(FlutterMethodCallHandler _Nullable handler)
instancetype methodChannelWithName:binaryMessenger:codec:(NSString *name,[binaryMessenger] NSObject< FlutterBinaryMessenger > *messenger,[codec] NSObject< FlutterMethodCodec > *codec)
instancetype sharedInstance()
void performCommitForView:size:notify:(FlutterViewIdentifier viewIdentifier,[size] CGSize size,[notify] nonnull dispatch_block_t notify)
std::weak_ptr< flutter::AccessibilityBridgeMac > accessibilityBridge()
FlutterView * flutterView
NSArray< NSScreen * > * screens()
FlutterViewController * viewController
constexpr int64_t kImplicitViewId
const char * GetFixturesPath()
Returns the directory containing the test fixture for the target if this target has fixtures configur...
id CreateMockFlutterEngine(NSString *pasteboardString)
TEST_F(FlutterEngineTest, DisplaySizeIsInPhysicalPixel)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void Initialize(zx::channel directory_request, std::optional< zx::eventpair > view_ref)
Initializes Dart bindings for the Fuchsia application model.
API_AVAILABLE(ios(14.0), macos(11.0)) static NSString *MTLCommandEncoderErrorStateToString(MTLCommandEncoderErrorState state)
SIT bool any(const Vec< 1, T > &x)
#define MOCK_ENGINE_PROC(proc, mock_impl)
FlutterBackingStoreCreateCallback create_backing_store_callback
FlutterPresentViewCallback present_view_callback
FlutterBackingStoreCollectCallback collect_backing_store_callback
FlutterEngineSendWindowMetricsEventFnPtr SendWindowMetricsEvent
FlutterEngineInitializeFnPtr Initialize
FlutterEngineNotifyDisplayUpdateFnPtr NotifyDisplayUpdate
FlutterEngineSendPlatformMessageFnPtr SendPlatformMessage
FlutterEngineUpdateSemanticsEnabledFnPtr UpdateSemanticsEnabled
FlutterLayerContentType type
const char * increased_value
const char * tooltip
A textual tooltip attached to the node.
size_t custom_accessibility_actions_count
The number of custom accessibility action associated with this node.
int32_t text_selection_extent
The position at which the text selection terminates.
FlutterSemanticsAction actions
The set of semantics actions applicable to this node.
int32_t id
The unique identifier for this node.
size_t child_count
The number of children this node has.
const char * decreased_value
const char * label
A textual description of the node.
int32_t text_selection_base
The position at which the text selection originates.
const char * hint
A brief description of the result of performing an action on the node.
const char * value
A textual description of the current value of the node.
FlutterSemanticsFlag flags
The set of semantics flags associated with this node.
A batch of updates to semantics nodes and custom actions.
A structure to represent the width and height.
#define CREATE_NATIVE_ENTRY(native_entry)
#define EXPECT_TRUE(handle)