#include "flutter/shell/platform/linux/fl_text_input_channel.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 | _FlTextInputChannel |
Functions | |
static const gchar * | text_affinity_to_string (FlTextAffinity affinity) |
static FlMethodResponse * | set_client (FlTextInputChannel *self, FlValue *args) |
static FlMethodResponse * | hide (FlTextInputChannel *self) |
static FlMethodResponse * | show (FlTextInputChannel *self) |
static FlMethodResponse * | set_editing_state (FlTextInputChannel *self, FlValue *args) |
static FlMethodResponse * | clear_client (FlTextInputChannel *self) |
static FlMethodResponse * | set_editable_size_and_transform (FlTextInputChannel *self, FlValue *args) |
static FlMethodResponse * | set_marked_text_rect (FlTextInputChannel *self, FlValue *args) |
static void | method_call_cb (FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data) |
static void | fl_text_input_channel_dispose (GObject *object) |
static void | fl_text_input_channel_class_init (FlTextInputChannelClass *klass) |
static void | fl_text_input_channel_init (FlTextInputChannel *self) |
FlTextInputChannel * | fl_text_input_channel_new (FlBinaryMessenger *messenger, FlTextInputChannelVTable *vtable, gpointer user_data) |
void | fl_text_input_channel_update_editing_state (FlTextInputChannel *self, int64_t client_id, const gchar *text, int64_t selection_base, int64_t selection_extent, FlTextAffinity selection_affinity, gboolean selection_is_directional, int64_t composing_base, int64_t composing_extent, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_text_input_channel_update_editing_state_finish (GObject *object, GAsyncResult *result, GError **error) |
void | fl_text_input_channel_update_editing_state_with_deltas (FlTextInputChannel *self, int64_t client_id, const gchar *old_text, const gchar *delta_text, int64_t delta_start, int64_t delta_end, int64_t selection_base, int64_t selection_extent, FlTextAffinity selection_affinity, gboolean selection_is_directional, int64_t composing_base, int64_t composing_extent, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_text_input_channel_update_editing_state_with_deltas_finish (GObject *object, GAsyncResult *result, GError **error) |
void | fl_text_input_channel_perform_action (FlTextInputChannel *self, int64_t client_id, const gchar *input_action, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) |
gboolean | fl_text_input_channel_perform_action_finish (GObject *object, GAsyncResult *result, GError **error) |
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 | kMultilineInputType [] = "TextInputType.multiline" |
static constexpr char | kNoneInputType [] = "TextInputType.none" |
static constexpr char | kTextAffinityUpstream [] = "TextAffinity.upstream" |
static constexpr char | kTextAffinityDownstream [] = "TextAffinity.downstream" |
|
static |
Definition at line 149 of file fl_text_input_channel.cc.
References fl_method_success_response_new().
Referenced by method_call_cb().
|
static |
Definition at line 239 of file fl_text_input_channel.cc.
References fl_text_input_channel_dispose().
|
static |
Definition at line 231 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_class_init().
|
static |
Definition at line 243 of file fl_text_input_channel.cc.
FlTextInputChannel* fl_text_input_channel_new | ( | FlBinaryMessenger * | messenger, |
FlTextInputChannelVTable * | vtable, | ||
gpointer | user_data | ||
) |
fl_text_input_channel_new: @messenger: an #FlBinaryMessenger. @vtable: callbacks for incoming method calls. @user_data: data to pass in callbacks.
Creates a new channel that implements SystemChannels.textInput from the Flutter services library.
Returns: a new #FlTextInputChannel.
Definition at line 245 of file fl_text_input_channel.cc.
References fl_json_method_codec_new(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), kChannelName, method_call_cb(), and user_data.
Referenced by fl_text_input_handler_new().
void fl_text_input_channel_perform_action | ( | FlTextInputChannel * | channel, |
int64_t | client_id, | ||
const gchar * | input_action, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_text_input_channel_perform_action: @channel: an #FlTextInputChannel. @client_id: @input_action: action to perform. @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.
Definition at line 384 of file fl_text_input_channel.cc.
References args, fl_method_channel_invoke_method(), fl_value_append_take(), fl_value_new_int(), fl_value_new_list(), fl_value_new_string(), kPerformActionMethod, and user_data.
Referenced by perform_action().
gboolean fl_text_input_channel_perform_action_finish | ( | GObject * | object, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_text_input_channel_perform_action_finish: @object:
Completes request started with fl_text_input_channel_perform_action().
Returns: TRUE on success.
Definition at line 400 of file fl_text_input_channel.cc.
References error, fl_method_channel_invoke_method_finish(), and fl_method_response_get_result().
Referenced by perform_action_response_cb().
void fl_text_input_channel_update_editing_state | ( | FlTextInputChannel * | channel, |
int64_t | client_id, | ||
const gchar * | text, | ||
int64_t | selection_base, | ||
int64_t | selection_extent, | ||
FlTextAffinity | selection_affinity, | ||
gboolean | selection_is_directional, | ||
int64_t | composing_base, | ||
int64_t | composing_extent, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_text_input_channel_update_editing_state: @channel: an #FlTextInputChannel. @client_id: @text: @selection_base: @selection_extent: @selection_affinity: @selection_is_directional: @composing_base: @composing_extent: @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.
Definition at line 266 of file fl_text_input_channel.cc.
References args, fl_method_channel_invoke_method(), fl_value_append(), fl_value_append_take(), fl_value_new_bool(), fl_value_new_int(), fl_value_new_list(), fl_value_new_map(), fl_value_new_string(), fl_value_set_string_take(), kComposingBaseKey, kComposingExtentKey, kSelectionAffinityKey, kSelectionBaseKey, kSelectionExtentKey, kSelectionIsDirectionalKey, kTextKey, kUpdateEditingStateMethod, text_affinity_to_string(), user_data, and value.
Referenced by update_editing_state().
gboolean fl_text_input_channel_update_editing_state_finish | ( | GObject * | object, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_text_input_channel_update_editing_state_finish: @object:
Completes request started with fl_text_input_channel_update_editing_state().
Returns: TRUE on success.
Definition at line 306 of file fl_text_input_channel.cc.
References error, fl_method_channel_invoke_method_finish(), and fl_method_response_get_result().
Referenced by update_editing_state_response_cb().
void fl_text_input_channel_update_editing_state_with_deltas | ( | FlTextInputChannel * | channel, |
int64_t | client_id, | ||
const gchar * | old_text, | ||
const gchar * | delta_text, | ||
int64_t | delta_start, | ||
int64_t | delta_end, | ||
int64_t | selection_base, | ||
int64_t | selection_extent, | ||
FlTextAffinity | selection_affinity, | ||
gboolean | selection_is_directional, | ||
int64_t | composing_base, | ||
int64_t | composing_extent, | ||
GCancellable * | cancellable, | ||
GAsyncReadyCallback | callback, | ||
gpointer | user_data | ||
) |
fl_text_input_channel_update_editing_state_with_deltas: @channel: an #FlTextInputChannel. @client_id: @old_text: @delta_text: @delta_start: @delta_end: @selection_base: @selection_extent: @selection_affinity: @selection_is_directional: @composing_base: @composing_extent: @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.
Definition at line 317 of file fl_text_input_channel.cc.
References args, fl_method_channel_invoke_method(), fl_value_append(), fl_value_append_take(), fl_value_new_bool(), fl_value_new_int(), fl_value_new_list(), fl_value_new_map(), fl_value_new_string(), fl_value_set_string(), fl_value_set_string_take(), kUpdateEditingStateWithDeltasMethod, text_affinity_to_string(), user_data, and value.
Referenced by update_editing_state_with_delta().
gboolean fl_text_input_channel_update_editing_state_with_deltas_finish | ( | GObject * | object, |
GAsyncResult * | result, | ||
GError ** | error | ||
) |
fl_text_input_channel_update_editing_state_with_deltas_finish: @object:
Completes request started with fl_text_input_channel_update_editing_state_with_deltas().
Returns: TRUE on success.
Definition at line 372 of file fl_text_input_channel.cc.
References error, fl_method_channel_invoke_method_finish(), and fl_method_response_get_result().
Referenced by update_editing_state_with_deltas_response_cb().
|
static |
Definition at line 116 of file fl_text_input_channel.cc.
References fl_method_success_response_new().
Referenced by method_call_cb().
|
static |
Definition at line 198 of file fl_text_input_channel.cc.
References args, clear_client(), error, fl_method_call_get_args(), fl_method_call_get_name(), fl_method_call_respond(), fl_method_not_implemented_response_new(), hide(), kClearClientMethod, kHideMethod, kSetClientMethod, kSetEditableSizeAndTransform, kSetEditingStateMethod, kSetMarkedTextRect, kShowMethod, method_call, set_client(), set_editable_size_and_transform(), set_editing_state(), set_marked_text_rect(), show(), and user_data.
Referenced by fl_text_input_channel_new().
|
static |
Definition at line 72 of file fl_text_input_channel.cc.
References args, fl_method_error_response_new(), fl_method_success_response_new(), FL_TEXT_INPUT_TYPE_MULTILINE, FL_TEXT_INPUT_TYPE_NONE, FL_TEXT_INPUT_TYPE_TEXT, fl_value_get_bool(), fl_value_get_int(), fl_value_get_length(), fl_value_get_list_value(), fl_value_get_string(), fl_value_get_type(), fl_value_lookup_string(), FL_VALUE_TYPE_LIST, FL_VALUE_TYPE_MAP, FL_VALUE_TYPE_STRING, kBadArgumentsError, kEnableDeltaModel, kInputActionKey, kMultilineInputType, kNoneInputType, kTextInputTypeKey, and kTextInputTypeNameKey.
Referenced by method_call_cb().
|
static |
Definition at line 160 of file fl_text_input_channel.cc.
References args, fl_method_error_response_new(), fl_method_success_response_new(), fl_value_get_float(), fl_value_get_length(), fl_value_get_list_value(), fl_value_lookup_string(), i, kBadArgumentsError, and kTransform.
Referenced by method_call_cb().
|
static |
Definition at line 128 of file fl_text_input_channel.cc.
References args, fl_method_success_response_new(), fl_value_get_int(), fl_value_get_string(), fl_value_lookup_string(), kComposingBaseKey, kComposingExtentKey, kSelectionBaseKey, kSelectionExtentKey, and kTextKey.
Referenced by method_call_cb().
|
static |
Definition at line 185 of file fl_text_input_channel.cc.
References args, fl_method_success_response_new(), fl_value_get_float(), fl_value_lookup_string(), height, and width.
Referenced by method_call_cb().
|
static |
Definition at line 122 of file fl_text_input_channel.cc.
References fl_method_success_response_new().
Referenced by method_call_cb().
|
static |
Definition at line 60 of file fl_text_input_channel.cc.
References FL_TEXT_AFFINITY_DOWNSTREAM, FL_TEXT_AFFINITY_UPSTREAM, kTextAffinityDownstream, and kTextAffinityUpstream.
Referenced by fl_text_input_channel_update_editing_state(), and fl_text_input_channel_update_editing_state_with_deltas().
|
staticconstexpr |
Definition at line 12 of file fl_text_input_channel.cc.
Referenced by set_client(), and set_editable_size_and_transform().
|
staticconstexpr |
Definition at line 10 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_new().
|
staticconstexpr |
Definition at line 17 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 37 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state(), and set_editing_state().
|
staticconstexpr |
Definition at line 38 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state(), and set_editing_state().
|
staticconstexpr |
Definition at line 30 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 18 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 28 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 42 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 43 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 23 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_perform_action().
|
staticconstexpr |
Definition at line 35 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state().
|
staticconstexpr |
Definition at line 33 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state(), and set_editing_state().
|
staticconstexpr |
Definition at line 34 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state(), and set_editing_state().
|
staticconstexpr |
Definition at line 36 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state().
|
staticconstexpr |
Definition at line 14 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 24 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 16 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 26 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 15 of file fl_text_input_channel.cc.
Referenced by method_call_cb().
|
staticconstexpr |
Definition at line 46 of file fl_text_input_channel.cc.
Referenced by text_affinity_to_string().
|
staticconstexpr |
Definition at line 45 of file fl_text_input_channel.cc.
Referenced by text_affinity_to_string().
|
staticconstexpr |
Definition at line 29 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 31 of file fl_text_input_channel.cc.
Referenced by set_client().
|
staticconstexpr |
Definition at line 32 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state(), and set_editing_state().
|
staticconstexpr |
Definition at line 40 of file fl_text_input_channel.cc.
Referenced by set_editable_size_and_transform().
|
staticconstexpr |
Definition at line 19 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state().
|
staticconstexpr |
Definition at line 21 of file fl_text_input_channel.cc.
Referenced by fl_text_input_channel_update_editing_state_with_deltas().