5#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_HANDLER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_KEYBOARD_KEY_HANDLER_H_
14#include "flutter/fml/macros.h"
15#include "flutter/shell/platform/common/client_wrapper/include/flutter/binary_messenger.h"
16#include "flutter/shell/platform/common/client_wrapper/include/flutter/encodable_value.h"
17#include "flutter/shell/platform/common/client_wrapper/include/flutter/method_channel.h"
18#include "flutter/shell/platform/windows/keyboard_handler_base.h"
70 void AddDelegate(std::unique_ptr<KeyboardKeyHandlerDelegate> delegate);
115 struct PendingEvent {
117 uint64_t sequence_id;
129 void ResolvePendingEvent(uint64_t sequence_id,
bool handled);
132 void HandleMethodCall(
136 std::vector<std::unique_ptr<KeyboardKeyHandlerDelegate>> delegates_;
140 std::deque<std::unique_ptr<PendingEvent>> pending_responds_;
143 uint64_t last_sequence_id_;
146 std::unique_ptr<flutter::MethodChannel<EncodableValue>> channel_;
std::function< void(bool)> KeyEventCallback
virtual std::map< uint64_t, uint64_t > GetPressedState()=0
virtual void KeyboardHook(int key, int scancode, int action, char32_t character, bool extended, bool was_down, KeyEventCallback callback)=0
virtual ~KeyboardKeyHandlerDelegate()
virtual void SyncModifiersIfNeeded(int modifiers_state)=0
void SyncModifiersIfNeeded(int modifiers_state) override
KeyboardKeyHandler(flutter::BinaryMessenger *messenger)
void KeyboardHook(int key, int scancode, int action, char32_t character, bool extended, bool was_down, KeyEventCallback callback) override
void AddDelegate(std::unique_ptr< KeyboardKeyHandlerDelegate > delegate)
std::map< uint64_t, uint64_t > GetPressedState() override
void InitKeyboardChannel()
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
G_BEGIN_DECLS G_MODULE_EXPORT FlMethodCall * method_call