Flutter Engine
The Flutter Engine
|
#include "flutter/shell/platform/linux/fl_text_input_plugin.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/public/flutter_linux/fl_json_method_codec.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h"
Go to the source code of this file.
Classes | |
struct | FlTextInputPluginPrivate |
Enumerations | |
enum | FlTextInputType { kFlTextInputTypeText , kFlTextInputTypeMultiline , kFlTextInputTypeNone } |
Functions | |
G_DEFINE_TYPE_WITH_PRIVATE (FlTextInputPlugin, fl_text_input_plugin, G_TYPE_OBJECT) static gboolean finish_method(GObject *object | |
if (response==nullptr) | |
return | fl_method_response_get_result (response, error) ! |
static void | update_editing_state_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | update_editing_state (FlTextInputPlugin *self) |
static void | update_editing_state_with_delta (FlTextInputPlugin *self, flutter::TextEditingDelta *delta) |
static void | perform_action_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | perform_action (FlTextInputPlugin *self) |
static void | im_preedit_start_cb (FlTextInputPlugin *self) |
static void | im_preedit_changed_cb (FlTextInputPlugin *self) |
static void | im_commit_cb (FlTextInputPlugin *self, const gchar *text) |
static void | im_preedit_end_cb (FlTextInputPlugin *self) |
static gboolean | im_retrieve_surrounding_cb (FlTextInputPlugin *self) |
static gboolean | im_delete_surrounding_cb (FlTextInputPlugin *self, gint offset, gint n_chars) |
static FlMethodResponse * | set_client (FlTextInputPlugin *self, FlValue *args) |
static FlMethodResponse * | hide (FlTextInputPlugin *self) |
static FlMethodResponse * | show (FlTextInputPlugin *self) |
static FlMethodResponse * | set_editing_state (FlTextInputPlugin *self, FlValue *args) |
static FlMethodResponse * | clear_client (FlTextInputPlugin *self) |
static void | update_im_cursor_position (FlTextInputPlugin *self) |
static FlMethodResponse * | set_editable_size_and_transform (FlTextInputPlugin *self, FlValue *args) |
static FlMethodResponse * | set_marked_text_rect (FlTextInputPlugin *self, FlValue *args) |
static void | method_call_cb (FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data) |
static void | fl_text_input_plugin_dispose (GObject *object) |
static gboolean | fl_text_input_plugin_filter_keypress_default (FlTextInputPlugin *self, FlKeyEvent *event) |
static void | fl_text_input_plugin_class_init (FlTextInputPluginClass *klass) |
static void | fl_text_input_plugin_init (FlTextInputPlugin *self) |
static void | init_im_context (FlTextInputPlugin *self, GtkIMContext *im_context) |
FlTextInputPlugin * | fl_text_input_plugin_new (FlBinaryMessenger *messenger, GtkIMContext *im_context, FlTextInputViewDelegate *view_delegate) |
gboolean | fl_text_input_plugin_filter_keypress (FlTextInputPlugin *self, FlKeyEvent *event) |
Variables | |
static constexpr char | kChannelName [] = "flutter/textinput" |
static constexpr char | kBadArgumentsError [] = "Bad Arguments" |
static constexpr char | kSetClientMethod [] = "TextInput.setClient" |
static constexpr char | kShowMethod [] = "TextInput.show" |
static constexpr char | kSetEditingStateMethod [] = "TextInput.setEditingState" |
static constexpr char | kClearClientMethod [] = "TextInput.clearClient" |
static constexpr char | kHideMethod [] = "TextInput.hide" |
static constexpr char | kUpdateEditingStateMethod [] |
static constexpr char | kUpdateEditingStateWithDeltasMethod [] |
static constexpr char | kPerformActionMethod [] = "TextInputClient.performAction" |
static constexpr char | kSetEditableSizeAndTransform [] |
static constexpr char | kSetMarkedTextRect [] = "TextInput.setMarkedTextRect" |
static constexpr char | kInputActionKey [] = "inputAction" |
static constexpr char | kTextInputTypeKey [] = "inputType" |
static constexpr char | kEnableDeltaModel [] = "enableDeltaModel" |
static constexpr char | kTextInputTypeNameKey [] = "name" |
static constexpr char | kTextKey [] = "text" |
static constexpr char | kSelectionBaseKey [] = "selectionBase" |
static constexpr char | kSelectionExtentKey [] = "selectionExtent" |
static constexpr char | kSelectionAffinityKey [] = "selectionAffinity" |
static constexpr char | kSelectionIsDirectionalKey [] = "selectionIsDirectional" |
static constexpr char | kComposingBaseKey [] = "composingBase" |
static constexpr char | kComposingExtentKey [] = "composingExtent" |
static constexpr char | kTransform [] = "transform" |
static constexpr char | kTextAffinityDownstream [] = "TextAffinity.downstream" |
static constexpr char | kMultilineInputType [] = "TextInputType.multiline" |
static constexpr char | kNoneInputType [] = "TextInputType.none" |
static constexpr char | kNewlineInputAction [] = "TextInputAction.newline" |
static constexpr int64_t | kClientIdUnset = -1 |
GAsyncResult * | result |
GAsyncResult GError ** | error |
enum FlTextInputType |
Enumerator | |
---|---|
kFlTextInputTypeText | |
kFlTextInputTypeMultiline | |
kFlTextInputTypeNone |
Definition at line 54 of file fl_text_input_plugin.cc.
|
static |
Definition at line 468 of file fl_text_input_plugin.cc.
return fl_method_response_get_result | ( | response | , |
error | |||
) |
|
static |
Definition at line 700 of file fl_text_input_plugin.cc.
|
static |
Definition at line 594 of file fl_text_input_plugin.cc.
gboolean fl_text_input_plugin_filter_keypress | ( | FlTextInputPlugin * | plugin, |
FlKeyEvent * | event | ||
) |
fl_text_input_plugin_filter_keypress @plugin: an #FlTextInputPlugin. @event: a FlKeyEvent
Process a Gdk key event.
Returns: TRUE if the event was used.
Definition at line 776 of file fl_text_input_plugin.cc.
|
static |
Definition at line 617 of file fl_text_input_plugin.cc.
|
static |
Definition at line 707 of file fl_text_input_plugin.cc.
FlTextInputPlugin * fl_text_input_plugin_new | ( | FlBinaryMessenger * | messenger, |
GtkIMContext * | im_context, | ||
FlTextInputViewDelegate * | view_delegate | ||
) |
fl_text_input_plugin_new: @messenger: an #FlBinaryMessenger. @im_context: (allow-none): a #GtkIMContext. @view_delegate: an #FlTextInputViewDelegate.
Creates a new plugin that implements SystemChannels.textInput from the Flutter services library.
Returns: a new #FlTextInputPlugin.
Definition at line 745 of file fl_text_input_plugin.cc.
G_DEFINE_TYPE_WITH_PRIVATE | ( | FlTextInputPlugin | , |
fl_text_input_plugin | , | ||
G_TYPE_OBJECT | |||
) |
|
static |
Definition at line 408 of file fl_text_input_plugin.cc.
if | ( | response | = = nullptr | ) |
Definition at line 110 of file fl_text_input_plugin.cc.
|
static |
Definition at line 291 of file fl_text_input_plugin.cc.
|
static |
Definition at line 343 of file fl_text_input_plugin.cc.
|
static |
Definition at line 262 of file fl_text_input_plugin.cc.
|
static |
Definition at line 318 of file fl_text_input_plugin.cc.
|
static |
Definition at line 255 of file fl_text_input_plugin.cc.
|
static |
Definition at line 332 of file fl_text_input_plugin.cc.
|
static |
Definition at line 716 of file fl_text_input_plugin.cc.
|
static |
Definition at line 560 of file fl_text_input_plugin.cc.
|
static |
Definition at line 238 of file fl_text_input_plugin.cc.
|
static |
Definition at line 228 of file fl_text_input_plugin.cc.
|
static |
Definition at line 364 of file fl_text_input_plugin.cc.
|
static |
Definition at line 518 of file fl_text_input_plugin.cc.
|
static |
Definition at line 430 of file fl_text_input_plugin.cc.
|
static |
|
static |
Definition at line 417 of file fl_text_input_plugin.cc.
|
static |
Definition at line 128 of file fl_text_input_plugin.cc.
|
static |
Definition at line 117 of file fl_text_input_plugin.cc.
|
static |
Definition at line 170 of file fl_text_input_plugin.cc.
|
static |
Definition at line 484 of file fl_text_input_plugin.cc.
GAsyncResult GError** error |
Definition at line 107 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 16 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 14 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 21 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 52 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 41 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 42 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 34 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 22 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 32 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 47 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 50 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 48 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 27 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 39 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 37 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 38 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 40 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 18 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 28 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 20 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 30 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 19 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 46 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 33 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 35 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 36 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 44 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 23 of file fl_text_input_plugin.cc.
|
staticconstexpr |
Definition at line 25 of file fl_text_input_plugin.cc.
GAsyncResult* result |
Definition at line 106 of file fl_text_input_plugin.cc.