#include <platform_view_ios.h>
Public Member Functions | |
PlatformViewIOS (PlatformView::Delegate &delegate, const std::shared_ptr< IOSContext > &context, __weak FlutterPlatformViewsController *platform_views_controller, const flutter::TaskRunners &task_runners) | |
PlatformViewIOS (PlatformView::Delegate &delegate, IOSRenderingAPI rendering_api, __weak 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 | |
FlutterViewController * | GetOwnerViewController () const __attribute__((cf_audited_transfer)) |
void | SetOwnerViewController (__weak FlutterViewController *owner_controller) |
void | attachView () |
void | RegisterExternalTexture (int64_t id, NSObject< FlutterTexture > *texture) |
PointerDataDispatcherMaker | GetDispatcherMaker () override |
void | SetSemanticsEnabled (bool enabled) override |
void | HandlePlatformMessage (std::unique_ptr< flutter::PlatformMessage > message) override |
std::unique_ptr< Surface > | CreateRenderingSurface () override |
std::shared_ptr< ExternalViewEmbedder > | CreateExternalViewEmbedder () override |
std::shared_ptr< impeller::Context > | GetImpellerContext () const override |
void | SetAccessibilityFeatures (int32_t flags) override |
void | UpdateSemantics (int64_t view_id, flutter::SemanticsNodeUpdates update, flutter::CustomAccessibilityActionUpdates actions) override |
std::unique_ptr< VsyncWaiter > | CreateVSyncWaiter () override |
void | OnPreEngineRestart () const override |
std::unique_ptr< std::vector< std::string > > | ComputePlatformResolvedLocales (const std::vector< std::string > &supported_locale_data) 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 Impeller AiksContext 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 39 of file platform_view_ios.h.
flutter::PlatformViewIOS::PlatformViewIOS | ( | PlatformView::Delegate & | delegate, |
const std::shared_ptr< IOSContext > & | context, | ||
__weak FlutterPlatformViewsController * | platform_views_controller, | ||
const flutter::TaskRunners & | task_runners | ||
) |
Definition at line 44 of file platform_view_ios.mm.
|
explicit |
Definition at line 55 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 114 of file platform_view_ios.mm.
References flutter::IOSSurface::Create().
Referenced by SetOwnerViewController().
|
override |
Definition at line 212 of file platform_view_ios.mm.
|
override |
Definition at line 153 of file platform_view_ios.mm.
|
override |
Definition at line 141 of file platform_view_ios.mm.
|
override |
Definition at line 197 of file platform_view_ios.mm.
|
override |
Definition at line 129 of file platform_view_ios.mm.
|
override |
Definition at line 158 of file platform_view_ios.mm.
|
inline |
Accessor for the IOSContext
associated with the platform view.
Definition at line 121 of file platform_view_ios.h.
FlutterViewController * flutter::PlatformViewIOS::GetOwnerViewController | ( | ) | const |
Returns the FlutterViewController
currently attached to the FlutterEngine
owning this PlatformViewIOS.
Definition at line 79 of file platform_view_ios.mm.
|
inlineoverride |
Definition at line 127 of file platform_view_ios.h.
|
inline |
Definition at line 123 of file platform_view_ios.h.
|
override |
Definition at line 75 of file platform_view_ios.mm.
|
override |
Definition at line 201 of file platform_view_ios.mm.
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.
|
override |
Definition at line 180 of file platform_view_ios.mm.
void flutter::PlatformViewIOS::SetOwnerViewController | ( | __weak 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 83 of file platform_view_ios.mm.
References attachView(), and FlutterViewControllerWillDealloc.
|
override |
Definition at line 163 of file platform_view_ios.mm.
|
override |
Definition at line 185 of file platform_view_ios.mm.
References FlutterSemanticsUpdateNotification.