| Flutter macOS Embedder |

Classes | Functions | Variables
FlutterEngine.mm File Reference
`#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngine_Internal.h"`
`#include <algorithm>`
`#include <iostream>`
`#include <sstream>`
`#include <vector>`
`#include "flutter/common/constants.h"`
`#include "flutter/shell/platform/common/app_lifecycle_state.h"`
`#include "flutter/shell/platform/common/engine_switches.h"`
`#include "flutter/shell/platform/embedder/embedder.h"`
`#import "flutter/shell/platform/darwin/common/InternalFlutterSwiftCommon/InternalFlutterSwiftCommon.h"`
`#import "flutter/shell/platform/darwin/common/framework/Source/FlutterBinaryMessengerRelay.h"`
`#import "flutter/shell/platform/darwin/macos/InternalFlutterSwift/InternalFlutterSwift.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterAppDelegate_Internal.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject_Internal.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDisplayLink.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterMenuPlugin.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterMouseCursorPlugin.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderer.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTimeConverter.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterVSyncWaiter.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h"`
`#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewEngineProvider.h"`
`#import <CoreVideo/CoreVideo.h>`
`#import <IOSurface/IOSurface.h>`

Go to the source code of this file.

## Classes
class | FlutterEngineHandlerInfo
class | FlutterEngineRegistrar

## Functions
static FlutterLocale | FlutterLocaleFromNSLocale (NSLocale *locale)
static void | OnPlatformMessage (const FlutterPlatformMessage *message, void *user_data)

## Variables
NSString *const | kFlutterPlatformChannel = @"@"flutter/platform"
NSString *const | kFlutterSettingsChannel = @"@"flutter/settings"
NSString *const | kFlutterLifecycleChannel = @"@"flutter/lifecycle"
static NSString *const | kEnhancedUserInterfaceNotification
| The private notification for voice over. More...
static NSString *const | kEnhancedUserInterfaceKey = @"@"AXEnhancedUserInterface"
constexpr char | kTextPlainFormat [] = "text/plain"
| Clipboard plain text format. More...
FlutterTerminationCallback | _terminator
__weak FlutterEngine * | _flutterEngine
FlutterDartProject * | _project
NSMutableDictionary< NSString *, FlutterEngineHandlerInfo * > * | _messengerHandlers
FlutterBinaryMessengerConnection | _currentMessengerConnection
BOOL | _allowHeadlessExecution
_FlutterEngineAOTData * | _aotData
std::unique_ptr< flutter::FlutterCompositor > | _macOSCompositor
NSMapTable * | _viewControllers
FlutterCompositor | _compositor
FlutterMethodChannel * | _platformViewsChannel
FlutterPlatformViewController * | _platformViewController
FlutterWindowController * | _windowController
FlutterBasicMessageChannel * | _settingsChannel
FlutterBasicMessageChannel * | _accessibilityChannel
FlutterMethodChannel * | _platformChannel
FlutterMethodChannel * | _screenshotChannel
BOOL | _active
BOOL | _visible
FlutterBinaryMessengerRelay * | _binaryMessenger
NSMapTable< NSNumber *, FlutterVSyncWaiter * > * | _vsyncWaiters
__weak FlutterView * | _lastViewWithPointerEvent
FlutterKeyboardManager * | _keyboardManager
FlutterTextInputPlugin * | _textInputPlugin
BOOL | _multiViewEnabled
FlutterViewIdentifier | _nextViewIdentifier
static const int | kMainThreadPriority = 47

## Function Documentation

## ◆ FlutterLocaleFromNSLocale()

static FlutterLocale FlutterLocaleFromNSLocale | ( | NSLocale * | locale | ) |
| static

Constructs and returns a FlutterLocale struct corresponding to |locale|, which must outlive the returned struct.

Definition at line 51 of file FlutterEngine.mm.

51 {
52 FlutterLocale flutterLocale = {};
53 flutterLocale.struct_size = sizeof(FlutterLocale);
54 flutterLocale.language_code = [[locale objectForKey:NSLocaleLanguageCode] UTF8String];
55 flutterLocale.country_code = [[locale objectForKey:NSLocaleCountryCode] UTF8String];
56 flutterLocale.script_code = [[locale objectForKey:NSLocaleScriptCode] UTF8String];
57 flutterLocale.variant_code = [[locale objectForKey:NSLocaleVariantCode] UTF8String];
58 return flutterLocale;
59 }

## ◆ OnPlatformMessage()

static void OnPlatformMessage | ( | const FlutterPlatformMessage * | message,
|  | void * | user_data
| ) |  |
| static

Definition at line 408 of file FlutterEngine.mm.

408 {
409 FlutterEngine* engine = (__bridge FlutterEngine*)user_data;
410 [engine engineCallbackOnPlatformMessage:message];
411 }
FlutterEngine
Definition: FlutterEngine.h:32
user_data
void * user_data
Definition: texture_registrar_unittests.cc:27

References user_data.

## Variable Documentation

## ◆ _accessibilityChannel

FlutterBasicMessageChannel* _accessibilityChannel

Definition at line 462 of file FlutterEngine.mm.

## ◆ _active

BOOL _active

Definition at line 471 of file FlutterEngine.mm.

## ◆ _allowHeadlessExecution

BOOL _allowHeadlessExecution

Definition at line 430 of file FlutterEngine.mm.

## ◆ _aotData

_FlutterEngineAOTData* _aotData

Definition at line 433 of file FlutterEngine.mm.

## ◆ _binaryMessenger

FlutterBinaryMessengerRelay* _binaryMessenger

Definition at line 477 of file FlutterEngine.mm.

Referenced by FlutterInputPluginTestObjc::testClearClientDuringComposing.

## ◆ _compositor

FlutterCompositor _compositor

Definition at line 445 of file FlutterEngine.mm.

## ◆ _currentMessengerConnection

FlutterBinaryMessengerConnection _currentMessengerConnection

Definition at line 427 of file FlutterEngine.mm.

## ◆ _flutterEngine

__weak FlutterEngine* _flutterEngine

Initial value:
{
NSString* _pluginKey

Definition at line 325 of file FlutterEngine.mm.

## ◆ _keyboardManager

FlutterKeyboardManager* _keyboardManager

Definition at line 488 of file FlutterEngine.mm.

## ◆ _lastViewWithPointerEvent

__weak FlutterView* _lastViewWithPointerEvent

Definition at line 485 of file FlutterEngine.mm.

## ◆ _macOSCompositor

std::unique_ptr<flutter::FlutterCompositor> _macOSCompositor

Definition at line 437 of file FlutterEngine.mm.

## ◆ _messengerHandlers

NSMutableDictionary<NSString*, FlutterEngineHandlerInfo*>* _messengerHandlers

Definition at line 423 of file FlutterEngine.mm.

## ◆ _multiViewEnabled

BOOL _multiViewEnabled

Definition at line 496 of file FlutterEngine.mm.

## ◆ _nextViewIdentifier

FlutterViewIdentifier _nextViewIdentifier

Definition at line 500 of file FlutterEngine.mm.

## ◆ _platformChannel

FlutterMethodChannel* _platformChannel

Definition at line 465 of file FlutterEngine.mm.

## ◆ _platformViewController

FlutterPlatformViewController* _platformViewController

Definition at line 453 of file FlutterEngine.mm.

## ◆ _platformViewsChannel

FlutterMethodChannel* _platformViewsChannel

Definition at line 449 of file FlutterEngine.mm.

## ◆ _project

FlutterDartProject* _project

Initial value:
{
FLUTTER_API_SYMBOL(FlutterEngine) _engine

Definition at line 420 of file FlutterEngine.mm.

## ◆ _screenshotChannel

FlutterMethodChannel* _screenshotChannel

Definition at line 468 of file FlutterEngine.mm.

## ◆ _settingsChannel

FlutterBasicMessageChannel* _settingsChannel

Definition at line 459 of file FlutterEngine.mm.

## ◆ _terminator

FlutterTerminationCallback _terminator

Initial value:
{
__weak FlutterEngine* _engine

Definition at line 192 of file FlutterEngine.mm.

## ◆ _textInputPlugin

FlutterTextInputPlugin* _textInputPlugin

Definition at line 491 of file FlutterEngine.mm.

## ◆ _viewControllers

NSMapTable* _viewControllers

Definition at line 442 of file FlutterEngine.mm.

## ◆ _visible

BOOL _visible

Definition at line 474 of file FlutterEngine.mm.

## ◆ _vsyncWaiters

NSMapTable<NSNumber*, FlutterVSyncWaiter*>* _vsyncWaiters

Definition at line 481 of file FlutterEngine.mm.

## ◆ _windowController

FlutterWindowController* _windowController

Definition at line 456 of file FlutterEngine.mm.

## ◆ kEnhancedUserInterfaceKey

NSString* const kEnhancedUserInterfaceKey = @"@"AXEnhancedUserInterface"
| static

Definition at line 64 of file FlutterEngine.mm.

## ◆ kEnhancedUserInterfaceNotification

NSString* const kEnhancedUserInterfaceNotification
| static

Initial value:
=
@"@"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification"

The private notification for voice over.

Definition at line 62 of file FlutterEngine.mm.

## ◆ kFlutterLifecycleChannel

NSString* const kFlutterLifecycleChannel = @"@"flutter/lifecycle"

Definition at line 43 of file FlutterEngine.mm.

## ◆ kFlutterPlatformChannel

NSString* const kFlutterPlatformChannel = @"@"flutter/platform"

Definition at line 41 of file FlutterEngine.mm.

## ◆ kFlutterSettingsChannel

NSString* const kFlutterSettingsChannel = @"@"flutter/settings"

Definition at line 42 of file FlutterEngine.mm.

## ◆ kMainThreadPriority

const int kMainThreadPriority = 47
| static

Definition at line 510 of file FlutterEngine.mm.

Referenced by FlutterEngine::shutDownEngine.

## ◆ kTextPlainFormat

constexpr char kTextPlainFormat[] = "text/plain"
| constexpr

Clipboard plain text format.

Definition at line 67 of file FlutterEngine.mm.