Flutter Engine
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 <vector>
#import "flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacDelegate.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterDartProject_Internal.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterExternalTextureGL.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterGLCompositor.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalCompositor.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterMetalRenderer.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterOpenGLRenderer.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderingBackend.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h"
#include "flutter/shell/platform/embedder/embedder.h"

Go to the source code of this file.

Classes

class  FlutterEngineRegistrar
 

Functions

static FlutterLocale FlutterLocaleFromNSLocale (NSLocale *locale)
 
static void OnPlatformMessage (const FlutterPlatformMessage *message, FlutterEngine *engine)
 

Variables

FlutterEngine_flutterEngine
 
std::shared_ptr< flutter::AccessibilityBridge_bridge
 
FlutterDartProject_project
 
NSMutableDictionary< NSString *, FlutterBinaryMessageHandler > * _messageHandlers
 
BOOL _allowHeadlessExecution
 
_FlutterEngineAOTData_aotData
 
std::unique_ptr< flutter::FlutterCompositor_macOSCompositor
 
FlutterCompositor _compositor
 

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 26 of file FlutterEngine.mm.

References FlutterLocale::country_code, FlutterEngineRegistrar::flutterEngine, FlutterLocale::language_code, FlutterLocale::script_code, FlutterLocale::struct_size, and FlutterLocale::variant_code.

26  {
27  FlutterLocale flutterLocale = {};
28  flutterLocale.struct_size = sizeof(FlutterLocale);
29  flutterLocale.language_code = [[locale objectForKey:NSLocaleLanguageCode] UTF8String];
30  flutterLocale.country_code = [[locale objectForKey:NSLocaleCountryCode] UTF8String];
31  flutterLocale.script_code = [[locale objectForKey:NSLocaleScriptCode] UTF8String];
32  flutterLocale.variant_code = [[locale objectForKey:NSLocaleVariantCode] UTF8String];
33  return flutterLocale;
34 }
size_t struct_size
This size of this struct. Must be sizeof(FlutterLocale).
Definition: embedder.h:1152
const char * variant_code
Definition: embedder.h:1171
const char * script_code
Definition: embedder.h:1166
const char * country_code
Definition: embedder.h:1161
const char * language_code
Definition: embedder.h:1156

◆ OnPlatformMessage()

static void OnPlatformMessage ( const FlutterPlatformMessage message,
FlutterEngine engine 
)
static

Definition at line 118 of file FlutterEngine.mm.

118  {
119  [engine engineCallbackOnPlatformMessage:message];
120 }

Variable Documentation

◆ _allowHeadlessExecution

BOOL _allowHeadlessExecution

Definition at line 138 of file FlutterEngine.mm.

◆ _aotData

Definition at line 141 of file FlutterEngine.mm.

◆ _bridge

std::shared_ptr<flutter::AccessibilityBridge> _bridge
Initial value:
{
struct _FlutterEngine * FLUTTER_API_SYMBOL(FlutterEngine)
Definition: embedder.h:228
fml::scoped_nsobject< FlutterEngine > _engine

Definition at line 124 of file FlutterEngine.mm.

Referenced by FlutterEngine::shutDownEngine.

◆ _compositor

FlutterCompositor _compositor

Definition at line 149 of file FlutterEngine.mm.

◆ _flutterEngine

FlutterEngine* _flutterEngine
Initial value:
{
NSString* _pluginKey

Definition at line 75 of file FlutterEngine.mm.

Referenced by FlutterEngineRegistrar::initWithPlugin:flutterEngine:.

◆ _macOSCompositor

std::unique_ptr<flutter::FlutterCompositor> _macOSCompositor

Definition at line 146 of file FlutterEngine.mm.

Referenced by FlutterEngine::shutDownEngine.

◆ _messageHandlers

NSMutableDictionary<NSString*, FlutterBinaryMessageHandler>* _messageHandlers

Definition at line 135 of file FlutterEngine.mm.

Referenced by FlutterEngine::shutDownEngine.

◆ _project

FlutterDartProject* _project

Definition at line 132 of file FlutterEngine.mm.

Referenced by FlutterViewController::initWithProject:.