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_GLFW_KEYBOARD_HOOK_HANDLER_H_
6 #define FLUTTER_SHELL_PLATFORM_GLFW_KEYBOARD_HOOK_HANDLER_H_
7 
8 #include <GLFW/glfw3.h>
9 
10 #include "flutter/shell/platform/glfw/public/flutter_glfw.h"
11 
12 namespace flutter {
13 
14 // Abstract class for handling keyboard input events.
16  public:
17  virtual ~KeyboardHookHandler() = default;
18 
19  // A function for hooking into keyboard input.
20  virtual void KeyboardHook(GLFWwindow* 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(GLFWwindow* window, unsigned int code_point) = 0;
28 };
29 
30 } // namespace flutter
31 
32 #endif // FLUTTER_SHELL_PLATFORM_GLFW_KEYBOARD_HOOK_HANDLER_H_
virtual void KeyboardHook(GLFWwindow *window, int key, int scancode, int action, int mods)=0
virtual void CharHook(GLFWwindow *window, unsigned int code_point)=0
SemanticsAction action
virtual ~KeyboardHookHandler()=default