Flutter Engine
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 SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_VIEW_H_
6 #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_VIEW_H_
7 
8 #import <UIKit/UIKit.h>
9 
10 #include <memory>
11 
12 #include "flutter/fml/memory/weak_ptr.h"
13 #include "flutter/shell/common/shell.h"
14 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h"
15 #import "flutter/shell/platform/darwin/ios/ios_context.h"
16 #import "flutter/shell/platform/darwin/ios/ios_surface.h"
17 
18 @protocol FlutterViewEngineDelegate <NSObject>
19 
20 - (flutter::Rasterizer::Screenshot)takeScreenshot:(flutter::Rasterizer::ScreenshotType)type
21  asBase64Encoded:(BOOL)base64Encode;
22 
23 - (flutter::FlutterPlatformViewsController*)platformViewsController;
24 @end
25 
26 @interface FlutterView : UIView
27 
28 - (instancetype)init NS_UNAVAILABLE;
29 + (instancetype)new NS_UNAVAILABLE;
30 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
31 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
32 
33 - (instancetype)initWithDelegate:(id<FlutterViewEngineDelegate>)delegate
34  opaque:(BOOL)opaque NS_DESIGNATED_INITIALIZER;
35 - (std::unique_ptr<flutter::IOSSurface>)createSurface:(std::shared_ptr<flutter::IOSContext>)context;
36 
37 // Set by FlutterEngine or FlutterViewController to override software rendering.
38 @property(class, nonatomic) BOOL forceSoftwareRendering;
39 @end
40 
41 #endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_VIEW_H_
BOOL forceSoftwareRendering
Definition: FlutterView.h:38
Definition: ref_ptr.h:252
instancetype NS_UNAVAILABLE()