Flutter Engine
keyboard_hook_handler.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_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
7 
8 #include "flutter/shell/platform/windows/public/flutter_windows.h"
9 
10 #include <string>
11 
12 namespace flutter {
13 
14 class FlutterWindowsView;
15 
16 // Abstract class for handling keyboard input events.
17 class KeyboardHookHandler {
18  public:
19  virtual ~KeyboardHookHandler() = default;
20 
21  // A function for hooking into keyboard input.
22  virtual void KeyboardHook(FlutterWindowsView* view,
23  int key,
24  int scancode,
25  int action,
26  char32_t character) = 0;
27 
28  // A function for hooking into Unicode text input.
29  virtual void TextHook(FlutterWindowsView* view,
30  const std::u16string& text) = 0;
31 };
32 
33 } // namespace flutter
34 
35 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
virtual void KeyboardHook(GLFWwindow *window, int key, int scancode, int action, int mods)=0
SemanticsAction action
virtual void TextHook(FlutterWindowsView *view, const std::u16string &text)=0
virtual ~KeyboardHookHandler()=default