#include "flutter/shell/platform/linux/fl_key_event_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_basic_message_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_json_message_codec.h"
Go to the source code of this file.
Classes | |
struct | _FlKeyEventChannel |
Functions | |
static void | fl_key_event_channel_dispose (GObject *object) |
static void | fl_key_event_channel_class_init (FlKeyEventChannelClass *klass) |
static void | fl_key_event_channel_init (FlKeyEventChannel *self) |
FlKeyEventChannel * | fl_key_event_channel_new (FlBinaryMessenger *messenger) |
void | fl_key_event_channel_send (FlKeyEventChannel *self, FlKeyEventType type, int64_t scan_code, int64_t key_code, int64_t modifiers, int64_t unicode_scalar_values, int64_t specified_logical_key, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_key_event_channel_send_finish (GObject *object, GAsyncResult *result, gboolean *handled, GError **error) |
Variables | |
static constexpr char | kChannelName [] = "flutter/keyevent" |
static constexpr char | kTypeKey [] = "type" |
static constexpr char | kTypeValueUp [] = "keyup" |
static constexpr char | kTypeValueDown [] = "keydown" |
static constexpr char | kKeymapKey [] = "keymap" |
static constexpr char | kKeyCodeKey [] = "keyCode" |
static constexpr char | kScanCodeKey [] = "scanCode" |
static constexpr char | kModifiersKey [] = "modifiers" |
static constexpr char | kToolkitKey [] = "toolkit" |
static constexpr char | kSpecifiedLogicalKey [] = "specifiedLogicalKey" |
static constexpr char | kUnicodeScalarValuesKey [] = "unicodeScalarValues" |
static constexpr char | kGtkToolkit [] = "gtk" |
static constexpr char | kLinuxKeymap [] = "linux" |
static constexpr int64_t | kUnicodeScalarValuesUnset = 0 |
static constexpr int64_t | kSpecifiedLogicalKeyUnset = 0 |
|
static |
Definition at line 44 of file fl_key_event_channel.cc.
References fl_key_event_channel_dispose().
|
static |
Definition at line 36 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_class_init().
|
static |
Definition at line 48 of file fl_key_event_channel.cc.
FlKeyEventChannel* fl_key_event_channel_new | ( | FlBinaryMessenger * | messenger | ) |
fl_key_event_channel_new: @messenger: an #FlBinaryMessenger
Creates a new channel that implements SystemChannels.keyEvent from the Flutter services library.
Returns: a new #FlKeyEventChannel.
Definition at line 50 of file fl_key_event_channel.cc.
References fl_basic_message_channel_new(), fl_json_message_codec_new(), and kChannelName.
Referenced by fl_key_channel_responder_new().
void fl_key_event_channel_send | ( | FlKeyEventChannel * | channel, |
FlKeyEventType | type, | ||
int64_t | scan_code, | ||
int64_t | key_code, | ||
int64_t | modifiers, | ||
int64_t | unicode_scarlar_values, | ||
int64_t | specified_logical_key, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_key_event_channel_send: @channel: an #FlKeyEventChannel @type: event type. @scan_code: scan code. @key_code: key code. @modifiers: modifiers. @unicode_scarlar_values: @specified_logical_key: @cancellable: (allow-none): a #GCancellable or NULL. @callback: (scope async): a #GAsyncReadyCallback to call when the method returns. @user_data: (closure): user data to pass to @callback.
Send a key event to the platform.
Definition at line 63 of file fl_key_event_channel.cc.
References fl_basic_message_channel_send(), FL_KEY_EVENT_TYPE_KEYDOWN, FL_KEY_EVENT_TYPE_KEYUP, fl_value_new_int(), fl_value_new_map(), fl_value_new_string(), fl_value_set_string_take(), kGtkToolkit, kKeyCodeKey, kKeymapKey, kLinuxKeymap, kModifiersKey, kScanCodeKey, kSpecifiedLogicalKey, kSpecifiedLogicalKeyUnset, kToolkitKey, kTypeKey, kTypeValueDown, kTypeValueUp, kUnicodeScalarValuesKey, kUnicodeScalarValuesUnset, type, and user_data.
Referenced by fl_key_channel_responder_handle_event().
gboolean fl_key_event_channel_send_finish | ( | GObject * | object, |
GAsyncResult * | result, | ||
gboolean * | handled, | ||
GError ** | error | ||
) |
fl_key_event_channel_send_finish: @object:
Completes request started with fl_key_event_channel_send().
Returns: TRUE on success.
Definition at line 108 of file fl_key_event_channel.cc.
References error, fl_basic_message_channel_send_finish(), fl_value_get_bool(), fl_value_lookup_string(), and TRUE.
Referenced by handle_response().
|
staticconstexpr |
Definition at line 10 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_new().
|
staticconstexpr |
Definition at line 22 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 15 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 14 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 23 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 17 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 16 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 19 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 26 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 18 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 11 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 13 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 12 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 20 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().
|
staticconstexpr |
Definition at line 25 of file fl_key_event_channel.cc.
Referenced by fl_key_event_channel_send().