#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, __weak FlutterPlatformViewsController *platform_views_controller, const flutter::TaskRunners &task_runners, 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 (FlutterView *previousView=nil) |
| void | RegisterExternalTexture (int64_t id, NSObject< FlutterTexture > *texture) |
| void | SetSemanticsTreeEnabled (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 | UpdateSemantics (int64_t view_id, flutter::SemanticsNodeUpdates update, flutter::CustomAccessibilityActionUpdates actions) override |
| void | SetApplicationLocale (std::string locale) 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 |
| AccessibilityBridge * | GetAccessibilityBridge () |
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 FlutterViewControllers and FlutterViews.
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 24 of file platform_view_ios.mm.
|
explicit |
Definition at line 34 of file platform_view_ios.mm.
|
overridedefault |
| void flutter::PlatformViewIOS::attachView | ( | FlutterView * | previousView = nil | ) |
Called one time per FlutterViewController when the FlutterViewController's UIView is first loaded.
Can be used to perform late initialization after FlutterViewController's init.
The previousView is the Flutter view that was attached before this one, if any.
Definition at line 98 of file platform_view_ios.mm.
References flutter::IOSSurface::Create().
Referenced by SetOwnerViewController().
|
override |
Definition at line 197 of file platform_view_ios.mm.
|
override |
Definition at line 134 of file platform_view_ios.mm.
|
override |
Definition at line 122 of file platform_view_ios.mm.
|
override |
Definition at line 179 of file platform_view_ios.mm.
|
inline |
Gets the accessibility bridge created in this platform view.
Definition at line 131 of file platform_view_ios.h.
|
override |
Definition at line 139 of file platform_view_ios.mm.
|
inline |
Accessor for the IOSContext associated with the platform view.
Definition at line 118 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 52 of file platform_view_ios.mm.
|
inlineoverride |
Definition at line 124 of file platform_view_ios.h.
|
inline |
Definition at line 120 of file platform_view_ios.h.
|
override |
Definition at line 48 of file platform_view_ios.mm.
|
override |
Definition at line 184 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 116 of file platform_view_ios.mm.
References texture_id.
|
override |
Definition at line 163 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 56 of file platform_view_ios.mm.
References attachView(), and FlutterViewControllerWillDealloc.
|
override |
Definition at line 169 of file platform_view_ios.mm.
|
override |
Definition at line 144 of file platform_view_ios.mm.