| Flutter iOS Embedder |

FlutterKeyPrimaryResponder.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_FLUTTER_KEY_PRIMARY_RESPONDER_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTER_KEY_PRIMARY_RESPONDER_H_
7
8 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h"
9
10 typedef void (^FlutterAsyncKeyCallback)(BOOL handled);
11
12 /**
13 * An interface for a responder that can process a key press event and decides
14 * whether to handle the event asynchronously.
15 *
16 * To use this class, add it to a |FlutterKeyboardManager| with
17 * |addPrimaryResponder|.
18 */
19 @protocol FlutterKeyPrimaryResponder
20
21 /**
22 * Process the event.
23 *
24 * The |callback| should be called with a value that indicates whether the
25 * responder has handled the given press event. The |callback| must be called
26 * exactly once, and can be called before the return of this method, or after.
27 */
28 @required
29 - (void)handlePress:(nonnull FlutterUIPressProxy*)press
30 callback:(nonnull FlutterAsyncKeyCallback)callback API_AVAILABLE(ios(13.4));
31
32 @end
33
34 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTER_KEY_PRIMARY_RESPONDER_H_
FlutterKeyPrimaryResponder-p
Definition: FlutterKeyPrimaryResponder.h:19
FlutterAsyncKeyCallback
void(^ FlutterAsyncKeyCallback)(BOOL handled)
Definition: FlutterKeyPrimaryResponder.h:10
FlutterUIPressProxy
Definition: FlutterUIPressProxy.h:17
FlutterUIPressProxy.h