#include "flutter/shell/platform/linux/fl_key_channel_responder.h"
#include <gtk/gtk.h>
#include <cinttypes>
#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 | _FlKeyChannelUserData |
struct | _FlKeyChannelResponder |
Functions | |
G_DECLARE_FINAL_TYPE (FlKeyChannelUserData, fl_key_channel_user_data, FL, KEY_CHANNEL_USER_DATA, GObject) | |
static void | fl_key_channel_user_data_dispose (GObject *object) |
static void | fl_key_channel_user_data_class_init (FlKeyChannelUserDataClass *klass) |
static void | fl_key_channel_user_data_init (FlKeyChannelUserData *self) |
static FlKeyChannelUserData * | fl_key_channel_user_data_new (FlKeyChannelResponder *responder, FlKeyResponderAsyncCallback callback, gpointer user_data) |
static void | fl_key_channel_responder_iface_init (FlKeyResponderInterface *iface) |
G_DEFINE_TYPE_WITH_CODE (FlKeyChannelResponder, fl_key_channel_responder, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(FL_TYPE_KEY_RESPONDER, fl_key_channel_responder_iface_init)) static void fl_key_channel_responder_handle_event(FlKeyResponder *responder | |
static void | handle_response (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | fl_key_channel_responder_dispose (GObject *object) |
static void | fl_key_channel_responder_class_init (FlKeyChannelResponderClass *klass) |
static void | fl_key_channel_responder_init (FlKeyChannelResponder *self) |
FlKeyChannelResponder * | fl_key_channel_responder_new (FlBinaryMessenger *messenger, FlKeyChannelResponderMock *mock) |
static void | fl_key_channel_responder_handle_event (FlKeyResponder *responder, FlKeyEvent *event, uint64_t specified_logical_key, FlKeyResponderAsyncCallback callback, gpointer user_data) |
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" |
FlKeyEvent * | event |
FlKeyEvent uint64_t | specified_logical_key |
FlKeyEvent uint64_t FlKeyResponderAsyncCallback | callback |
FlKeyEvent uint64_t FlKeyResponderAsyncCallback gpointer | user_data |
|
static |
Definition at line 173 of file fl_key_channel_responder.cc.
References fl_key_channel_responder_dispose().
|
static |
Definition at line 164 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_class_init().
|
static |
Definition at line 205 of file fl_key_channel_responder.cc.
References callback, event, fl_basic_message_channel_send(), fl_key_channel_user_data_new(), fl_value_new_int(), fl_value_new_map(), fl_value_new_string(), fl_value_set_string_take(), handle_response(), _FlKeyEvent::keyval, kGtkToolkit, kKeyCodeKey, kKeymapKey, kLinuxKeymap, kModifiersKey, kScanCodeKey, kSpecifiedLogicalKey, kToolkitKey, kTypeKey, kTypeValueDown, kTypeValueUp, kUnicodeScalarValuesKey, specified_logical_key, state, type, and user_data.
Referenced by fl_key_channel_responder_iface_init().
|
static |
Definition at line 123 of file fl_key_channel_responder.cc.
References fl_key_channel_responder_handle_event().
|
static |
Definition at line 179 of file fl_key_channel_responder.cc.
FlKeyChannelResponder* fl_key_channel_responder_new | ( | FlBinaryMessenger * | messenger, |
FlKeyChannelResponderMock * | mock = nullptr |
||
) |
FlKeyChannelResponder:
A #FlKeyResponder that handles events by sending the raw event data in JSON through the message channel.
This class communicates with the RawKeyboard API in the framework. fl_key_channel_responder_new: @messenger: the messenger that the message channel should be built on. @mock: options to mock several functionalities. Only used in unittests.
Creates a new #FlKeyChannelResponder.
Returns: a new #FlKeyChannelResponder.
Definition at line 186 of file fl_key_channel_responder.cc.
References _FlKeyChannelResponderMock::channel_name, fl_basic_message_channel_new(), fl_json_message_codec_new(), and kChannelName.
Referenced by fl_keyboard_manager_new(), TEST(), and test_lock_event().
|
static |
Definition at line 68 of file fl_key_channel_responder.cc.
References fl_key_channel_user_data_dispose().
|
static |
Definition at line 56 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_user_data_class_init().
|
static |
Definition at line 74 of file fl_key_channel_responder.cc.
|
static |
Definition at line 79 of file fl_key_channel_responder.cc.
References callback, and user_data.
Referenced by fl_key_channel_responder_handle_event().
G_DECLARE_FINAL_TYPE | ( | FlKeyChannelUserData | , |
fl_key_channel_user_data | , | ||
FL | , | ||
KEY_CHANNEL_USER_DATA | , | ||
GObject | |||
) |
FlKeyChannelUserData: The user_data used when #FlKeyChannelResponder sends message through the channel.
G_DEFINE_TYPE_WITH_CODE | ( | FlKeyChannelResponder | , |
fl_key_channel_responder | , | ||
G_TYPE_OBJECT | , | ||
G_IMPLEMENT_INTERFACE(FL_TYPE_KEY_RESPONDER, fl_key_channel_responder_iface_init) | |||
) |
|
static |
Definition at line 132 of file fl_key_channel_responder.cc.
References error, fl_basic_message_channel_send_finish(), fl_value_get_bool(), fl_value_lookup_string(), result, and user_data.
Referenced by fl_key_channel_responder_handle_event().
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback |
Definition at line 120 of file fl_key_channel_responder.cc.
Referenced by fl_basic_message_channel_send(), fl_binary_messenger_send_on_channel(), fl_engine_send_key_event(), fl_engine_send_platform_message(), fl_key_channel_responder_handle_event(), fl_key_channel_user_data_new(), fl_key_embedder_call_record_new(), fl_key_responder_handle_event(), fl_keyboard_manager_new(), fl_keyboard_view_delegate_send_key_event(), fl_method_channel_invoke_method(), fl_view_keyboard_delegate_iface_init(), record_calls(), send_on_channel(), flutter::IncomingMessageDispatcher::SetMessageCallback(), TEST(), and flutter::TextureRegistrarImpl::UnregisterTexture().
FlKeyEvent* event |
Definition at line 118 of file fl_key_channel_responder.cc.
Referenced by button_press_event_cb(), button_release_event_cb(), check_pointer_inside(), enter_notify_event_cb(), fl_engine_send_key_event(), fl_engine_send_window_metrics_event(), fl_event_channel_send(), fl_key_channel_responder_handle_event(), fl_key_embedder_call_record_new(), fl_key_event_clone(), fl_key_event_dispose(), fl_key_event_new_from_gdk_event(), fl_key_responder_handle_event(), fl_keyboard_manager_get_event_hash(), fl_keyboard_manager_handle_event(), fl_keyboard_manager_new(), fl_keyboard_pending_event_new(), fl_keyboard_view_delegate_redispatch_event(), fl_keyboard_view_delegate_send_key_event(), fl_keyboard_view_delegate_text_filter_key_press(), fl_scrolling_manager_handle_scroll_event(), fl_text_input_plugin_filter_keypress(), fl_text_input_plugin_filter_keypress_default(), fl_view_key_press_event(), fl_view_key_release_event(), fl_view_keyboard_delegate_iface_init(), get_device_kind(), guarantee_layout(), leave_notify_event_cb(), motion_notify_event_cb(), record_calls(), scroll_event_cb(), send_events_listen_cb(), send_pointer_button_event(), flutter::EventSink< T >::Success(), and TEST().
|
staticconstexpr |
Definition at line 13 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_new().
|
staticconstexpr |
Definition at line 25 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 18 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 17 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 26 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 20 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 19 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 22 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 21 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 14 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 16 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 15 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
|
staticconstexpr |
Definition at line 23 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event().
FlKeyEvent uint64_t specified_logical_key |
Definition at line 119 of file fl_key_channel_responder.cc.
Referenced by fl_key_channel_responder_handle_event(), and fl_key_responder_handle_event().
FlKeyEvent uint64_t FlKeyResponderAsyncCallback gpointer user_data |
Definition at line 121 of file fl_key_channel_responder.cc.
Referenced by args_cancel_cb(), cancel_cancel_cb(), cancel_exception_response_cb(), channel_closed_cb(), cleanup_responds_on_background_thread_info(), clipboard_text_cb(), clipboard_text_has_strings_cb(), compositor_collect_backing_store_callback(), compositor_create_backing_store_callback(), compositor_present_layers_callback(), echo_response_cb(), error_response_cb(), failure_response_cb(), fake_response_cb(), fl_basic_message_channel_send(), fl_basic_message_channel_set_message_handler(), fl_binary_messenger_platform_message_cb(), fl_binary_messenger_send_on_channel(), fl_binary_messenger_set_message_handler_on_channel(), fl_engine_gl_clear_current(), fl_engine_gl_external_texture_frame_callback(), fl_engine_gl_get_fbo(), fl_engine_gl_make_current(), fl_engine_gl_make_resource_current(), fl_engine_gl_proc_resolver(), fl_engine_on_pre_engine_restart_cb(), fl_engine_platform_message_cb(), fl_engine_platform_message_response_cb(), fl_engine_post_task(), fl_engine_runs_task_on_current_thread(), fl_engine_send_key_event(), fl_engine_send_platform_message(), fl_engine_set_on_pre_engine_restart_handler(), fl_engine_set_platform_message_handler(), fl_engine_set_update_semantics_handler(), fl_engine_update_semantics_cb(), fl_event_channel_set_stream_handlers(), fl_key_channel_responder_handle_event(), fl_key_channel_user_data_new(), fl_key_embedder_call_record_new(), fl_key_responder_handle_event(), fl_keyboard_manager_handle_event(), fl_keyboard_view_delegate_send_key_event(), fl_method_channel_invoke_method(), fl_method_channel_set_method_call_handler(), fl_view_accessible_handle_update_semantics(), fl_view_keyboard_delegate_iface_init(), get_keyboard_state(), handle_response(), listen_exception_response_cb(), listen_listen_cb(), message_cb(), message_response_cb(), method_call_cb(), method_call_error_error_cb(), method_call_error_response_cb(), method_call_handler(), method_call_not_implemented_response_cb(), method_call_success_error_cb(), method_call_success_response_cb(), method_response_cb(), not_implemented_response_cb(), null_message_response_cb(), nullptr_args_response_cb(), nullptr_response_cb(), on_pre_engine_restart_cb(), on_pre_engine_restart_destroy_notify(), platform_message_handler_new(), platform_message_ready_cb(), quit_main_loop_cb(), reassign_method_cb(), flutter::TextureRegistrarImpl::RegisterTexture(), request_app_exit_response_cb(), responder_callback(), responder_handle_event_callback(), response_cb(), response_from_thread_cb(), response_from_thread_main(), flutter::BinaryMessengerImpl::Send(), send_events_events_cb(), send_message_cb(), send_on_channel(), send_ready_cb(), set_message_handler_on_channel(), flutter::IncomingMessageDispatcher::SetMessageCallback(), settings_portal_changed_cb(), flutter::TEST(), TEST(), and update_semantics_cb().