forked from flutter-team-archive/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlutterEngine_Internal.h
More file actions
94 lines (73 loc) · 2.8 KB
/
Copy pathFlutterEngine_Internal.h
File metadata and controls
94 lines (73 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"
#import <Cocoa/Cocoa.h>
#include <memory>
#import "flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderer.h"
@interface FlutterEngine ()
/**
* True if the engine is currently running.
*/
@property(nonatomic, readonly) BOOL running;
/**
* Provides the renderer config needed to initialize the engine and also handles external
* texture management.
*/
@property(nonatomic, readonly, nullable) FlutterRenderer* renderer;
/**
* Function pointers for interacting with the embedder.h API.
*/
@property(nonatomic) FlutterEngineProcTable& embedderAPI;
/**
* True if the semantics is enabled. The Flutter framework starts sending
* semantics update through the embedder as soon as it is set to YES.
*/
@property(nonatomic) BOOL semanticsEnabled;
/**
* The executable name for the current process.
*/
@property(nonatomic, readonly, nonnull) NSString* executableName;
/**
* This just returns the NSPasteboard so that it can be mocked in the tests.
*/
@property(nonatomic, readonly, nonnull) NSPasteboard* pasteboard;
/**
* Informs the engine that the associated view controller's view size has changed.
*/
- (void)updateWindowMetrics;
/**
* Dispatches the given pointer event data to engine.
*/
- (void)sendPointerEvent:(const FlutterPointerEvent&)event;
/**
* Dispatches the given pointer event data to engine.
*/
- (void)sendKeyEvent:(const FlutterKeyEvent&)event
callback:(nullable FlutterKeyEventCallback)callback
userData:(nullable void*)userData;
/**
* Registers an external texture with the given id. Returns YES on success.
*/
- (BOOL)registerTextureWithID:(int64_t)textureId;
/**
* Marks texture with the given id as available. Returns YES on success.
*/
- (BOOL)markTextureFrameAvailable:(int64_t)textureID;
/**
* Unregisters an external texture with the given id. Returns YES on success.
*/
- (BOOL)unregisterTextureWithID:(int64_t)textureID;
- (nonnull FlutterPlatformViewController*)platformViewController;
// Accessibility API.
/**
* Dispatches semantics action back to the framework. The semantics must be enabled by calling
* the updateSemanticsEnabled before dispatching semantics actions.
*/
- (void)dispatchSemanticsAction:(FlutterSemanticsAction)action
toTarget:(uint16_t)target
withData:(fml::MallocMapping)data;
@end