| Flutter iOS Embedder |

FlutterEmbedderKeyResponder.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_FLUTTEREMBEDDERKEYRESPONDER_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTEREMBEDDERKEYRESPONDER_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterKeyPrimaryResponder.h"
11 #import "flutter/shell/platform/embedder/embedder.h"
12
13 typedef void (^FlutterSendKeyEvent)(const FlutterKeyEvent& /* event */,
14 _Nullable FlutterKeyEventCallback /* callback */,
15 void* _Nullable /* user_data */);
16
17 /**
18 * A primary responder of |FlutterKeyboardManager| that handles events by
19 * sending the converted events through a Dart hook to the framework.
20 *
21 * This class interfaces with the HardwareKeyboard API in the framework.
22 */
23 @interface FlutterEmbedderKeyResponder : NSObject <FlutterKeyPrimaryResponder>
24
25 /**
26 * Create an instance by specifying the function to send converted events to.
27 *
28 * The |sendEvent| is typically |FlutterEngine|'s |sendKeyEvent|.
29 */
30 - (nonnull instancetype)initWithSendEvent:(nonnull FlutterSendKeyEvent)sendEvent;
31
32 @end
33
34 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTEREMBEDDERKEYRESPONDER_H_
FlutterSendKeyEvent
void(^ FlutterSendKeyEvent)(const FlutterKeyEvent &, _Nullable FlutterKeyEventCallback, void *_Nullable)
Definition: FlutterEmbedderKeyResponder.h:13
FlutterKeyPrimaryResponder.h
FlutterEmbedderKeyResponder
Definition: FlutterEmbedderKeyResponder.h:23
FlutterKeyPrimaryResponder-p
Definition: FlutterKeyPrimaryResponder.h:19