#include <platform_view_ios.h>
Public Member Functions | |
PlatformViewIOS (PlatformView::Delegate &delegate, const std::shared_ptr< IOSContext > &context, const std::shared_ptr< FlutterPlatformViewsController > &platform_views_controller, const flutter::TaskRunners &task_runners) | |
PlatformViewIOS (PlatformView::Delegate &delegate, IOSRenderingAPI rendering_api, const std::shared_ptr< FlutterPlatformViewsController > &platform_views_controller, const flutter::TaskRunners &task_runners, const std::shared_ptr< fml::ConcurrentTaskRunner > &worker_task_runner, const std::shared_ptr< const fml::SyncSwitch > &is_gpu_disabled_sync_switch) | |
~PlatformViewIOS () override | |
fml::WeakNSObject< FlutterViewController > | GetOwnerViewController () const |
void | SetOwnerViewController (const fml::WeakNSObject< FlutterViewController > &owner_controller) |
void | attachView () |
void | RegisterExternalTexture (int64_t id, NSObject< FlutterTexture > *texture) |
PointerDataDispatcherMaker | GetDispatcherMaker () override |
void | SetSemanticsEnabled (bool enabled) override |
const std::shared_ptr< IOSContext > & | GetIosContext () |
std::shared_ptr< PlatformMessageHandlerIos > | GetPlatformMessageHandlerIos () const |
std::shared_ptr< PlatformMessageHandler > | GetPlatformMessageHandler () const override |
A bridge connecting the platform agnostic shell and the iOS embedding.
The shell provides and requests for UI related data and this PlatformView subclass fulfills it with iOS specific capabilities. As an example, the iOS embedding (the FlutterEngine
and the FlutterViewController
) sends pointer data to the shell and receives the shell's request for a Skia GrDirectContext and supplies it.
Despite the name "view", this class is unrelated to UIViews on iOS and doesn't have the same lifecycle. It's a long lived bridge owned by the FlutterEngine
and can be attached and detached sequentially to multiple FlutterViewController
s and FlutterView
s.
Definition at line 41 of file platform_view_ios.h.
flutter::PlatformViewIOS::PlatformViewIOS | ( | PlatformView::Delegate & | delegate, |
const std::shared_ptr< IOSContext > & | context, | ||
const std::shared_ptr< FlutterPlatformViewsController > & | platform_views_controller, | ||
const flutter::TaskRunners & | task_runners | ||
) |
Definition at line 42 of file platform_view_ios.mm.
|
explicit |
Definition at line 54 of file platform_view_ios.mm.
References flutter::kImpeller, and flutter::kSkia.
|
overridedefault |
void flutter::PlatformViewIOS::attachView | ( | ) |
Called one time per FlutterViewController
when the FlutterViewController
's UIView is first loaded.
Can be used to perform late initialization after FlutterViewController
's init.
Definition at line 113 of file platform_view_ios.mm.
References flutter::IOSSurface::Create().
Referenced by SetOwnerViewController().
|
override |
Definition at line 129 of file platform_view_ios.mm.
|
inline |
Accessor for the IOSContext
associated with the platform view.
Definition at line 93 of file platform_view_ios.h.
fml::WeakNSObject< FlutterViewController > flutter::PlatformViewIOS::GetOwnerViewController | ( | ) | const |
Returns the FlutterViewController
currently attached to the FlutterEngine
owning this PlatformViewIOS.
Definition at line 77 of file platform_view_ios.mm.
|
inlineoverride |
Definition at line 99 of file platform_view_ios.h.
|
inline |
Definition at line 95 of file platform_view_ios.h.
void flutter::PlatformViewIOS::RegisterExternalTexture | ( | int64_t | id, |
NSObject< FlutterTexture > * | texture | ||
) |
Called through when an external texture such as video or camera is given to the FlutterEngine
or FlutterViewController
.
Definition at line 135 of file platform_view_ios.mm.
References texture_id.
void flutter::PlatformViewIOS::SetOwnerViewController | ( | const fml::WeakNSObject< FlutterViewController > & | owner_controller | ) |
Updates the FlutterViewController
currently attached to the FlutterEngine
owning this PlatformViewIOS. This should be updated when the FlutterEngine
is given a new FlutterViewController
.
Definition at line 81 of file platform_view_ios.mm.
References attachView(), and FlutterViewControllerWillDealloc.
|
override |
Definition at line 169 of file platform_view_ios.mm.