Flutter Engine
 
Loading...
Searching...
No Matches
FlutterViewController() Category Reference

#include <FlutterViewController_Internal.h>

Inheritance diagram for FlutterViewController():
<FlutterBinaryMessenger> <FlutterViewResponder> <FlutterKeyboardManagerEventContext>

Instance Methods

(UIHoverGestureRecognizer *hoverGestureRecognizer) - API_AVAILABLE
 
(UIPanGestureRecognizer *discreteScrollingPanGestureRecognizer) - API_AVAILABLE
 
(UIPanGestureRecognizer *continuousScrollingPanGestureRecognizer) - API_AVAILABLE
 
(UIPinchGestureRecognizer *pinchGestureRecognizer) - API_AVAILABLE
 
(UIRotationGestureRecognizer *rotationGestureRecognizer) - API_AVAILABLE
 
(void) - addInternalPlugins
 Creates and registers plugins used by this view controller.
 
(void) - deregisterNotifications
 
(void) - onFirstFrameRendered
 Called when the first frame has been rendered. Invokes any registered first-frame callback.
 
(void) - handleKeyboardAnimationCallbackWithTargetTime:
 Handles updating viewport metrics on keyboard animation.
 
(FlutterRestorationPlugin *) - restorationPlugin
 
(FlutterTextInputPlugin *) - textInputPlugin
 
(void) - handlePressEvent:nextAction:
 
(void) - addInternalPlugins
 
(void) - deregisterNotifications
 
(int32_t) - accessibilityFlags
 
(BOOL- supportsShowingSystemContextMenu
 
(BOOL- stateIsActive
 
(BOOL- stateIsBackground
 
(BOOL- launchEngine
 
(void) - configureTrackingArea
 
(void) - dispatchMouseEvent:
 
(void) - dispatchGestureEvent:
 
(void) - dispatchMouseEvent:phase:
 
(BOOL- isDispatchingKeyEvent:
 
(void) - setUpWithEngine:viewIdentifier:
 
(void) - detachFromEngine
 
(void) - notifySemanticsEnabledChanged
 
(void) - updateSemantics:
 
(void) - dispose
 
- Instance Methods inherited from <FlutterBinaryMessenger>
(NSObject< FlutterTaskQueue > *) - makeBackgroundTaskQueue
 TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.
 
(FlutterBinaryMessengerConnection- setMessageHandlerOnChannel:binaryMessageHandler:taskQueue:
 
(void) - sendOnChannel:message:
 
(void) - sendOnChannel:message:binaryReply:
 
(FlutterBinaryMessengerConnection- setMessageHandlerOnChannel:binaryMessageHandler:
 
(void) - cleanUpConnection:
 
- Instance Methods inherited from <FlutterViewResponder>
(void) - touchesBegan:withEvent:
 
(void) - touchesMoved:withEvent:
 
(void) - touchesEnded:withEvent:
 
(void) - touchesCancelled:withEvent:
 
(void) - touchesEstimatedPropertiesUpdated:
 
(void) - forceTouchesCancelled:
 
- Instance Methods inherited from <FlutterKeyboardManagerEventContext>
(BOOL- onTextInputKeyEvent:
 

Properties

int64_t viewIdentifier
 
FlutterViewflutterView
 
void(^ flutterViewRenderedCallback )(void)
 
UIInterfaceOrientationMask orientationPreferences
 
UIStatusBarStyle statusBarStyle
 
BOOL initialized
 
BOOL engineNeedsLaunch
 
BOOL awokenFromNib
 
BOOL displayingFlutterUI
 
BOOL isHomeIndicatorHidden
 
BOOL isPresentingViewControllerAnimating
 
BOOL flutterPrefersStatusBarHidden
 
NSMutableSet< NSNumber * > * ongoingTouches
 
UIScrollView * scrollView
 
UIView * keyboardAnimationView
 
SpringAnimationkeyboardSpringAnimation
 
BOOL shouldIgnoreViewportMetricsUpdatesDuringRotation
 
CGFloat targetViewInsetBottom
 
CGFloat originalViewInsetBottom
 
VSyncClientkeyboardAnimationVSyncClient
 
BOOL keyboardAnimationIsShowing
 
fml::TimePoint keyboardAnimationStartTime
 
BOOL isKeyboardInOrTransitioningFromBackground
 
NSTimeInterval scrollInertiaEventStartline
 Timestamp after which a scroll inertia cancel event should be inferred.
 
NSTimeInterval scrollInertiaEventAppKitDeadline
 
VSyncClienttouchRateCorrectionVSyncClient
 
BOOL accessibilityIsOnOffSwitchLabelsEnabled
 
BOOL isPresentingViewController
 
BOOL isVoiceOverRunning
 
FlutterKeyboardManagerkeyboardManager
 
NSString * applicationLocale
 
BOOL prefersStatusBarHidden
 Whether the status bar is preferred hidden.
 
FlutterPlatformViewsControllerplatformViewsController
 
NSTrackingArea * trackingArea
 
MouseState mouseState
 
id keyUpMonitor
 
std::weak_ptr< flutter::AccessibilityBridgeMacaccessibilityBridge
 
- Properties inherited from <FlutterViewResponder>
UIView * view
 
- Properties inherited from <FlutterKeyboardManagerEventContext>
NSResponder * nextResponder
 

Detailed Description

Private interface declaration for FlutterViewController.

Definition at line 67 of file FlutterViewController.mm.

Method Documentation

◆ accessibilityFlags

- (int32_t) accessibilityFlags

◆ addInternalPlugins [1/2]

- (void) addInternalPlugins

Creates and registers plugins used by this view controller.

◆ addInternalPlugins [2/2]

- (void) addInternalPlugins

◆ API_AVAILABLE [1/5]

- (UIHoverGestureRecognizer *hoverGestureRecognizer) API_AVAILABLE (ios(13.4)) 

◆ API_AVAILABLE [2/5]

- (UIPanGestureRecognizer *discreteScrollingPanGestureRecognizer) API_AVAILABLE (ios(13.4)) 

◆ API_AVAILABLE [3/5]

- (UIPanGestureRecognizer *continuousScrollingPanGestureRecognizer) API_AVAILABLE (ios(13.4)) 

◆ API_AVAILABLE [4/5]

- (UIPinchGestureRecognizer *pinchGestureRecognizer) API_AVAILABLE (ios(13.4)) 

◆ API_AVAILABLE [5/5]

- (UIRotationGestureRecognizer *rotationGestureRecognizer) API_AVAILABLE (ios(13.4)) 

◆ configureTrackingArea

- (void) configureTrackingArea

Updates |trackingArea| for the current tracking settings, creating it with the correct mode if tracking is enabled, or removing it if not.

◆ deregisterNotifications [1/2]

- (void) deregisterNotifications

◆ deregisterNotifications [2/2]

- (void) deregisterNotifications

◆ detachFromEngine

- (void) detachFromEngine

Reset the engine and id of this controller.

This method is called by FlutterEngine.

◆ dispatchGestureEvent:

- (void) dispatchGestureEvent: (nonnull NSEvent *)  event

Calls dispatchMouseEvent:phase: with a phase determined by event.phase.

◆ dispatchMouseEvent:

- (void) dispatchMouseEvent: (nonnull NSEvent *)  event

Calls dispatchMouseEvent:phase: with a phase determined by self.mouseState.

mouseState.buttons should be updated before calling this method.

◆ dispatchMouseEvent:phase:

- (void) dispatchMouseEvent: (nonnull NSEvent *)  event
phase: (FlutterPointerPhase phase 

Converts |event| to a FlutterPointerEvent with the given phase, and sends it to the engine.

◆ dispose

- (void) dispose

Removes this controller from the engine. The controller is removed from the engine on dealloc, however in multi-window scenario the controller needs to be unregistered from the engine eagerly - because the FlutterView needs to be removed from the Flutter isolate before destroying the controller and window.

◆ handleKeyboardAnimationCallbackWithTargetTime:

- (void) handleKeyboardAnimationCallbackWithTargetTime: (fml::TimePoint targetTime

Handles updating viewport metrics on keyboard animation.

◆ handlePressEvent:nextAction:

- (void) handlePressEvent: (FlutterUIPressProxy *)  press
nextAction: (ios(13.4))  API_AVAILABLE 

◆ isDispatchingKeyEvent:

- (BOOL) isDispatchingKeyEvent: (nonnull NSEvent *)  event

Returns YES if provided event is being currently redispatched by keyboard manager.

◆ launchEngine

- (BOOL) launchEngine

Starts running |engine|, including any initial setup.

◆ notifySemanticsEnabledChanged

- (void) notifySemanticsEnabledChanged

Called by the associated FlutterEngine when FlutterEngine::semanticsEnabled has changed.

◆ onFirstFrameRendered

- (void) onFirstFrameRendered

Called when the first frame has been rendered. Invokes any registered first-frame callback.

◆ restorationPlugin

- (FlutterRestorationPlugin *) restorationPlugin

◆ setUpWithEngine:viewIdentifier:

- (void) setUpWithEngine: (nonnull FlutterEngine *)  engine
viewIdentifier: (FlutterViewIdentifier viewIdentifier 

Set up the controller with engine and id, and other engine-level classes.

This method is called by FlutterEngine. A view controller must be set up before being used, and must be set up only once until detachFromEngine:.

◆ stateIsActive

- (BOOL) stateIsActive

◆ stateIsBackground

- (BOOL) stateIsBackground

◆ supportsShowingSystemContextMenu

- (BOOL) supportsShowingSystemContextMenu

◆ textInputPlugin

- (FlutterTextInputPlugin *) textInputPlugin

◆ updateSemantics:

- (void) updateSemantics: (nonnull const FlutterSemanticsUpdate2 *)  update

Notify from the framework that the semantics for this view needs to be updated.

Property Documentation

◆ accessibilityBridge

- (weak_ptr<)flutter:
readnonatomicassign

Definition at line 21 of file FlutterViewController_Internal.h.

◆ accessibilityIsOnOffSwitchLabelsEnabled

- (BOOL) accessibilityIsOnOffSwitchLabelsEnabled
readnonatomicassign

Definition at line 47 of file FlutterViewController_Internal.h.

◆ applicationLocale

- (NSString *) applicationLocale
readwritenonatomicassign

Definition at line 51 of file FlutterViewController_Internal.h.

◆ awokenFromNib

- (BOOL) awokenFromNib
readwritenonatomicassign

Definition at line 82 of file FlutterViewController.mm.

◆ displayingFlutterUI

- (BOOL) displayingFlutterUI
readwritenonatomicassign

Definition at line 84 of file FlutterViewController.mm.

◆ engineNeedsLaunch

- (BOOL) engineNeedsLaunch
readwritenonatomicassign

Definition at line 81 of file FlutterViewController.mm.

◆ flutterPrefersStatusBarHidden

- (BOOL) flutterPrefersStatusBarHidden
readwritenonatomicassign

Definition at line 89 of file FlutterViewController.mm.

◆ flutterView

- (FlutterView *) flutterView
readwritenonatomicassign

Definition at line 75 of file FlutterViewController.mm.

◆ flutterViewRenderedCallback

- (void(^ flutterViewRenderedCallback) (void))
readwritenonatomicstrong

◆ initialized

- (BOOL) initialized
readwritenonatomicassign

Definition at line 80 of file FlutterViewController.mm.

◆ isHomeIndicatorHidden

- (BOOL) isHomeIndicatorHidden
readwritenonatomicassign

Definition at line 85 of file FlutterViewController.mm.

◆ isKeyboardInOrTransitioningFromBackground

- (BOOL) isKeyboardInOrTransitioningFromBackground
readwritenonatomicassign

Definition at line 113 of file FlutterViewController.mm.

◆ isPresentingViewController

- (BOOL) isPresentingViewController
readnonatomicassign

Definition at line 48 of file FlutterViewController_Internal.h.

◆ isPresentingViewControllerAnimating

- (BOOL) isPresentingViewControllerAnimating
readwritenonatomicassign

Definition at line 86 of file FlutterViewController.mm.

◆ isVoiceOverRunning

- (BOOL) isVoiceOverRunning
readnonatomicassign

Definition at line 49 of file FlutterViewController_Internal.h.

◆ keyboardAnimationIsShowing

- (BOOL) keyboardAnimationIsShowing
readwritenonatomicassign

Definition at line 111 of file FlutterViewController.mm.

◆ keyboardAnimationStartTime

- (TimePoint FlutterViewController()):
readwritenonatomicassign

Definition at line 112 of file FlutterViewController.mm.

◆ keyboardAnimationView

- (UIView*) keyboardAnimationView
readwritenonatomicstrong

Definition at line 97 of file FlutterViewController.mm.

◆ keyboardAnimationVSyncClient

- (VSyncClient*) keyboardAnimationVSyncClient
readwritenonatomicstrong

Definition at line 110 of file FlutterViewController.mm.

◆ keyboardManager

- (FlutterKeyboardManager*) keyboardManager
readwritenonatomicstrong

Definition at line 50 of file FlutterViewController_Internal.h.

◆ keyboardSpringAnimation

- (SpringAnimation*) keyboardSpringAnimation
readwritenonatomicstrong

Definition at line 98 of file FlutterViewController.mm.

◆ keyUpMonitor

- (id) keyUpMonitor
readwritenonatomicassign

Event monitor for keyUp events.

Definition at line 176 of file FlutterViewController.mm.

◆ mouseState

- (MouseState) mouseState
readwritenonatomicassign

The current state of the mouse and the sent mouse events.

Definition at line 171 of file FlutterViewController.mm.

◆ ongoingTouches

- (NSMutableSet<NSNumber*>*) ongoingTouches
readwritenonatomicstrong

Definition at line 91 of file FlutterViewController.mm.

◆ orientationPreferences

- (UIInterfaceOrientationMask) orientationPreferences
readwritenonatomicassign

Definition at line 78 of file FlutterViewController.mm.

◆ originalViewInsetBottom

- (CGFloat) originalViewInsetBottom
readwritenonatomicassign

Definition at line 109 of file FlutterViewController.mm.

◆ platformViewsController

- (FlutterPlatformViewsController*) platformViewsController
readnonatomicassign

Definition at line 62 of file FlutterViewController_Internal.h.

◆ prefersStatusBarHidden

- (BOOL) prefersStatusBarHidden
readwritenonatomicassign

Whether the status bar is preferred hidden.

   This overrides the |UIViewController:prefersStatusBarHidden|.
   This is ignored when `UIViewControllerBasedStatusBarAppearance` in info.plist
   of the app project is `false`.

Definition at line 60 of file FlutterViewController_Internal.h.

◆ scrollInertiaEventAppKitDeadline

- (NSTimeInterval) scrollInertiaEventAppKitDeadline
readwritenonatomicassign

When an iOS app is running in emulation on an Apple Silicon Mac, trackpad input goes through a translation layer, and events are not received with precise deltas. Due to this, we can't rely on checking for a stationary trackpad event. Fortunately, AppKit will send an event of type UIEventTypeScroll following a scroll when inertia should stop. This field is needed to estimate if such an event represents the natural end of scrolling inertia or a user-initiated cancellation.

Definition at line 124 of file FlutterViewController.mm.

◆ scrollInertiaEventStartline

- (NSTimeInterval) scrollInertiaEventStartline
readwritenonatomicassign

Timestamp after which a scroll inertia cancel event should be inferred.

Definition at line 116 of file FlutterViewController.mm.

◆ scrollView

- (UIScrollView*) scrollView
readwritenonatomicstrong

Definition at line 96 of file FlutterViewController.mm.

◆ shouldIgnoreViewportMetricsUpdatesDuringRotation

- (BOOL) shouldIgnoreViewportMetricsUpdatesDuringRotation
readwritenonatomicassign

Whether we should ignore viewport metrics updates during rotation transition.

Definition at line 103 of file FlutterViewController.mm.

◆ statusBarStyle

- (UIStatusBarStyle) statusBarStyle
readwritenonatomicassign

Definition at line 79 of file FlutterViewController.mm.

◆ targetViewInsetBottom

- (CGFloat) targetViewInsetBottom
readwritenonatomicassign

Keyboard animation properties

Definition at line 108 of file FlutterViewController.mm.

◆ touchRateCorrectionVSyncClient

- (VSyncClient*) touchRateCorrectionVSyncClient
readwritenonatomicstrong

VSyncClient for touch events delivery frame rate correction.

On promotion devices(eg: iPhone13 Pro), the delivery frame rate of touch events is 60HZ but the frame rate of rendering is 120HZ, which is different and will leads jitter and laggy. With this VSyncClient, it can correct the delivery frame rate of touch events to let it keep the same with frame rate of rendering.

Definition at line 132 of file FlutterViewController.mm.

◆ trackingArea

- (NSTrackingArea*) trackingArea
readwritenonatomicassign

The tracking area used to generate hover events, if enabled.

Definition at line 166 of file FlutterViewController.mm.

◆ viewIdentifier

- (int64_t) viewIdentifier
readnonatomicassign

Definition at line 71 of file FlutterViewController.mm.


The documentation for this category was generated from the following files: