#include "flutter/shell/platform/linux/fl_text_input_handler.h"
#include <gtk/gtk.h>
#include "flutter/shell/platform/common/text_editing_delta.h"
#include "flutter/shell/platform/common/text_input_model.h"
#include "flutter/shell/platform/linux/fl_text_input_channel.h"
Go to the source code of this file.
Classes | |
struct | _FlTextInputHandler |
Functions | |
static void | update_editing_state_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | update_editing_state_with_deltas_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | update_editing_state (FlTextInputHandler *self) |
static void | update_editing_state_with_delta (FlTextInputHandler *self, flutter::TextEditingDelta *delta) |
static void | perform_action_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | perform_action (FlTextInputHandler *self) |
static void | im_preedit_start_cb (FlTextInputHandler *self) |
static void | im_preedit_changed_cb (FlTextInputHandler *self) |
static void | im_commit_cb (FlTextInputHandler *self, const gchar *text) |
static void | im_preedit_end_cb (FlTextInputHandler *self) |
static gboolean | im_retrieve_surrounding_cb (FlTextInputHandler *self) |
static gboolean | im_delete_surrounding_cb (FlTextInputHandler *self, gint offset, gint n_chars) |
static void | set_client (int64_t client_id, const gchar *input_action, gboolean enable_delta_model, FlTextInputType input_type, gpointer user_data) |
static void | hide (gpointer user_data) |
static void | show (gpointer user_data) |
static void | set_editing_state (const gchar *text, int64_t selection_base, int64_t selection_extent, int64_t composing_base, int64_t composing_extent, gpointer user_data) |
static void | clear_client (gpointer user_data) |
static void | update_im_cursor_position (FlTextInputHandler *self) |
static void | set_editable_size_and_transform (double *transform, gpointer user_data) |
static void | set_marked_text_rect (double x, double y, double width, double height, gpointer user_data) |
static void | fl_text_input_handler_dispose (GObject *object) |
static void | fl_text_input_handler_class_init (FlTextInputHandlerClass *klass) |
static void | fl_text_input_handler_init (FlTextInputHandler *self) |
static void | init_im_context (FlTextInputHandler *self, GtkIMContext *im_context) |
FlTextInputHandler * | fl_text_input_handler_new (FlBinaryMessenger *messenger, GtkIMContext *im_context, FlTextInputViewDelegate *view_delegate) |
gboolean | fl_text_input_handler_filter_keypress (FlTextInputHandler *self, FlKeyEvent *event) |
Variables | |
static constexpr char | kNewlineInputAction [] = "TextInputAction.newline" |
static constexpr int64_t | kClientIdUnset = -1 |
static FlTextInputChannelVTable | text_input_vtable |
|
static |
|
static |
Definition at line 405 of file fl_text_input_handler.cc.
References fl_text_input_handler_dispose().
|
static |
Definition at line 386 of file fl_text_input_handler.cc.
Referenced by fl_text_input_handler_class_init().
gboolean fl_text_input_handler_filter_keypress | ( | FlTextInputHandler * | handler, |
FlKeyEvent * | event | ||
) |
fl_text_input_handler_filter_keypress @handler: an #FlTextInputHandler. @event: a #FlKeyEvent
Process a Gdk key event.
Returns: TRUE if the event was used.
Definition at line 476 of file fl_text_input_handler.cc.
References fl_key_event_get_is_press(), fl_key_event_get_keyval(), fl_key_event_get_origin(), fl_key_event_get_state(), FL_TEXT_INPUT_TYPE_MULTILINE, kClientIdUnset, kNewlineInputAction, perform_action(), TRUE, update_editing_state(), and update_editing_state_with_delta().
Referenced by fl_view_keyboard_delegate_iface_init(), and send_key_event().
|
static |
Definition at line 410 of file fl_text_input_handler.cc.
References FL_TEXT_INPUT_TYPE_TEXT, and kClientIdUnset.
FlTextInputHandler* fl_text_input_handler_new | ( | FlBinaryMessenger * | messenger, |
GtkIMContext * | im_context, | ||
FlTextInputViewDelegate * | view_delegate | ||
) |
FlTextInputHandler:
#FlTextInputHandler is a handler that implements the shell side of SystemChannels.textInput from the Flutter services library. fl_text_input_handler_new: @messenger: an #FlBinaryMessenger. @im_context: (allow-none): a #GtkIMContext. @view_delegate: an #FlTextInputViewDelegate.
Creates a new handler that implements SystemChannels.textInput from the Flutter services library.
Returns: a new #FlTextInputHandler.
Definition at line 455 of file fl_text_input_handler.cc.
References fl_text_input_channel_new(), init_im_context(), and text_input_vtable.
Referenced by init_keyboard(), and TEST().
|
static |
Definition at line 256 of file fl_text_input_handler.cc.
References user_data.
Referenced by show().
|
static |
Definition at line 177 of file fl_text_input_handler.cc.
References update_editing_state(), and update_editing_state_with_delta().
Referenced by init_im_context().
|
static |
Definition at line 223 of file fl_text_input_handler.cc.
References TRUE, update_editing_state(), and update_editing_state_with_delta().
Referenced by init_im_context().
|
static |
Definition at line 150 of file fl_text_input_handler.cc.
References update_editing_state(), and update_editing_state_with_delta().
Referenced by init_im_context().
|
static |
Definition at line 202 of file fl_text_input_handler.cc.
References update_editing_state(), and update_editing_state_with_delta().
Referenced by init_im_context().
|
static |
Definition at line 145 of file fl_text_input_handler.cc.
Referenced by init_im_context().
|
static |
Definition at line 214 of file fl_text_input_handler.cc.
References TRUE.
Referenced by init_im_context().
|
static |
Definition at line 417 of file fl_text_input_handler.cc.
References im_commit_cb(), im_delete_surrounding_cb(), im_preedit_changed_cb(), im_preedit_end_cb(), im_preedit_start_cb(), and im_retrieve_surrounding_cb().
Referenced by fl_text_input_handler_new().
|
static |
Definition at line 134 of file fl_text_input_handler.cc.
References fl_text_input_channel_perform_action(), and perform_action_response_cb().
Referenced by fl_text_input_handler_filter_keypress().
|
static |
Definition at line 122 of file fl_text_input_handler.cc.
References error, and fl_text_input_channel_perform_action_finish().
Referenced by perform_action().
|
static |
|
static |
Definition at line 355 of file fl_text_input_handler.cc.
References i, update_im_cursor_position(), and user_data.
|
static |
|
static |
Definition at line 371 of file fl_text_input_handler.cc.
References height, update_im_cursor_position(), user_data, and width.
|
static |
Definition at line 263 of file fl_text_input_handler.cc.
References FL_TEXT_INPUT_TYPE_NONE, hide(), and user_data.
|
static |
Definition at line 88 of file fl_text_input_handler.cc.
References flutter::TextRange::base(), flutter::TextRange::extent(), FL_TEXT_AFFINITY_DOWNSTREAM, fl_text_input_channel_update_editing_state(), and update_editing_state_response_cb().
Referenced by fl_text_input_handler_filter_keypress(), im_commit_cb(), im_delete_surrounding_cb(), im_preedit_changed_cb(), and im_preedit_end_cb().
|
static |
Definition at line 60 of file fl_text_input_handler.cc.
References error, and fl_text_input_channel_update_editing_state_finish().
Referenced by update_editing_state().
|
static |
Definition at line 104 of file fl_text_input_handler.cc.
References flutter::TextRange::base(), flutter::TextEditingDelta::delta_end(), flutter::TextEditingDelta::delta_start(), flutter::TextEditingDelta::delta_text(), flutter::TextRange::extent(), FL_TEXT_AFFINITY_DOWNSTREAM, fl_text_input_channel_update_editing_state_with_deltas(), flutter::TextEditingDelta::old_text(), and update_editing_state_with_deltas_response_cb().
Referenced by fl_text_input_handler_filter_keypress(), im_commit_cb(), im_delete_surrounding_cb(), im_preedit_changed_cb(), and im_preedit_end_cb().
|
static |
Definition at line 74 of file fl_text_input_handler.cc.
References error, and fl_text_input_channel_update_editing_state_with_deltas_finish().
Referenced by update_editing_state_with_delta().
|
static |
Definition at line 318 of file fl_text_input_handler.cc.
References fl_text_input_view_delegate_translate_coordinates().
Referenced by set_editable_size_and_transform(), and set_marked_text_rect().
|
staticconstexpr |
Definition at line 15 of file fl_text_input_handler.cc.
Referenced by clear_client(), fl_text_input_handler_filter_keypress(), and fl_text_input_handler_init().
|
staticconstexpr |
Definition at line 13 of file fl_text_input_handler.cc.
Referenced by fl_text_input_handler_filter_keypress().
|
static |
Definition at line 445 of file fl_text_input_handler.cc.
Referenced by fl_text_input_handler_new().