#include "flutter/shell/platform/linux/fl_engine_private.h"
#include "flutter/shell/platform/linux/fl_key_event.h"
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlKeyEmbedderResponder, fl_key_embedder_responder, FL, KEY_EMBEDDER_RESPONDER, GObject) |
FlKeyEmbedderResponder * | fl_key_embedder_responder_new (FlEngine *engine) |
void | fl_key_embedder_responder_handle_event (FlKeyEmbedderResponder *responder, FlKeyEvent *event, uint64_t specified_logical_key, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_key_embedder_responder_handle_event_finish (FlKeyEmbedderResponder *responder, GAsyncResult *result, gboolean *handled, GError **error) |
void | fl_key_embedder_responder_sync_modifiers_if_needed (FlKeyEmbedderResponder *responder, guint state, double event_time) |
GHashTable * | fl_key_embedder_responder_get_pressed_state (FlKeyEmbedderResponder *responder) |
GHashTable* fl_key_embedder_responder_get_pressed_state | ( | FlKeyEmbedderResponder * | responder | ) |
fl_key_embedder_responder_get_pressed_state: @responder: the #FlKeyEmbedderResponder self.
Returns the keyboard pressed state. The hash table contains one entry per pressed keys, mapping from the logical key to the physical key.
Definition at line 783 of file fl_key_embedder_responder.cc.
Referenced by fl_keyboard_manager_get_pressed_state().
void fl_key_embedder_responder_handle_event | ( | FlKeyEmbedderResponder * | responder, |
FlKeyEvent * | event, | ||
uint64_t | specified_logical_key, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_key_embedder_responder_handle_event: @responder: the #FlKeyEmbedderResponder self. @event: the event to be handled. Must not be null. The object is managed by callee and must not be assumed available after this function. @specified_logical_key: @cancellable: (allow-none): a #GCancellable or NULL. @callback: (scope async): a #GAsyncReadyCallback to call when the view is added. @user_data: (closure): user data to pass to @callback.
Let the responder handle an event, expecting the responder to report whether to handle the event.
Definition at line 737 of file fl_key_embedder_responder.cc.
References fl_engine_send_key_event(), fl_key_embedder_responder_handle_event_impl(), kEmptyEvent, and user_data.
Referenced by fl_keyboard_manager_handle_event(), and TEST().
gboolean fl_key_embedder_responder_handle_event_finish | ( | FlKeyEmbedderResponder * | responder, |
GAsyncResult * | result, | ||
gboolean * | handled, | ||
GError ** | error | ||
) |
fl_key_embedder_responder_handle_event_finish: @responder: an #FlKeyEmbedderResponder.
Completes request started with fl_key_embedder_responder_handle_event().
Returns TRUE on success.
Definition at line 757 of file fl_key_embedder_responder.cc.
Referenced by responder_handle_embedder_event_cb(), and TEST().
FlKeyEmbedderResponder* fl_key_embedder_responder_new | ( | FlEngine * | engine | ) |
FlKeyEmbedderResponder:
A #FlKeyResponder that handles events by sending the converted events through the embedder API.
This class communicates with the HardwareKeyboard API in the framework. fl_key_embedder_responder_new: @engine: The #FlEngine, whose the embedder API will be used to send the event.
Creates a new #FlKeyEmbedderResponder.
Returns: a new #FlKeyEmbedderResponder.
Definition at line 181 of file fl_key_embedder_responder.cc.
References initialize_lock_bit_to_checked_keys(), initialize_modifier_bit_to_checked_keys(), FlKeyEmbedderCheckedKey::primary_logical_key, uint64_to_gpointer(), and value.
Referenced by fl_keyboard_manager_new(), and TEST().
void fl_key_embedder_responder_sync_modifiers_if_needed | ( | FlKeyEmbedderResponder * | responder, |
guint | state, | ||
double | event_time | ||
) |
fl_key_embedder_responder_sync_modifiers_if_needed: @responder: the #FlKeyEmbedderResponder self. @state: the state of the modifiers mask. @event_time: the time attribute of the incoming GDK event.
If needed, synthesize modifier keys up and down event by comparing their current pressing states with the given modifiers mask.
Definition at line 774 of file fl_key_embedder_responder.cc.
References kMicrosecondsPerMillisecond, state, and synchronize_pressed_states().
Referenced by fl_keyboard_manager_sync_modifier_if_needed().
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlKeyEmbedderResponder | , |
fl_key_embedder_responder | , | ||
FL | , | ||
KEY_EMBEDDER_RESPONDER | , | ||
GObject | |||
) |