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