| 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) | - dispatchMouseEvent:
(void) | - dispatchGestureEvent:
(void) | - dispatchMouseEvent:phase:
(BOOL) | - isDispatchingKeyEvent:
(void) | - setUpWithEngine:viewIdentifier:
(void) | - detachFromEngine
(void) | - notifySemanticsEnabledChanged
(void) | - updateSemantics:
(void) | - dispose
Instance Methods inherited from <FlutterKeyboardManagerEventContext>
(BOOL) | - onTextInputKeyEvent:

## Properties
NSTrackingArea * | trackingArea
MouseState | mouseState
id | keyUpMonitor
FlutterView * | flutterView
std::weak_ptr< flutter::AccessibilityBridgeMac > | accessibilityBridge
Properties inherited from <FlutterKeyboardManagerEventContext>
NSResponder * | nextResponder

## Detailed Description

Private interface declaration for FlutterViewController.

Definition at line 161 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.

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

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

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

## ◆ 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 21 of file FlutterViewController_Internal.h.

## ◆ flutterView

- (FlutterView*) flutterView
| read nonatomic assign

Definition at line 19 of file FlutterViewController_Internal.h.

## ◆ keyUpMonitor

- (id) keyUpMonitor
| read write nonatomic assign

Event monitor for keyUp events.

Definition at line 176 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 171 of file FlutterViewController.mm.

## ◆ trackingArea

- (NSTrackingArea*) trackingArea
| read write nonatomic assign

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

Definition at line 166 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