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