Flutter iOS Embedder
FlutterViewController_Internal.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 FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
7 
8 #include "flutter/fml/memory/weak_ptr.h"
9 
16 
17 namespace flutter {
18 class FlutterPlatformViewsController;
19 }
20 
22 extern NSNotificationName const FlutterViewControllerWillDealloc;
23 
25 extern NSNotificationName const FlutterViewControllerHideHomeIndicator;
26 
28 extern NSNotificationName const FlutterViewControllerShowHomeIndicator;
29 
30 typedef NS_ENUM(NSInteger, FlutterKeyboardMode) {
31  FlutterKeyboardModeHidden = 0,
32  FlutterKeyboardModeDocked = 1,
33  FlutterKeyboardModeFloating = 2,
34 };
35 
36 typedef void (^FlutterKeyboardAnimationCallback)(fml::TimePoint);
37 
39 
40 @property(class, nonatomic, readonly) BOOL accessibilityIsOnOffSwitchLabelsEnabled;
41 @property(nonatomic, readonly) BOOL isPresentingViewController;
42 @property(nonatomic, readonly) BOOL isVoiceOverRunning;
43 @property(nonatomic, retain) FlutterKeyboardManager* keyboardManager;
44 
45 /**
46  * @brief Whether the status bar is preferred hidden.
47  *
48  * This overrides the |UIViewController:prefersStatusBarHidden|.
49  * This is ignored when `UIViewControllerBasedStatusBarAppearance` in info.plist
50  * of the app project is `false`.
51  */
52 @property(nonatomic, assign, readwrite) BOOL prefersStatusBarHidden;
53 
54 - (fml::WeakPtr<FlutterViewController>)getWeakPtr;
55 - (std::shared_ptr<flutter::FlutterPlatformViewsController>&)platformViewsController;
56 - (FlutterRestorationPlugin*)restorationPlugin;
57 // Send touches to the Flutter Engine while forcing the change type to be cancelled.
58 // The `phase`s in `touches` are ignored.
59 - (void)forceTouchesCancelled:(NSSet*)touches;
60 
61 // Accepts keypress events, and then calls |nextAction| if the event was not
62 // handled.
63 - (void)handlePressEvent:(FlutterUIPressProxy*)press
64  nextAction:(void (^)())nextAction API_AVAILABLE(ios(13.4));
65 - (void)addInternalPlugins;
66 - (void)deregisterNotifications;
67 - (int32_t)accessibilityFlags;
68 
69 @end
70 
71 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERVIEWCONTROLLER_INTERNAL_H_
FlutterViewController
Definition: FlutterViewController.h:55
NS_ENUM
typedef NS_ENUM(NSInteger, FlutterKeyboardMode)
Definition: FlutterViewController_Internal.h:30
FlutterRestorationPlugin.h
FlutterRestorationPlugin
Definition: FlutterRestorationPlugin.h:12
FlutterViewControllerWillDealloc
FLUTTER_DARWIN_EXPORT const NSNotificationName FlutterViewControllerWillDealloc
Definition: FlutterViewController.mm:42
FlutterKeyboardAnimationCallback
void(^ FlutterKeyboardAnimationCallback)(fml::TimePoint)
Definition: FlutterViewController_Internal.h:36
FlutterViewResponder.h
flutter
Definition: accessibility_bridge.h:28
FlutterViewControllerHideHomeIndicator
FLUTTER_DARWIN_EXPORT const NSNotificationName FlutterViewControllerHideHomeIndicator
Definition: FlutterViewController.mm:43
FlutterViewControllerShowHomeIndicator
FLUTTER_DARWIN_EXPORT const NSNotificationName FlutterViewControllerShowHomeIndicator
Definition: FlutterViewController.mm:45
FlutterKeyboardManager.h
FlutterUIPressProxy
Definition: FlutterUIPressProxy.h:17
FlutterUIPressProxy.h
FlutterViewResponder-p
Definition: FlutterViewResponder.h:11
FLUTTER_DARWIN_EXPORT
#define FLUTTER_DARWIN_EXPORT
Definition: FlutterMacros.h:14
FlutterKeySecondaryResponder.h
FlutterKeyboardManager
Definition: FlutterKeyboardManager.h:54
FlutterViewController.h