• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 namespace flutter {
11 
12 class Win32FlutterWindow;
13 
14 // Abstract class for handling keyboard input events.
15 class KeyboardHookHandler {
16  public:
17   virtual ~KeyboardHookHandler() = default;
18 
19   // A function for hooking into keyboard input.
20   virtual void KeyboardHook(Win32FlutterWindow* window,
21                             int key,
22                             int scancode,
23                             int action,
24                             int mods) = 0;
25 
26   // A function for hooking into unicode code point input.
27   virtual void CharHook(Win32FlutterWindow* window,
28                         unsigned int code_point) = 0;
29 };
30 
31 }  // namespace flutter
32 
33 #endif  // FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_HOOK_HANDLER_H_
34