Flutter Engine
 
Loading...
Searching...
No Matches
<FlutterKeyPrimaryResponder> Protocol Reference

#include <FlutterKeyPrimaryResponder.h>

Inheritance diagram for <FlutterKeyPrimaryResponder>:
FlutterChannelKeyResponder FlutterChannelKeyResponder FlutterEmbedderKeyResponder FlutterEmbedderKeyResponder

Instance Methods

(void) - handlePress:callback:
 
(void) - handleEvent:callback:
 
(void) - syncModifiersIfNeeded:timestamp:
 

Properties

NSMutableDictionary< NSNumber *, NSNumber * > * layoutMap
 

Detailed Description

An interface for a responder that can process a key press event and decides whether to handle the event asynchronously.

To use this class, add it to a |FlutterKeyboardManager| with |addPrimaryResponder|.

An interface for a responder that can process a key event and decides whether to handle an event asynchronously.

To use this class, add it to a |FlutterKeyboardManager| with |addPrimaryResponder|.

Definition at line 19 of file FlutterKeyPrimaryResponder.h.

Method Documentation

◆ handleEvent:callback:

- (void) handleEvent: (nonnull NSEvent *)  event
callback: (nonnull FlutterAsyncKeyCallback callback 
required

Process the event.

The |callback| should be called with a value that indicates whether the responder has handled the given event. The |callback| must be called exactly once, and can be called before the return of this method, or after.

Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().

◆ handlePress:callback:

- (void) handlePress: (nonnull FlutterUIPressProxy *)  press
callback: (ios(13.4))  API_AVAILABLE 
required

Process the event.

The |callback| should be called with a value that indicates whether the responder has handled the given press event. The |callback| must be called exactly once, and can be called before the return of this method, or after.

◆ syncModifiersIfNeeded:timestamp:

- (void) syncModifiersIfNeeded: (NSEventModifierFlags)  modifierFlags
timestamp: (NSTimeInterval)  timestamp 
required

Synchronize the modifier flags if necessary. The new modifier flag would usually come from mouse event and may be out of sync with current keyboard state if the modifier flags have changed while window was not key.

Reimplemented in FlutterEmbedderKeyResponder.

Property Documentation

◆ layoutMap

- (NSMutableDictionary<NSNumber*, NSNumber*>*) layoutMap
readwriterequirednonatomicstrong

Definition at line 46 of file FlutterKeyPrimaryResponder.h.

Referenced by flutter::testing::TEST_F().


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