| Flutter iOS Embedder |

FlutterView.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEW_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEW_H_
7
8 #import <Metal/Metal.h>
9 #import <UIKit/UIKit.h>
10
11 #include "flutter/shell/common/rasterizer.h"
12 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h"
13
14 @protocol FlutterViewEngineDelegate <NSObject>
15
16 @property(nonatomic, readonly) BOOL isUsingImpeller;
17 @property(nonatomic, readonly) FlutterPlatformViewsController* platformViewsController;
18
19 - (flutter::Rasterizer::Screenshot)takeScreenshot:(flutter::Rasterizer::ScreenshotType)type
20 asBase64Encoded:(BOOL)base64Encode;
21
22 /**
23 * A callback that is called when iOS queries accessibility information of the Flutter view.
24 *
25 * This is useful to predict the current iOS accessibility status. For example, there is
26 * no API to listen whether voice control is turned on or off. The Flutter engine uses
27 * this callback to enable semantics in order to catch the case that voice control is
28 * on.
29 */
30 - (void)flutterViewAccessibilityDidCall;
31 @end
32
33 @interface FlutterView : UIView
34
35 - (instancetype)init NS_UNAVAILABLE;
36 + (instancetype)new NS_UNAVAILABLE;
37 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
38 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
39
40 - (instancetype)initWithDelegate:(id<FlutterViewEngineDelegate>)delegate
41 opaque:(BOOL)opaque
42 enableWideGamut:(BOOL)isWideGamutEnabled NS_DESIGNATED_INITIALIZER;
43
44 - (UIScreen*)screen;
45 - (MTLPixelFormat)pixelFormat;
46
47 // Set by FlutterEngine or FlutterViewController to override software rendering.
48 @property(class, nonatomic) BOOL forceSoftwareRendering;
49 @end
50
51 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEW_H_
FlutterPlatformViews_Internal.h
NS_UNAVAILABLE
instancetype init NS_UNAVAILABLE
Definition: FlutterTextInputPlugin.h:169
initWithFrame
instancetype initWithFrame
Definition: FlutterTextInputPlugin.h:172
initWithCoder
instancetype initWithCoder
Definition: FlutterTextInputPlugin.h:171
FlutterPlatformViewsController
Definition: FlutterPlatformViewsController.h:32
FlutterView
Definition: FlutterView.h:34
-[FlutterView screen]
UIScreen * screen()
Definition: FlutterView.mm:35
-[FlutterView pixelFormat]
MTLPixelFormat pixelFormat()
Definition: FlutterView.mm:42
FlutterView::forceSoftwareRendering
BOOL forceSoftwareRendering
Definition: FlutterView.h:48
flutter
Definition: accessibility_bridge.h:27
FlutterViewEngineDelegate-p
Definition: FlutterView.h:14
FlutterViewEngineDelegate-p::isUsingImpeller
BOOL isUsingImpeller
Definition: FlutterView.h:16
FlutterViewEngineDelegate-p::platformViewsController
FlutterPlatformViewsController * platformViewsController
Definition: FlutterView.h:17
-[FlutterViewEngineDelegate-p flutterViewAccessibilityDidCall]
void flutterViewAccessibilityDidCall()