| Flutter macOS Embedder |

Instance Methods | Properties | List of all members
FlutterViewController() Category Reference

`#import <FlutterViewController_Internal.h>`

Inheritance diagram for FlutterViewController():

## Instance Methods
(BOOL) | - launchEngine
(void) | - configureTrackingArea
(void) | - initializeKeyboard
(void) | - dispatchMouseEvent:
(void) | - dispatchGestureEvent:
(void) | - dispatchMouseEvent:phase:
(void) | - onKeyboardLayoutChanged
(BOOL) | - isDispatchingKeyEvent:
(void) | - setUpWithEngine:viewIdentifier:threadSynchronizer:
(void) | - detachFromEngine
(void) | - notifySemanticsEnabledChanged
(void) | - updateSemantics:
Instance Methods inherited from <FlutterKeyboardViewDelegate>
(void) | - sendKeyEvent:callback:userData:
(nonnull id< FlutterBinaryMessenger >) | - getBinaryMessenger
(BOOL) | - onTextInputKeyEvent:
(void) | - subscribeToKeyboardLayoutChange:
(flutter::LayoutClue) | - lookUpLayoutForKeyCode:shift:
(nonnull NSDictionary *) | - getPressedState

## Properties
NSTrackingArea * | trackingArea
MouseState | mouseState
id | keyUpMonitor
FlutterKeyboardManager * | keyboardManager
KeyboardLayoutNotifier | keyboardLayoutNotifier
NSData * | keyboardLayoutData
FlutterView * | flutterView
FlutterTextInputPlugin * | textInputPlugin
std::weak_ptr< flutter::AccessibilityBridgeMac > | accessibilityBridge
Properties inherited from <FlutterKeyboardViewDelegate>
NSResponder * | nextResponder

## Detailed Description

Private interface declaration for FlutterViewController.

Definition at line 163 of file FlutterViewController.mm.

## Method Documentation

## ◆ 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.

## ◆ 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.

## ◆ initializeKeyboard

- (void) initializeKeyboard |  |  |

Creates and registers keyboard related components.

## ◆ 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.

## ◆ onKeyboardLayoutChanged

- (void) onKeyboardLayoutChanged |  |  |

Called when the active keyboard input source changes.

Input sources may be simple keyboard layouts, or more complex input methods involving an IME, such as Chinese, Japanese, and Korean.

## ◆ setUpWithEngine:viewIdentifier:threadSynchronizer:

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

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:.

## ◆ 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:
| read nonatomic assign

Definition at line 27 of file FlutterViewController_Internal.h.

## ◆ flutterView

- (FlutterView*) flutterView
| read nonatomic assign

Definition at line 20 of file FlutterViewController_Internal.h.

## ◆ keyboardLayoutData

- (NSData*) keyboardLayoutData
| read write nonatomic assign

Definition at line 189 of file FlutterViewController.mm.

## ◆ keyboardLayoutNotifier

- (KeyboardLayoutNotifier) keyboardLayoutNotifier
| read write nonatomic assign

Definition at line 187 of file FlutterViewController.mm.

## ◆ keyboardManager

- (FlutterKeyboardManager*) keyboardManager
| read nonatomic assign

Pointer to a keyboard manager, a hub that manages how key events are dispatched to various Flutter key responders, and whether the event is propagated to the next NSResponder.

Definition at line 185 of file FlutterViewController.mm.

## ◆ keyUpMonitor

- (id) keyUpMonitor
| read write nonatomic assign

Event monitor for keyUp events.

Definition at line 178 of file FlutterViewController.mm.

## ◆ mouseState

- (MouseState) mouseState
| read write nonatomic assign

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

Definition at line 173 of file FlutterViewController.mm.

## ◆ textInputPlugin

- (FlutterTextInputPlugin*) textInputPlugin
| read nonatomic assign

The text input plugin that handles text editing state for text fields.

Definition at line 25 of file FlutterViewController_Internal.h.

## ◆ trackingArea

- (NSTrackingArea*) trackingArea
| read write nonatomic assign

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

Definition at line 168 of file FlutterViewController.mm.

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

- shell/platform/darwin/macos/framework/Source/FlutterViewController.mm
- shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h