#include <keyboard_key_handler.h>
Definition at line 35 of file keyboard_key_handler.h.
◆ KeyboardKeyHandler()
Definition at line 31 of file keyboard_key_handler.cc.
32 : last_sequence_id_(1),
33 channel_(std::make_unique<MethodChannel<EncodableValue>>(
◆ ~KeyboardKeyHandler()
flutter::KeyboardKeyHandler::~KeyboardKeyHandler |
( |
| ) |
|
|
default |
◆ AddDelegate()
◆ GetPressedState()
std::map< uint64_t, uint64_t > flutter::KeyboardKeyHandler::GetPressedState |
( |
| ) |
|
|
overridevirtual |
◆ InitKeyboardChannel()
void flutter::KeyboardKeyHandler::InitKeyboardChannel |
( |
| ) |
|
Definition at line 40 of file keyboard_key_handler.cc.
41 channel_->SetMethodCallHandler(
42 [
this](
const MethodCall<EncodableValue>& call,
43 std::unique_ptr<MethodResult<EncodableValue>> result) {
44 HandleMethodCall(call, std::move(result));
Referenced by flutter::testing::TEST().
◆ KeyboardHook()
void flutter::KeyboardKeyHandler::KeyboardHook |
( |
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
char32_t |
character, |
|
|
bool |
extended, |
|
|
bool |
was_down, |
|
|
KeyEventCallback |
callback |
|
) |
| |
|
overridevirtual |
Implements flutter::KeyboardHandlerBase.
Definition at line 83 of file keyboard_key_handler.cc.
90 std::unique_ptr<PendingEvent> incoming = std::make_unique<PendingEvent>();
92 uint64_t sequence_id = ++last_sequence_id_;
93 incoming->sequence_id = sequence_id;
94 incoming->unreplied = delegates_.size();
95 incoming->any_handled =
false;
96 incoming->callback = std::move(
callback);
98 if (pending_responds_.size() > kMaxPendingEvents) {
100 <<
"There are " << pending_responds_.size()
101 <<
" keyboard events that have not yet received a response from the "
102 <<
"framework. Are responses being sent?";
104 pending_responds_.push_back(std::move(incoming));
106 for (
const auto& delegate : delegates_) {
108 [sequence_id,
this](
bool handled) {
109 ResolvePendingEvent(sequence_id, handled);
References action, callback, character, extended, key, scancode, and was_down.
Referenced by flutter::testing::TEST().
◆ SyncModifiersIfNeeded()
void flutter::KeyboardKeyHandler::SyncModifiersIfNeeded |
( |
int |
modifiers_state | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: