Flutter Engine
FlutterOverlayView.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_OVERLAY_VIEW_H_
6 #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_OVERLAY_VIEW_H_
7 
8 #include <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/ios_context_gl.h"
15 #import "flutter/shell/platform/darwin/ios/ios_surface.h"
16 #import "flutter/shell/platform/darwin/ios/ios_surface_gl.h"
17 
18 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h"
19 
20 /// UIViews that are used by |FlutterPlatformViews| to present Flutter
21 /// rendering on top of system compositor rendering (ex. a web view).
22 ///
23 /// When there is a view composited by the system compositor within a Flutter
24 /// view hierarchy, instead of rendering into a single render target, Flutter
25 /// renders into multiple render targets (depending on the number of
26 /// interleaving levels between Flutter & non-Flutter contents). While the
27 /// FlutterView contains the backing store for the root render target, the
28 /// FlutterOverlay view contains the backing stores for the rest. The overlay
29 /// views also handle touch propagation and the like for touches that occurs
30 /// either on overlays or otherwise may be intercepted by the platform views.
31 @interface FlutterOverlayView : UIView
32 
33 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
34 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
35 
36 - (instancetype)init NS_DESIGNATED_INITIALIZER;
37 - (instancetype)initWithContentsScale:(CGFloat)contentsScale;
38 - (std::unique_ptr<flutter::IOSSurface>)createSurface:
39  (std::shared_ptr<flutter::IOSContext>)ios_context;
40 
41 @end
42 
43 #endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_OVERLAY_VIEW_H_
instancetype NS_DESIGNATED_INITIALIZER()
Definition: ref_ptr.h:252