Flutter Engine
fl_text_input_plugin.cc File Reference
#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)
 
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 int64_t kClientIdUnset = -1
 
GAsyncResult * result
 
GAsyncResult GError ** error
 

Enumeration Type Documentation

◆ FlTextInputType

Enumerator
kFlTextInputTypeText 
kFlTextInputTypeMultiline 
kFlTextInputTypeNone 

Definition at line 52 of file fl_text_input_plugin.cc.

52  {
54  // Send newline when multi-line and enter is pressed.
56  // The input method is not shown at all.

Function Documentation

◆ clear_client()

static FlMethodResponse* clear_client ( FlTextInputPlugin *  self)
static

Definition at line 456 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::client_id, fl_method_success_response_new(), and kClientIdUnset.

Referenced by method_call_cb().

456  {
458  fl_text_input_plugin_get_instance_private(self));
459  priv->client_id = kClientIdUnset;
460 
461  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
462 }
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
static constexpr int64_t kClientIdUnset

◆ fl_method_response_get_result()

return fl_method_response_get_result ( response  ,
error   
)

Referenced by if().

◆ fl_text_input_plugin_class_init()

static void fl_text_input_plugin_class_init ( FlTextInputPluginClass *  klass)
static

Definition at line 677 of file fl_text_input_plugin.cc.

References fl_text_input_plugin_dispose(), and fl_text_input_plugin_filter_keypress_default().

677  {
678  G_OBJECT_CLASS(klass)->dispose = fl_text_input_plugin_dispose;
679  FL_TEXT_INPUT_PLUGIN_CLASS(klass)->filter_keypress =
681 }
static void fl_text_input_plugin_dispose(GObject *object)
static gboolean fl_text_input_plugin_filter_keypress_default(FlTextInputPlugin *self, FlKeyEvent *event)

◆ fl_text_input_plugin_dispose()

static void fl_text_input_plugin_dispose ( GObject *  object)
static

Definition at line 578 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::channel, FlTextInputPluginPrivate::im_context, FlTextInputPluginPrivate::input_action, and FlTextInputPluginPrivate::text_model.

Referenced by fl_text_input_plugin_class_init().

578  {
579  FlTextInputPlugin* self = FL_TEXT_INPUT_PLUGIN(object);
581  fl_text_input_plugin_get_instance_private(self));
582 
583  g_clear_object(&priv->channel);
584  g_clear_pointer(&priv->input_action, g_free);
585  g_clear_object(&priv->im_context);
586  if (priv->text_model != nullptr) {
587  delete priv->text_model;
588  priv->text_model = nullptr;
589  }
590 
591  G_OBJECT_CLASS(fl_text_input_plugin_parent_class)->dispose(object);
592 }
flutter::TextInputModel * text_model

◆ fl_text_input_plugin_filter_keypress()

gboolean fl_text_input_plugin_filter_keypress ( FlTextInputPlugin *  plugin,
FlKeyEvent event 
)

fl_text_input_plugin_filter_keypress : an #FlTextInputPlugin. : a FlKeyEvent

Process a Gdk key event.

Returns: TRUE if the event was used.

Definition at line 745 of file fl_text_input_plugin.cc.

References FALSE.

Referenced by fl_view_keyboard_delegate_iface_init(), and send_key_event().

746  {
747  g_return_val_if_fail(FL_IS_TEXT_INPUT_PLUGIN(self), FALSE);
748  if (FL_TEXT_INPUT_PLUGIN_GET_CLASS(self)->filter_keypress) {
749  return FL_TEXT_INPUT_PLUGIN_GET_CLASS(self)->filter_keypress(self, event);
750  }
751  return FALSE;
752 }
return FALSE

◆ fl_text_input_plugin_filter_keypress_default()

static gboolean fl_text_input_plugin_filter_keypress_default ( FlTextInputPlugin *  self,
FlKeyEvent event 
)
static

Definition at line 595 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::AddCodePoint(), FlTextInputPluginPrivate::client_id, FlTextInputPluginPrivate::enable_delta_model, FALSE, flutter::TextInputModel::GetText(), FlTextInputPluginPrivate::im_context, FlTextInputPluginPrivate::input_type, _FlKeyEvent::is_press, kClientIdUnset, key_event, _FlKeyEvent::keyval, kFlTextInputTypeMultiline, flutter::TextInputModel::MoveCursorToBeginning(), flutter::TextInputModel::MoveCursorToEnd(), perform_action(), flutter::TextInputModel::selection(), flutter::TextInputModel::SelectToBeginning(), flutter::TextInputModel::SelectToEnd(), _FlKeyEvent::state, text, FlTextInputPluginPrivate::text_model, TRUE, update_editing_state(), and update_editing_state_with_delta().

Referenced by fl_text_input_plugin_class_init().

597  {
598  g_return_val_if_fail(FL_IS_TEXT_INPUT_PLUGIN(self), false);
599 
601  fl_text_input_plugin_get_instance_private(self));
602 
603  if (priv->client_id == kClientIdUnset) {
604  return FALSE;
605  }
606 
607  GdkEventKey* key_event = reinterpret_cast<GdkEventKey*>(event->origin);
608  if (gtk_im_context_filter_keypress(priv->im_context, key_event)) {
609  return TRUE;
610  }
611 
612  std::string text_before_change = priv->text_model->GetText();
613  flutter::TextRange selection_before_change = priv->text_model->selection();
614  std::string text = priv->text_model->GetText();
615 
616  // Handle the enter/return key.
617  gboolean do_action = FALSE;
618  // Handle navigation keys.
619  gboolean changed = FALSE;
620  if (event->is_press) {
621  switch (event->keyval) {
622  case GDK_KEY_End:
623  case GDK_KEY_KP_End:
624  if (event->state & GDK_SHIFT_MASK) {
625  changed = priv->text_model->SelectToEnd();
626  } else {
627  changed = priv->text_model->MoveCursorToEnd();
628  }
629  break;
630  case GDK_KEY_Return:
631  case GDK_KEY_KP_Enter:
632  case GDK_KEY_ISO_Enter:
633  if (priv->input_type == kFlTextInputTypeMultiline) {
634  priv->text_model->AddCodePoint('\n');
635  text = "\n";
636  changed = TRUE;
637  }
638  do_action = TRUE;
639  break;
640  case GDK_KEY_Home:
641  case GDK_KEY_KP_Home:
642  if (event->state & GDK_SHIFT_MASK) {
643  changed = priv->text_model->SelectToBeginning();
644  } else {
645  changed = priv->text_model->MoveCursorToBeginning();
646  }
647  break;
648  case GDK_KEY_BackSpace:
649  case GDK_KEY_Delete:
650  case GDK_KEY_KP_Delete:
651  case GDK_KEY_Left:
652  case GDK_KEY_KP_Left:
653  case GDK_KEY_Right:
654  case GDK_KEY_KP_Right:
655  // Already handled inside the framework in RenderEditable.
656  break;
657  }
658  }
659 
660  if (changed) {
661  if (priv->enable_delta_model) {
663  text_before_change, selection_before_change, text);
664  update_editing_state_with_delta(self, &delta);
665  } else {
666  update_editing_state(self);
667  }
668  }
669  if (do_action) {
670  perform_action(self);
671  }
672 
673  return changed;
674 }
static void update_editing_state_with_delta(FlTextInputPlugin *self, flutter::TextEditingDelta *delta)
A change in the state of an input field.
std::string GetText() const
guint keyval
Definition: fl_key_event.h:39
void AddCodePoint(char32_t c)
FlutterKeyEvent key_event
static void update_editing_state(FlTextInputPlugin *self)
static void perform_action(FlTextInputPlugin *self)
static constexpr int64_t kClientIdUnset
TextRange selection() const
std::u16string text
flutter::TextInputModel * text_model
return FALSE

◆ fl_text_input_plugin_init()

static void fl_text_input_plugin_init ( FlTextInputPlugin *  self)
static

◆ fl_text_input_plugin_new()

FlTextInputPlugin* fl_text_input_plugin_new ( FlBinaryMessenger *  messenger,
GtkIMContext *  im_context 
)

fl_text_input_plugin_new: : an #FlBinaryMessenger. : (allow-none): a #GtkIMContext.

Creates a new plugin that implements SystemChannels.textInput from the Flutter services library.

Returns: a new #FlTextInputPlugin.

Definition at line 722 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::channel, fl_json_method_codec_new(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), init_im_context(), kChannelName, and method_call_cb().

Referenced by G_DEFINE_TYPE_WITH_CODE(), and TEST().

723  {
724  g_return_val_if_fail(FL_IS_BINARY_MESSENGER(messenger), nullptr);
725  g_return_val_if_fail(GTK_IS_IM_CONTEXT(im_context), nullptr);
726 
727  FlTextInputPlugin* self = FL_TEXT_INPUT_PLUGIN(
728  g_object_new(fl_text_input_plugin_get_type(), nullptr));
729 
730  g_autoptr(FlJsonMethodCodec) codec = fl_json_method_codec_new();
732  fl_text_input_plugin_get_instance_private(self));
733  priv->channel =
734  fl_method_channel_new(messenger, kChannelName, FL_METHOD_CODEC(codec));
736  nullptr);
737 
738  init_im_context(self, im_context);
739 
740  return self;
741 }
G_MODULE_EXPORT FlJsonMethodCodec * fl_json_method_codec_new()
static void init_im_context(FlTextInputPlugin *self, GtkIMContext *im_context)
G_MODULE_EXPORT void fl_method_channel_set_method_call_handler(FlMethodChannel *self, FlMethodChannelMethodCallHandler handler, gpointer user_data, GDestroyNotify destroy_notify)
G_MODULE_EXPORT FlMethodChannel * fl_method_channel_new(FlBinaryMessenger *messenger, const gchar *name, FlMethodCodec *codec)
static constexpr char kChannelName[]
static void method_call_cb(FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data)

◆ G_DEFINE_TYPE_WITH_PRIVATE()

G_DEFINE_TYPE_WITH_PRIVATE ( FlTextInputPlugin  ,
fl_text_input_plugin  ,
G_TYPE_OBJECT   
)

◆ hide()

static FlMethodResponse* hide ( FlTextInputPlugin *  self)
static

Definition at line 396 of file fl_text_input_plugin.cc.

References fl_method_success_response_new(), and FlTextInputPluginPrivate::im_context.

Referenced by GetMacOSProvidedMenus(), method_call_cb(), and show().

396  {
398  fl_text_input_plugin_get_instance_private(self));
399  gtk_im_context_focus_out(priv->im_context);
400 
401  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
402 }
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)

◆ if()

if ( response  = = nullptr)

Definition at line 106 of file fl_text_input_plugin.cc.

References FALSE, and fl_method_response_get_result().

106  {
107  return FALSE;
108  }
return FALSE

◆ im_commit_cb()

static void im_commit_cb ( FlTextInputPlugin *  self,
const gchar *  text 
)
static

Definition at line 285 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::AddText(), flutter::TextInputModel::CommitComposing(), flutter::TextInputModel::composing(), FlTextInputPluginPrivate::enable_delta_model, flutter::TextInputModel::GetText(), flutter::TextInputModel::selection(), FlTextInputPluginPrivate::text_model, update_editing_state(), and update_editing_state_with_delta().

Referenced by init_im_context().

285  {
287  fl_text_input_plugin_get_instance_private(self));
288  std::string text_before_change = priv->text_model->GetText();
289  flutter::TextRange selection_before_change = priv->text_model->selection();
290 
291  priv->text_model->AddText(text);
292  if (priv->text_model->composing()) {
293  priv->text_model->CommitComposing();
294  }
295 
296  if (priv->enable_delta_model) {
298  text_before_change, selection_before_change, text);
299  update_editing_state_with_delta(self, &delta);
300  } else {
301  update_editing_state(self);
302  }
303 }
static void update_editing_state_with_delta(FlTextInputPlugin *self, flutter::TextEditingDelta *delta)
A change in the state of an input field.
std::string GetText() const
void AddText(const std::u16string &text)
static void update_editing_state(FlTextInputPlugin *self)
TextRange selection() const
std::u16string text
flutter::TextInputModel * text_model

◆ im_delete_surrounding_cb()

static gboolean im_delete_surrounding_cb ( FlTextInputPlugin *  self,
gint  offset,
gint  n_chars 
)
static

Definition at line 331 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::composing_range(), flutter::TextInputModel::DeleteSurrounding(), FlTextInputPluginPrivate::enable_delta_model, flutter::TextInputModel::GetText(), FlTextInputPluginPrivate::text_model, TRUE, update_editing_state(), and update_editing_state_with_delta().

Referenced by init_im_context().

333  {
335  fl_text_input_plugin_get_instance_private(self));
336 
337  std::string text_before_change = priv->text_model->GetText();
338  if (priv->text_model->DeleteSurrounding(offset, n_chars)) {
339  if (priv->enable_delta_model) {
341  text_before_change, priv->text_model->composing_range(),
342  priv->text_model->GetText());
343  update_editing_state_with_delta(self, &delta);
344  } else {
345  update_editing_state(self);
346  }
347  }
348  return TRUE;
349 }
static void update_editing_state_with_delta(FlTextInputPlugin *self, flutter::TextEditingDelta *delta)
A change in the state of an input field.
std::string GetText() const
static void update_editing_state(FlTextInputPlugin *self)
TextRange composing_range() const
flutter::TextInputModel * text_model
bool DeleteSurrounding(int offset_from_cursor, int count)

◆ im_preedit_changed_cb()

static void im_preedit_changed_cb ( FlTextInputPlugin *  self)
static

Definition at line 258 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::composing(), flutter::TextInputModel::composing_range(), FlTextInputPluginPrivate::enable_delta_model, flutter::TextInputModel::GetText(), FlTextInputPluginPrivate::im_context, flutter::TextInputModel::selection(), flutter::TextInputModel::SetSelection(), flutter::TextRange::start(), text, FlTextInputPluginPrivate::text_model, update_editing_state(), update_editing_state_with_delta(), and flutter::TextInputModel::UpdateComposingText().

Referenced by init_im_context().

258  {
260  fl_text_input_plugin_get_instance_private(self));
261  std::string text_before_change = priv->text_model->GetText();
262  g_autofree gchar* buf = nullptr;
263  gint cursor_offset = 0;
264  gtk_im_context_get_preedit_string(priv->im_context, &buf, nullptr,
265  &cursor_offset);
266  if (priv->text_model->composing()) {
267  cursor_offset += priv->text_model->composing_range().start();
268  } else {
269  cursor_offset += priv->text_model->selection().start();
270  }
271  priv->text_model->UpdateComposingText(buf);
272  priv->text_model->SetSelection(flutter::TextRange(cursor_offset));
273 
274  if (priv->enable_delta_model) {
275  std::string text(buf);
277  text_before_change, priv->text_model->composing_range(), text);
278  update_editing_state_with_delta(self, &delta);
279  } else {
280  update_editing_state(self);
281  }
282 }
static void update_editing_state_with_delta(FlTextInputPlugin *self, flutter::TextEditingDelta *delta)
A change in the state of an input field.
std::string GetText() const
size_t start() const
Definition: text_range.h:42
static void update_editing_state(FlTextInputPlugin *self)
TextRange composing_range() const
TextRange selection() const
std::u16string text
flutter::TextInputModel * text_model
bool SetSelection(const TextRange &range)
void UpdateComposingText(const std::u16string &text)

◆ im_preedit_end_cb()

static void im_preedit_end_cb ( FlTextInputPlugin *  self)
static

Definition at line 306 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::enable_delta_model, flutter::TextInputModel::EndComposing(), flutter::TextInputModel::GetText(), FlTextInputPluginPrivate::text_model, update_editing_state(), and update_editing_state_with_delta().

Referenced by init_im_context().

306  {
308  fl_text_input_plugin_get_instance_private(self));
309  priv->text_model->EndComposing();
310  if (priv->enable_delta_model) {
312  "", flutter::TextRange(-1, -1), priv->text_model->GetText());
313  update_editing_state_with_delta(self, &delta);
314  } else {
315  update_editing_state(self);
316  }
317 }
static void update_editing_state_with_delta(FlTextInputPlugin *self, flutter::TextEditingDelta *delta)
A change in the state of an input field.
std::string GetText() const
static void update_editing_state(FlTextInputPlugin *self)
flutter::TextInputModel * text_model

◆ im_preedit_start_cb()

static void im_preedit_start_cb ( FlTextInputPlugin *  self)
static

Definition at line 251 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::BeginComposing(), and FlTextInputPluginPrivate::text_model.

Referenced by init_im_context().

251  {
253  fl_text_input_plugin_get_instance_private(self));
254  priv->text_model->BeginComposing();
255 }
flutter::TextInputModel * text_model

◆ im_retrieve_surrounding_cb()

static gboolean im_retrieve_surrounding_cb ( FlTextInputPlugin *  self)
static

Definition at line 320 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::GetCursorOffset(), flutter::TextInputModel::GetText(), FlTextInputPluginPrivate::im_context, text, FlTextInputPluginPrivate::text_model, and TRUE.

Referenced by init_im_context().

320  {
322  fl_text_input_plugin_get_instance_private(self));
323  auto text = priv->text_model->GetText();
324  size_t cursor_offset = priv->text_model->GetCursorOffset();
325  gtk_im_context_set_surrounding(priv->im_context, text.c_str(), -1,
326  cursor_offset);
327  return TRUE;
328 }
std::string GetText() const
std::u16string text
flutter::TextInputModel * text_model

◆ init_im_context()

static void init_im_context ( FlTextInputPlugin *  self,
GtkIMContext *  im_context 
)
static

Definition at line 693 of file fl_text_input_plugin.cc.

References im_commit_cb(), FlTextInputPluginPrivate::im_context, 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_plugin_new().

693  {
695  fl_text_input_plugin_get_instance_private(self));
696  priv->im_context = GTK_IM_CONTEXT(g_object_ref(im_context));
697 
698  // On Wayland, this call sets up the input method so it can be enabled
699  // immediately when required. Without it, on-screen keyboard's don't come up
700  // the first time a text field is focused.
701  gtk_im_context_focus_out(priv->im_context);
702 
703  g_signal_connect_object(priv->im_context, "preedit-start",
704  G_CALLBACK(im_preedit_start_cb), self,
705  G_CONNECT_SWAPPED);
706  g_signal_connect_object(priv->im_context, "preedit-end",
707  G_CALLBACK(im_preedit_end_cb), self,
708  G_CONNECT_SWAPPED);
709  g_signal_connect_object(priv->im_context, "preedit-changed",
710  G_CALLBACK(im_preedit_changed_cb), self,
711  G_CONNECT_SWAPPED);
712  g_signal_connect_object(priv->im_context, "commit", G_CALLBACK(im_commit_cb),
713  self, G_CONNECT_SWAPPED);
714  g_signal_connect_object(priv->im_context, "retrieve-surrounding",
715  G_CALLBACK(im_retrieve_surrounding_cb), self,
716  G_CONNECT_SWAPPED);
717  g_signal_connect_object(priv->im_context, "delete-surrounding",
718  G_CALLBACK(im_delete_surrounding_cb), self,
719  G_CONNECT_SWAPPED);
720 }
static gboolean im_delete_surrounding_cb(FlTextInputPlugin *self, gint offset, gint n_chars)
static void im_preedit_end_cb(FlTextInputPlugin *self)
static gboolean im_retrieve_surrounding_cb(FlTextInputPlugin *self)
static void im_preedit_start_cb(FlTextInputPlugin *self)
static void im_commit_cb(FlTextInputPlugin *self, const gchar *text)
static void im_preedit_changed_cb(FlTextInputPlugin *self)

◆ method_call_cb()

static void method_call_cb ( FlMethodChannel *  channel,
FlMethodCall *  method_call,
gpointer  user_data 
)
static

Definition at line 544 of file fl_text_input_plugin.cc.

References args, clear_client(), 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, set_client(), set_editable_size_and_transform(), set_editing_state(), set_marked_text_rect(), and show().

Referenced by fl_text_input_plugin_new().

546  {
547  FlTextInputPlugin* self = FL_TEXT_INPUT_PLUGIN(user_data);
548 
549  const gchar* method = fl_method_call_get_name(method_call);
551 
552  g_autoptr(FlMethodResponse) response = nullptr;
553  if (strcmp(method, kSetClientMethod) == 0) {
554  response = set_client(self, args);
555  } else if (strcmp(method, kShowMethod) == 0) {
556  response = show(self);
557  } else if (strcmp(method, kSetEditingStateMethod) == 0) {
558  response = set_editing_state(self, args);
559  } else if (strcmp(method, kClearClientMethod) == 0) {
560  response = clear_client(self);
561  } else if (strcmp(method, kHideMethod) == 0) {
562  response = hide(self);
563  } else if (strcmp(method, kSetEditableSizeAndTransform) == 0) {
564  response = set_editable_size_and_transform(self, args);
565  } else if (strcmp(method, kSetMarkedTextRect) == 0) {
566  response = set_marked_text_rect(self, args);
567  } else {
568  response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
569  }
570 
571  g_autoptr(GError) error = nullptr;
572  if (!fl_method_call_respond(method_call, response, &error)) {
573  g_warning("Failed to send method call response: %s", error->message);
574  }
575 }
G_BEGIN_DECLS FlValue * args
static constexpr char kSetMarkedTextRect[]
G_BEGIN_DECLS FlMethodCall * method_call
static constexpr char kSetClientMethod[]
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
static constexpr char kShowMethod[]
void * user_data
static FlMethodResponse * set_editing_state(FlTextInputPlugin *self, FlValue *args)
static constexpr char kSetEditableSizeAndTransform[]
GAsyncResult GError ** error
G_MODULE_EXPORT FlValue * fl_method_call_get_args(FlMethodCall *self)
G_MODULE_EXPORT gboolean fl_method_call_respond(FlMethodCall *self, FlMethodResponse *response, GError **error)
static FlMethodResponse * set_editable_size_and_transform(FlTextInputPlugin *self, FlValue *args)
static FlMethodResponse * hide(FlTextInputPlugin *self)
G_MODULE_EXPORT const gchar * fl_method_call_get_name(FlMethodCall *self)
static constexpr char kSetEditingStateMethod[]
static FlMethodResponse * set_marked_text_rect(FlTextInputPlugin *self, FlValue *args)
static constexpr char kClearClientMethod[]
static FlMethodResponse * clear_client(FlTextInputPlugin *self)
static constexpr char kHideMethod[]
G_MODULE_EXPORT FlMethodNotImplementedResponse * fl_method_not_implemented_response_new()
static FlMethodResponse * set_client(FlTextInputPlugin *self, FlValue *args)
static FlMethodResponse * show(FlTextInputPlugin *self)

◆ perform_action()

static void perform_action ( FlTextInputPlugin *  self)
static

Definition at line 234 of file fl_text_input_plugin.cc.

References args, FlTextInputPluginPrivate::channel, FlTextInputPluginPrivate::client_id, fl_method_channel_invoke_method(), fl_value_append_take(), fl_value_new_int(), fl_value_new_list(), fl_value_new_string(), FlTextInputPluginPrivate::input_action, kPerformActionMethod, and perform_action_response_cb().

Referenced by fl_text_input_plugin_filter_keypress_default().

234  {
236  fl_text_input_plugin_get_instance_private(self));
237 
238  g_return_if_fail(FL_IS_TEXT_INPUT_PLUGIN(self));
239  g_return_if_fail(priv->client_id != 0);
240  g_return_if_fail(priv->input_action != nullptr);
241 
242  g_autoptr(FlValue) args = fl_value_new_list();
245 
247  nullptr, perform_action_response_cb, self);
248 }
G_MODULE_EXPORT FlValue * fl_value_new_list()
Definition: fl_value.cc:338
G_BEGIN_DECLS FlValue * args
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
static constexpr char kPerformActionMethod[]
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
Definition: fl_value.cc:560
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
Definition: fl_value.cc:251
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
Definition: fl_value.cc:265
G_MODULE_EXPORT void fl_method_channel_invoke_method(FlMethodChannel *self, const gchar *method, FlValue *args, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
static void perform_action_response_cb(GObject *object, GAsyncResult *result, gpointer user_data)

◆ perform_action_response_cb()

static void perform_action_response_cb ( GObject *  object,
GAsyncResult *  result,
gpointer  user_data 
)
static

Definition at line 224 of file fl_text_input_plugin.cc.

References kPerformActionMethod.

Referenced by perform_action().

226  {
227  g_autoptr(GError) error = nullptr;
228  if (!finish_method(object, result, &error)) {
229  g_warning("Failed to call %s: %s", kPerformActionMethod, error->message);
230  }
231 }
GAsyncResult * result
GAsyncResult GError ** error
static constexpr char kPerformActionMethod[]

◆ set_client()

static FlMethodResponse* set_client ( FlTextInputPlugin *  self,
FlValue args 
)
static

Definition at line 352 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::client_id, FlTextInputPluginPrivate::enable_delta_model, fl_method_error_response_new(), fl_method_success_response_new(), 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, FlTextInputPluginPrivate::input_action, FlTextInputPluginPrivate::input_type, kBadArgumentsError, kEnableDeltaModel, kFlTextInputTypeMultiline, kFlTextInputTypeNone, kFlTextInputTypeText, kInputActionKey, kMultilineInputType, kNoneInputType, kTextInputTypeKey, and kTextInputTypeNameKey.

Referenced by method_call_cb(), and TEST().

352  {
354  fl_value_get_length(args) < 2) {
355  return FL_METHOD_RESPONSE(fl_method_error_response_new(
356  kBadArgumentsError, "Expected 2-element list", nullptr));
357  }
359  fl_text_input_plugin_get_instance_private(self));
360 
362  FlValue* config_value = fl_value_get_list_value(args, 1);
363  g_free(priv->input_action);
364  FlValue* input_action_value =
366  if (fl_value_get_type(input_action_value) == FL_VALUE_TYPE_STRING) {
367  priv->input_action = g_strdup(fl_value_get_string(input_action_value));
368  }
369 
370  FlValue* enable_delta_model_value =
372  gboolean enable_delta_model = fl_value_get_bool(enable_delta_model_value);
373  priv->enable_delta_model = enable_delta_model;
374 
375  // Reset the input type, then set only if appropriate.
377  FlValue* input_type_value =
379  if (fl_value_get_type(input_type_value) == FL_VALUE_TYPE_MAP) {
380  FlValue* input_type_name =
382  if (fl_value_get_type(input_type_name) == FL_VALUE_TYPE_STRING) {
383  const gchar* input_type = fl_value_get_string(input_type_name);
384  if (g_strcmp0(input_type, kMultilineInputType) == 0) {
386  } else if (g_strcmp0(input_type, kNoneInputType) == 0) {
388  }
389  }
390  }
391 
392  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
393 }
G_BEGIN_DECLS FlValue * args
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
G_MODULE_EXPORT FlValueType fl_value_get_type(FlValue *self)
Definition: fl_value.cc:428
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
G_MODULE_EXPORT int64_t fl_value_get_int(FlValue *self)
Definition: fl_value.cc:628
static constexpr char kEnableDeltaModel[]
static constexpr char kMultilineInputType[]
G_MODULE_EXPORT FlValue * fl_value_lookup_string(FlValue *self, const gchar *key)
Definition: fl_value.cc:770
static constexpr char kInputActionKey[]
G_MODULE_EXPORT FlValue * fl_value_get_list_value(FlValue *self, size_t index)
Definition: fl_value.cc:735
static constexpr char kNoneInputType[]
G_MODULE_EXPORT const gchar * fl_value_get_string(FlValue *self)
Definition: fl_value.cc:642
static constexpr char kBadArgumentsError[]
G_MODULE_EXPORT size_t fl_value_get_length(FlValue *self)
Definition: fl_value.cc:684
static constexpr char kTextInputTypeNameKey[]
static constexpr char kTextInputTypeKey[]
G_MODULE_EXPORT FlMethodErrorResponse * fl_method_error_response_new(const gchar *code, const gchar *message, FlValue *details)
G_MODULE_EXPORT bool fl_value_get_bool(FlValue *self)
Definition: fl_value.cc:621

◆ set_editable_size_and_transform()

static FlMethodResponse* set_editable_size_and_transform ( FlTextInputPlugin *  self,
FlValue args 
)
static

Definition at line 502 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::editabletext_transform, fl_method_success_response_new(), fl_value_get_float(), fl_value_get_length(), fl_value_get_list_value(), fl_value_lookup_string(), kTransform, flutter::transform, and update_im_cursor_position().

Referenced by method_call_cb(), and TEST().

504  {
506  size_t transform_len = fl_value_get_length(transform);
507  g_warn_if_fail(transform_len == 16);
508 
509  for (size_t i = 0; i < transform_len; ++i) {
510  double val = fl_value_get_float(fl_value_get_list_value(transform, i));
512  fl_text_input_plugin_get_instance_private(self));
513  priv->editabletext_transform[i / 4][i % 4] = val;
514  }
516 
517  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
518 }
G_BEGIN_DECLS FlValue * args
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
G_MODULE_EXPORT double fl_value_get_float(FlValue *self)
Definition: fl_value.cc:635
G_MODULE_EXPORT FlValue * fl_value_lookup_string(FlValue *self, const gchar *key)
Definition: fl_value.cc:770
static void update_im_cursor_position(FlTextInputPlugin *self)
G_MODULE_EXPORT FlValue * fl_value_get_list_value(FlValue *self, size_t index)
Definition: fl_value.cc:735
static constexpr char kTransform[]
G_MODULE_EXPORT size_t fl_value_get_length(FlValue *self)
Definition: fl_value.cc:684

◆ set_editing_state()

static FlMethodResponse* set_editing_state ( FlTextInputPlugin *  self,
FlValue args 
)
static

Definition at line 418 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::EndComposing(), fl_method_success_response_new(), fl_value_get_int(), fl_value_get_string(), fl_value_lookup_string(), kComposingBaseKey, kComposingExtentKey, kSelectionBaseKey, kSelectionExtentKey, kTextKey, flutter::TextInputModel::SetComposingRange(), flutter::TextInputModel::SetSelection(), flutter::TextInputModel::SetText(), text, and FlTextInputPluginPrivate::text_model.

Referenced by method_call_cb().

419  {
421  fl_text_input_plugin_get_instance_private(self));
422  const gchar* text =
424  priv->text_model->SetText(text);
425 
426  int64_t selection_base =
428  int64_t selection_extent =
430  // Flutter uses -1/-1 for invalid; translate that to 0/0 for the model.
431  if (selection_base == -1 && selection_extent == -1) {
432  selection_base = selection_extent = 0;
433  }
434 
435  priv->text_model->SetText(text);
436  priv->text_model->SetSelection(
437  flutter::TextRange(selection_base, selection_extent));
438 
439  int64_t composing_base =
441  int64_t composing_extent =
443  if (composing_base == -1 && composing_extent == -1) {
444  priv->text_model->EndComposing();
445  } else {
446  size_t composing_start = std::min(composing_base, composing_extent);
447  size_t cursor_offset = selection_base - composing_start;
449  flutter::TextRange(composing_base, composing_extent), cursor_offset);
450  }
451 
452  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
453 }
G_BEGIN_DECLS FlValue * args
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
G_MODULE_EXPORT int64_t fl_value_get_int(FlValue *self)
Definition: fl_value.cc:628
bool SetComposingRange(const TextRange &range, size_t cursor_offset)
static constexpr char kComposingBaseKey[]
static constexpr char kComposingExtentKey[]
G_MODULE_EXPORT FlValue * fl_value_lookup_string(FlValue *self, const gchar *key)
Definition: fl_value.cc:770
bool SetText(const std::string &text, const TextRange &selection=TextRange(0), const TextRange &composing_range=TextRange(0))
static constexpr char kTextKey[]
static constexpr char kSelectionExtentKey[]
static constexpr char kSelectionBaseKey[]
G_MODULE_EXPORT const gchar * fl_value_get_string(FlValue *self)
Definition: fl_value.cc:642
std::u16string text
flutter::TextInputModel * text_model
bool SetSelection(const TextRange &range)

◆ set_marked_text_rect()

static FlMethodResponse* set_marked_text_rect ( FlTextInputPlugin *  self,
FlValue args 
)
static

Definition at line 526 of file fl_text_input_plugin.cc.

References FlTextInputPluginPrivate::composing_rect, fl_method_success_response_new(), fl_value_get_float(), fl_value_lookup_string(), and update_im_cursor_position().

Referenced by method_call_cb(), and TEST().

527  {
529  fl_text_input_plugin_get_instance_private(self));
530  priv->composing_rect.x =
532  priv->composing_rect.y =
534  priv->composing_rect.width =
536  priv->composing_rect.height =
539 
540  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
541 }
G_BEGIN_DECLS FlValue * args
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
G_MODULE_EXPORT double fl_value_get_float(FlValue *self)
Definition: fl_value.cc:635
G_MODULE_EXPORT FlValue * fl_value_lookup_string(FlValue *self, const gchar *key)
Definition: fl_value.cc:770
static void update_im_cursor_position(FlTextInputPlugin *self)

◆ show()

static FlMethodResponse* show ( FlTextInputPlugin *  self)
static

Definition at line 405 of file fl_text_input_plugin.cc.

References fl_method_success_response_new(), hide(), FlTextInputPluginPrivate::im_context, FlTextInputPluginPrivate::input_type, and kFlTextInputTypeNone.

Referenced by method_call_cb(), and TEST().

405  {
407  fl_text_input_plugin_get_instance_private(self));
408  if (priv->input_type == kFlTextInputTypeNone) {
409  return hide(self);
410  }
411 
412  gtk_im_context_focus_in(priv->im_context);
413 
414  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
415 }
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
static FlMethodResponse * hide(FlTextInputPlugin *self)

◆ update_editing_state()

static void update_editing_state ( FlTextInputPlugin *  self)
static

Definition at line 124 of file fl_text_input_plugin.cc.

References args, flutter::TextRange::base(), FlTextInputPluginPrivate::channel, FlTextInputPluginPrivate::client_id, flutter::TextRange::collapsed(), flutter::TextInputModel::composing_range(), flutter::TextRange::extent(), FALSE, 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(), flutter::TextInputModel::GetText(), kComposingBaseKey, kComposingExtentKey, kSelectionAffinityKey, kSelectionBaseKey, kSelectionExtentKey, kSelectionIsDirectionalKey, kTextAffinityDownstream, kTextKey, kUpdateEditingStateMethod, flutter::TextInputModel::selection(), FlTextInputPluginPrivate::text_model, update_editing_state_response_cb(), and value.

Referenced by fl_text_input_plugin_filter_keypress_default(), im_commit_cb(), im_delete_surrounding_cb(), im_preedit_changed_cb(), and im_preedit_end_cb().

124  {
126  fl_text_input_plugin_get_instance_private(self));
127 
128  g_autoptr(FlValue) args = fl_value_new_list();
130  g_autoptr(FlValue) value = fl_value_new_map();
131 
132  flutter::TextRange selection = priv->text_model->selection();
134  value, kTextKey,
135  fl_value_new_string(priv->text_model->GetText().c_str()));
137  fl_value_new_int(selection.base()));
139  fl_value_new_int(selection.extent()));
140 
141  int composing_base = -1;
142  int composing_extent = -1;
143  if (!priv->text_model->composing_range().collapsed()) {
144  composing_base = priv->text_model->composing_range().base();
145  composing_extent = priv->text_model->composing_range().extent();
146  }
148  fl_value_new_int(composing_base));
150  fl_value_new_int(composing_extent));
151 
152  // The following keys are not implemented and set to default values.
157 
159 
161  args, nullptr,
163 }
G_MODULE_EXPORT FlValue * fl_value_new_list()
Definition: fl_value.cc:338
G_BEGIN_DECLS FlValue * args
size_t extent() const
Definition: text_range.h:36
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
G_MODULE_EXPORT FlValue * fl_value_new_map()
Definition: fl_value.cc:355
std::string GetText() const
static constexpr char kTextAffinityDownstream[]
bool collapsed() const
Definition: text_range.h:77
G_MODULE_EXPORT FlValue * fl_value_new_bool(bool value)
Definition: fl_value.cc:244
static constexpr char kComposingBaseKey[]
G_MODULE_EXPORT void fl_value_append(FlValue *self, FlValue *value)
Definition: fl_value.cc:552
static constexpr char kSelectionIsDirectionalKey[]
static constexpr char kComposingExtentKey[]
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
Definition: fl_value.cc:560
uint8_t value
static constexpr char kSelectionAffinityKey[]
TextRange composing_range() const
static constexpr char kTextKey[]
static constexpr char kSelectionExtentKey[]
static void update_editing_state_response_cb(GObject *object, GAsyncResult *result, gpointer user_data)
static constexpr char kSelectionBaseKey[]
size_t base() const
Definition: text_range.h:30
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
Definition: fl_value.cc:251
TextRange selection() const
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
Definition: fl_value.cc:265
G_MODULE_EXPORT void fl_method_channel_invoke_method(FlMethodChannel *self, const gchar *method, FlValue *args, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
flutter::TextInputModel * text_model
G_MODULE_EXPORT void fl_value_set_string_take(FlValue *self, const gchar *key, FlValue *value)
Definition: fl_value.cc:610
static constexpr char kUpdateEditingStateMethod[]
return FALSE

◆ update_editing_state_response_cb()

static void update_editing_state_response_cb ( GObject *  object,
GAsyncResult *  result,
gpointer  user_data 
)
static

Definition at line 113 of file fl_text_input_plugin.cc.

References kUpdateEditingStateMethod.

Referenced by update_editing_state(), and update_editing_state_with_delta().

115  {
116  g_autoptr(GError) error = nullptr;
117  if (!finish_method(object, result, &error)) {
118  g_warning("Failed to call %s: %s", kUpdateEditingStateMethod,
119  error->message);
120  }
121 }
GAsyncResult * result
GAsyncResult GError ** error
static constexpr char kUpdateEditingStateMethod[]

◆ update_editing_state_with_delta()

static void update_editing_state_with_delta ( FlTextInputPlugin *  self,
flutter::TextEditingDelta delta 
)
static

Definition at line 166 of file fl_text_input_plugin.cc.

References args, flutter::TextRange::base(), FlTextInputPluginPrivate::channel, FlTextInputPluginPrivate::client_id, flutter::TextRange::collapsed(), flutter::TextInputModel::composing_range(), flutter::TextEditingDelta::delta_end(), flutter::TextEditingDelta::delta_start(), flutter::TextEditingDelta::delta_text(), flutter::TextRange::extent(), FALSE, 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(), kTextAffinityDownstream, kUpdateEditingStateWithDeltasMethod, flutter::TextEditingDelta::old_text(), flutter::TextInputModel::selection(), FlTextInputPluginPrivate::text_model, update_editing_state_response_cb(), and value.

Referenced by fl_text_input_plugin_filter_keypress_default(), im_commit_cb(), im_delete_surrounding_cb(), im_preedit_changed_cb(), and im_preedit_end_cb().

167  {
169  fl_text_input_plugin_get_instance_private(self));
170 
171  g_autoptr(FlValue) args = fl_value_new_list();
173 
174  g_autoptr(FlValue) deltaValue = fl_value_new_map();
175  fl_value_set_string_take(deltaValue, "oldText",
176  fl_value_new_string(delta->old_text().c_str()));
177 
178  fl_value_set_string_take(deltaValue, "deltaText",
179  fl_value_new_string(delta->delta_text().c_str()));
180 
181  fl_value_set_string_take(deltaValue, "deltaStart",
182  fl_value_new_int(delta->delta_start()));
183 
184  fl_value_set_string_take(deltaValue, "deltaEnd",
185  fl_value_new_int(delta->delta_end()));
186 
187  flutter::TextRange selection = priv->text_model->selection();
188  fl_value_set_string_take(deltaValue, "selectionBase",
189  fl_value_new_int(selection.base()));
190 
191  fl_value_set_string_take(deltaValue, "selectionExtent",
192  fl_value_new_int(selection.extent()));
193 
194  fl_value_set_string_take(deltaValue, "selectionAffinity",
196 
197  fl_value_set_string_take(deltaValue, "selectionIsDirectional",
199 
200  int composing_base = -1;
201  int composing_extent = -1;
202  if (!priv->text_model->composing_range().collapsed()) {
203  composing_base = priv->text_model->composing_range().base();
204  composing_extent = priv->text_model->composing_range().extent();
205  }
206  fl_value_set_string_take(deltaValue, "composingBase",
207  fl_value_new_int(composing_base));
208  fl_value_set_string_take(deltaValue, "composingExtent",
209  fl_value_new_int(composing_extent));
210 
211  g_autoptr(FlValue) deltas = fl_value_new_list();
212  fl_value_append(deltas, deltaValue);
213  g_autoptr(FlValue) value = fl_value_new_map();
214  fl_value_set_string(value, "deltas", deltas);
215 
217 
221 }
G_MODULE_EXPORT FlValue * fl_value_new_list()
Definition: fl_value.cc:338
G_BEGIN_DECLS FlValue * args
int delta_end() const
Get the delta_end_ value.
size_t extent() const
Definition: text_range.h:36
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:40
G_MODULE_EXPORT FlValue * fl_value_new_map()
Definition: fl_value.cc:355
int delta_start() const
Get the delta_start_ value.
std::string old_text() const
static constexpr char kUpdateEditingStateWithDeltasMethod[]
static constexpr char kTextAffinityDownstream[]
std::string delta_text() const
bool collapsed() const
Definition: text_range.h:77
G_MODULE_EXPORT FlValue * fl_value_new_bool(bool value)
Definition: fl_value.cc:244
G_MODULE_EXPORT void fl_value_append(FlValue *self, FlValue *value)
Definition: fl_value.cc:552
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
Definition: fl_value.cc:560
uint8_t value
TextRange composing_range() const
static void update_editing_state_response_cb(GObject *object, GAsyncResult *result, gpointer user_data)
size_t base() const
Definition: text_range.h:30
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
Definition: fl_value.cc:251
TextRange selection() const
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
Definition: fl_value.cc:265
G_MODULE_EXPORT void fl_method_channel_invoke_method(FlMethodChannel *self, const gchar *method, FlValue *args, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
flutter::TextInputModel * text_model
G_MODULE_EXPORT void fl_value_set_string(FlValue *self, const gchar *key, FlValue *value)
Definition: fl_value.cc:599
G_MODULE_EXPORT void fl_value_set_string_take(FlValue *self, const gchar *key, FlValue *value)
Definition: fl_value.cc:610
return FALSE

◆ update_im_cursor_position()

static void update_im_cursor_position ( FlTextInputPlugin *  self)
static

Definition at line 472 of file fl_text_input_plugin.cc.

References flutter::TextInputModel::composing(), FlTextInputPluginPrivate::composing_rect, FlTextInputPluginPrivate::editabletext_transform, FlTextInputPluginPrivate::im_context, and FlTextInputPluginPrivate::text_model.

Referenced by set_editable_size_and_transform(), and set_marked_text_rect().

472  {
474  fl_text_input_plugin_get_instance_private(self));
475 
476  // Skip update if not composing to avoid setting to position 0.
477  if (!priv->text_model->composing()) {
478  return;
479  }
480 
481  // Transform the x, y positions of the cursor from local coordinates to
482  // Flutter view coordinates.
483  gint x = priv->composing_rect.x * priv->editabletext_transform[0][0] +
484  priv->composing_rect.y * priv->editabletext_transform[1][0] +
485  priv->editabletext_transform[3][0] + priv->composing_rect.width;
486  gint y = priv->composing_rect.x * priv->editabletext_transform[0][1] +
487  priv->composing_rect.y * priv->editabletext_transform[1][1] +
488  priv->editabletext_transform[3][1] + priv->composing_rect.height;
489 
490  // Set the cursor location in window coordinates so that GTK can position any
491  // system input method windows.
492  GdkRectangle preedit_rect = {x, y, 0, 0};
493  gtk_im_context_set_cursor_location(priv->im_context, &preedit_rect);
494 }
flutter::TextInputModel * text_model

Variable Documentation

◆ error

GAsyncResult GError** error
Initial value:
{
g_autoptr(FlMethodResponse) response = fl_method_channel_invoke_method_finish(
FL_METHOD_CHANNEL(object), result, error)
G_MODULE_EXPORT FlMethodResponse * fl_method_channel_invoke_method_finish(FlMethodChannel *self, GAsyncResult *result, GError **error)
GAsyncResult * result
GAsyncResult GError ** error

Definition at line 103 of file fl_text_input_plugin.cc.

◆ kBadArgumentsError

constexpr char kBadArgumentsError[] = "Bad Arguments"
static

Definition at line 16 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kChannelName

constexpr char kChannelName[] = "flutter/textinput"
static

Definition at line 14 of file fl_text_input_plugin.cc.

Referenced by fl_text_input_plugin_new().

◆ kClearClientMethod

constexpr char kClearClientMethod[] = "TextInput.clearClient"
static

Definition at line 21 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kClientIdUnset

constexpr int64_t kClientIdUnset = -1
static

◆ kComposingBaseKey

constexpr char kComposingBaseKey[] = "composingBase"
static

Definition at line 41 of file fl_text_input_plugin.cc.

Referenced by set_editing_state(), and update_editing_state().

◆ kComposingExtentKey

constexpr char kComposingExtentKey[] = "composingExtent"
static

Definition at line 42 of file fl_text_input_plugin.cc.

Referenced by set_editing_state(), and update_editing_state().

◆ kEnableDeltaModel

constexpr char kEnableDeltaModel[] = "enableDeltaModel"
static

Definition at line 34 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kHideMethod

constexpr char kHideMethod[] = "TextInput.hide"
static

Definition at line 22 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kInputActionKey

constexpr char kInputActionKey[] = "inputAction"
static

Definition at line 32 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kMultilineInputType

constexpr char kMultilineInputType[] = "TextInputType.multiline"
static

Definition at line 47 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kNoneInputType

constexpr char kNoneInputType[] = "TextInputType.none"
static

Definition at line 48 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kPerformActionMethod

constexpr char kPerformActionMethod[] = "TextInputClient.performAction"
static

Definition at line 27 of file fl_text_input_plugin.cc.

Referenced by perform_action(), and perform_action_response_cb().

◆ kSelectionAffinityKey

constexpr char kSelectionAffinityKey[] = "selectionAffinity"
static

Definition at line 39 of file fl_text_input_plugin.cc.

Referenced by update_editing_state().

◆ kSelectionBaseKey

constexpr char kSelectionBaseKey[] = "selectionBase"
static

Definition at line 37 of file fl_text_input_plugin.cc.

Referenced by set_editing_state(), and update_editing_state().

◆ kSelectionExtentKey

constexpr char kSelectionExtentKey[] = "selectionExtent"
static

Definition at line 38 of file fl_text_input_plugin.cc.

Referenced by set_editing_state(), and update_editing_state().

◆ kSelectionIsDirectionalKey

constexpr char kSelectionIsDirectionalKey[] = "selectionIsDirectional"
static

Definition at line 40 of file fl_text_input_plugin.cc.

Referenced by update_editing_state().

◆ kSetClientMethod

constexpr char kSetClientMethod[] = "TextInput.setClient"
static

Definition at line 18 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kSetEditableSizeAndTransform

constexpr char kSetEditableSizeAndTransform[]
static
Initial value:
=
"TextInput.setEditableSizeAndTransform"

Definition at line 28 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kSetEditingStateMethod

constexpr char kSetEditingStateMethod[] = "TextInput.setEditingState"
static

Definition at line 20 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kSetMarkedTextRect

constexpr char kSetMarkedTextRect[] = "TextInput.setMarkedTextRect"
static

Definition at line 30 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kShowMethod

constexpr char kShowMethod[] = "TextInput.show"
static

Definition at line 19 of file fl_text_input_plugin.cc.

Referenced by method_call_cb().

◆ kTextAffinityDownstream

constexpr char kTextAffinityDownstream[] = "TextAffinity.downstream"
static

◆ kTextInputTypeKey

constexpr char kTextInputTypeKey[] = "inputType"
static

Definition at line 33 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kTextInputTypeNameKey

constexpr char kTextInputTypeNameKey[] = "name"
static

Definition at line 35 of file fl_text_input_plugin.cc.

Referenced by set_client().

◆ kTextKey

constexpr char kTextKey[] = "text"
static

Definition at line 36 of file fl_text_input_plugin.cc.

Referenced by set_editing_state(), and update_editing_state().

◆ kTransform

constexpr char kTransform[] = "transform"
static

Definition at line 44 of file fl_text_input_plugin.cc.

Referenced by set_editable_size_and_transform().

◆ kUpdateEditingStateMethod

constexpr char kUpdateEditingStateMethod[]
static
Initial value:
=
"TextInputClient.updateEditingState"

Definition at line 23 of file fl_text_input_plugin.cc.

Referenced by update_editing_state(), and update_editing_state_response_cb().

◆ kUpdateEditingStateWithDeltasMethod

constexpr char kUpdateEditingStateWithDeltasMethod[]
static
Initial value:
=
"TextInputClient.updateEditingStateWithDeltas"

Definition at line 25 of file fl_text_input_plugin.cc.

Referenced by update_editing_state_with_delta().

◆ result

GAsyncResult* result

Definition at line 102 of file fl_text_input_plugin.cc.

Referenced by base::internal::SaturateFastAsmOp< Dst, Src >::__attribute__(), flutter::_ComputePlatformResolvedLocale(), fml::AcquireLooperForThread(), impeller::ReactorGLES::AddOperation(), flutter_runner::testing::TouchEventBuilder::AddResult(), flutter_runner::AccessibilityBridge::AddSemanticsNodeUpdate(), tonic::AllowedInLeafCall(), fml::Base32Decode(), gfx::BoundingRect(), txt::FontAssetProvider::CanonicalFamilyName(), flutter::testing::TestGLSurface::ClearCurrent(), impeller::egl::Context::ClearCurrent(), clipboard_text_cb(), clipboard_text_has_strings_cb(), flutter::testing::clone_string(), clone_string(), FlutterStandardMethodCodec::codecWithReaderWriter:, flutter::CompareOps(), ui::AXPosition< AXNodePosition, AXNode >::CompareTo(), flutter::Pipeline< R >::ProducerContinuation::Complete(), flutter::TextInputPlugin::ComposeChangeHook(), flutter::Paragraph::computeLineMetrics(), flutter_runner::IsolateConfigurator::ConfigureCurrentIsolate(), flutter::ConvertChar32ToUtf8(), fml::MallocMapping::Copy(), flutter::CopyToBitmap(), flutter::testing::TestVulkanSurface::Create(), flutter::ImageGeneratorRegistry::CreateCompatibleGenerator(), flutter::testing::TestVulkanContext::CreateImage(), impeller::LazyGlyphAtlas::CreateOrGetGlyphAtlas(), dart_runner::CreateServiceIsolate(), vulkan::VulkanProcTable::CreateSkiaGetProc(), fml::CreateTemporaryDirectory(), flutter::CursorHandler::CursorHandler(), flutter::ImageDecoderSkia::Decode(), flutter::ImageDecoderImpeller::Decode(), decode_error_method_call(), decode_method_call(), flutter::MethodCodec< rapidjson::Document >::DecodeAndProcessResponseEnvelope(), flutter::JsonMessageCodec::DecodeMessageInternal(), impeller::Matrix::Decompose(), flutter::testing::MockMessageQueue::DispatchFront(), base::internal::ClampedAddOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedSubOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedMulOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedDivOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedModOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), base::internal::ClampedLshOp< T, U, typename std::enable_if< std::is_integral< T >::value &&std::is_integral< U >::value >::type >::Do(), flutter::Rasterizer::Draw(), encode_error_message(), encode_message(), impeller::EncodeCommandsInReactor(), flutter::MethodCodec< rapidjson::Document >::EncodeSuccessEnvelope(), flutter::EncodeTextBoxes(), event_to_character(), fml::BitConverter< from_length, to_length, buffer_length >::Extract(), flutter_runner::testing::FakeFocuser::fail_request_focus(), tonic::FileLoader::FetchBytes(), fl_basic_message_channel_respond(), fl_engine_gl_clear_current(), fl_engine_gl_external_texture_frame_callback(), fl_engine_gl_make_current(), fl_engine_gl_make_resource_current(), fl_engine_send_platform_message(), fl_engine_send_platform_message_response(), fl_engine_start(), fl_key_event_new_from_gdk_event(), fl_renderer_gl_collect_backing_store(), fl_renderer_gl_create_backing_store(), fl_renderer_start(), fl_standard_method_codec_decode_response(), fl_test_codec_decode_response(), FlutterDesktopEngineDestroy(), FlutterDesktopMessengerSend(), FlutterDesktopMessengerSendWithReply(), FlutterDesktopShutDownEngine(), FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable(), FlutterDesktopTextureRegistrarRegisterExternalTexture(), FlutterDesktopTextureRegistrarUnregisterExternalTexture(), FlutterEngineInitialize(), FlutterEngineRun(), FlutterEngineShutdown(), FlutterPresentCallback(), flutter::PlatformViewAndroidJNIImpl::FlutterViewComputePlatformResolvedLocale(), flutter::testing::UniqueEngineTraits::Free(), tonic::DartConverter< bool >::FromArguments(), tonic::DartConverterWrappable::FromArguments(), tonic::DartConverterInteger< long int >::FromArguments(), tonic::DartConverter< unsigned long long >::FromArguments(), tonic::DartConverterFloatingPoint< float >::FromArguments(), tonic::DartConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::FromArguments(), tonic::DartConverter< Dart_Handle >::FromArguments(), tonic::DartConverter< flutter::RRect >::FromDart(), tonic::DartConverter< bool >::FromDart(), tonic::DartConverterWrappable::FromDart(), tonic::DartConverterInteger< long int >::FromDart(), tonic::DartConverter< unsigned long long >::FromDart(), tonic::DartConverterFloatingPoint< float >::FromDart(), tonic::DartConverter< T, typename std::enable_if< std::is_enum< T >::value >::type >::FromDart(), tonic::DartConverter< const char * >::FromDart(), tonic::DartConverter< std::vector< T > >::FromDart(), filesystem::Descriptor::get(), flutter::testing::AutoIsolateShutdown::get(), ui::AXPlatformRelationWin::get_targets(), ui::AXTree::GetAllChildTreeIds(), ui::AXNodeData::GetBoolAttribute(), impeller::TextFrame::GetBounds(), tonic::DartClassLibrary::GetClass(), impeller::FilterContents::GetCoverage(), GetCursorForKind(), impeller::EntityPass::GetElementsCoverage(), ui::AXNodeData::GetFloatAttribute(), flutter::GetFunctionClassName(), flutter::GetFunctionName(), flutter::AndroidSurfaceGLSkia::GetGLInterface(), dart_runner::DartTestComponentControllerV2::GetHandler(), flutter::PlatformHandlerWin32::GetHasStrings(), ui::TestAXNodeWrapper::GetHypertextRangeBoundsRect(), impeller::compiler::Includer::GetInclude(), ui::AXNodeData::GetIntAttribute(), flutter::Paragraph::getLineBoundary(), ui::AXNode::GetOrderedSet(), flutter::AccessibilityBridge::GetPendingEvents(), flutter::PlatformHandlerWin32::GetPlainText(), flutter::Paragraph::getPositionForOffset(), flutter::SettingsPluginWin32::GetPreferredBrightness(), tonic::GetReceiver(), impeller::compiler::GetReflectedStructSize(), flutter_runner::SoftwareSurface::GetSize(), flutter_runner::VulkanSurface::GetSize(), impeller::compiler::Compiler::GetSPIRVAssembly(), flutter::SettingsPluginWin32::GetTextScaleFactor(), txt::ParagraphStyle::GetTextStyle(), ui::AXNode::GetUnignoredParent(), flutter::Paragraph::getWordBoundary(), KeyboardTester::handleChannelMessage:message:binaryReply:, dart_utils::HandleException(), flutter_runner::PlatformView::HandleFuchsiaShaderWarmupChannelPlatformMessage(), flutter::HandleMessageOnHandler(), FlutterUndoManagerPlugin::handleMethodCall:result:, FlutterTextInputPlugin(TestMethods)::handleMethodCall:result:, FlutterPlatformPlugin::handleMethodCall:result:, flutter::FlutterViewController::HandleTopLevelWindowProc(), fml::HexEncode(), flutter::FlutterPlatformNodeDelegateWin32::HitTestSync(), tonic::FileLoader::Import(), flutter::FragmentProgram::init(), dart_runner::InitBuiltinLibrariesForIsolate(), flutter::InitDartAsync(), flutter::InitDartCore(), flutter::InitDartInternal(), flutter::InitDartIO(), flutter::DartUI::InitForIsolate(), flutter::DartIO::InitForIsolate(), flutter::ImmutableBuffer::initFromAsset(), fuchsia::dart::Initialize(), flutter::WindowWin32::InitializeChild(), flutter::testing::EmbedderConfigBuilder::InitializeEngine(), FlutterRestorationPlugin::initWithChannel:restorationEnabled:, FlutterEngineHandlerInfo::initWithConnection:handler:, FlutterMethodChannel::initWithName:binaryMessenger:codec:, flutter::testing::MockWin32Window::InjectMessageList(), InternalSendPlatformMessage(), gfx::IntersectRects(), flutter::MethodChannel< T >::InvokeMethod(), flutter::IOSExternalViewEmbedder::IOSExternalViewEmbedder(), FlutterTextInputPlugin::isFirstResponder, JNI_OnLoad(), base::JoinString(), tonic::FileLoader::Kernel(), flutter::KeyEventHandler::KeyboardHook(), flutter::KeyboardKeyEmbedderHandler::KeyboardHook(), impeller::LinkProgram(), flutter::PersistentCache::load(), flutter::FlutterProjectBundle::LoadAotData(), LoadAotData(), flutter::DartIsolate::LoadLoadingUnit(), flutter::DartIsolate::LoadLoadingUnitError(), flutter::PersistentCache::LoadSkSLs(), tonic::Log(), flutter::Logger_PrintString(), main(), impeller::FilterInput::Make(), flutter::testing::TestGLSurface::MakeCurrent(), impeller::egl::Context::MakeCurrent(), FlutterEngineGroup::makeEngineWithOptions:, MakeHandle(), flutter::testing::TestGLSurface::MakeResourceCurrent(), MethodCallMatcher::MatchAndExplain(), MATCHER_P(), base::internal::CheckedNumeric< T >::MathOp(), method_call_success_cb(), method_call_success_error_cb(), method_call_success_response_cb(), flutter::MethodResult< rapidjson::Document >::NotImplemented(), ui::AXEventGenerator::OnAtomicUpdateFinished(), flutter_runner::FocusDelegate::OnDisposeChildView(), tonic::DartMessageHandler::OnHandleMessage(), flutter::FlutterPlatformViewsController::OnMethodCall, flutter::WindowProcDelegateManagerWin32::OnTopLevelWindowProc(), flutter::FlutterWindowsEngine::OnVsync(), dart_utils::OpenFdExec(), impeller::Playground::OpenPlaygroundHere(), dart_utils::OpenVmo(), gfx::operator+(), base::internal::operator+(), gfx::operator-(), base::internal::operator-(), tonic::PackagesMap::Parse(), flutter::ParseCommaDelimited(), flutter_runner::ComponentV1::ParseProgramMetadata(), flutter_runner::ComponentV2::ParseProgramMetadata(), flutter::PlatformHandler::PlatformHandler(), impeller::egl::Surface::Present(), flutter::testing::TestGLSurface::Present(), ui::AXPlatformNodeWinTest::QueryInterfaceFromNode(), impeller::ArchiveLocation::Read(), filesystem::ReadFileToString(), reassign_method_cb(), flutter::KeyboardManagerWin32::RedispatchEvent(), impeller::RuntimeStagePlayground::RegisterStage(), fml::MallocMapping::Release(), impeller::LinearGradientContents::Render(), impeller::EntityPass::Render(), flutter::Animator::Render(), flutter::AndroidSurfaceGLSkia::ResourceContextClearCurrent(), dart_runner::DartComponentControllerV2::Run(), dart_runner::DartTestComponentControllerV2::Run(), FlutterEngine::run, flutter::testing::RunDartCodeInIsolate(), flutter::Shell::RunEngine(), RunFlutter(), RunFlutterEngine(), flutter::testing::AutoIsolateShutdown::RunInIsolateScope(), tonic::DartMicrotaskQueue::RunMicrotasks(), flutter::FlutterWindowsEngine::RunWithEntrypoint(), fml::paths::SanitizeURIEscapedCharacters(), flutter::BinaryMessengerImpl::Send(), send_events_events_cb(), send_response(), flutter::FlutterWindowsEngine::SendPlatformMessage(), ui::AXPosition< AXNodePosition, AXNode >::Serialize(), flutter::SerializeLayerSnapshot(), flutter::MethodChannel< T >::SetMethodCallHandler(), flutter::testing::TestDartNativeResolver::SetNativeResolverForIsolate(), flutter::PlatformHandlerWin32::SetPlainText(), tonic::DartConverter< TypedList< kTypeName, ElemType > >::SetReturnValue(), flutter::PlatformViewIOS::SetSemanticsEnabled(), flutter::EventChannel< T >::SetStreamHandler(), flutter::testing::FuchsiaShellTest::SetTimezone(), dart_runner::DartComponentControllerV2::SetUp(), dart_runner::DartTestComponentControllerV2::SetUp(), setup_locales(), SetUpLocales(), FlutterEngine::shutDownEngine, flutter::RuntimeController::Spawn(), flutter::Shell::Spawn(), flutter::Engine::Spawn(), flutter::DartServiceIsolate::Startup(), flutter::FlutterWindowsEngine::Stop(), fml::jni::StringToJavaString(), gfx::SubtractRects(), ui::AXPlatformNodeDelegateBase::SubtreeToStringHelper(), flutter::PlatformHandlerWin32::SystemSoundPlay(), impeller::Tessellator::Tessellate(), TEST(), fml::testing::TEST(), impeller::testing::TEST(), flutter::TEST(), flutter::testing::TEST(), gfx::TEST(), flutter::testing::TEST_F(), ui::TEST_F(), flutter_runner_test::TEST_F(), impeller::testing::TEST_P(), FlutterInputPluginTestObjc::testClearClientDuringComposing, flutter::testing::TestGLSurface::TestGLSurface(), flutter::TextInputPlugin::TextInputPlugin(), fml::TimerRearm(), tonic::DartConverter< DartConverterMapping >::ToDart(), tonic::DartConverter< std::vector< T > >::ToDart(), gfx::ToEnclosedRect(), gfx::ToEnclosedRectIgnoringError(), gfx::ToEnclosingRect(), gfx::ToEnclosingRectIgnoringError(), impeller::ToMTLRenderPassDescriptor(), gfx::ToNearestRect(), gfx::ToRoundedRect(), ui::AXTreeData::ToString(), ui::AXRelativeBounds::ToString(), ui::AXTreeUpdateBase< AXNodeData, AXTreeData >::ToString(), ui::AXTableInfo::ToString(), ui::AXNodeData::ToString(), impeller::compiler::ToString(), gfx::UnionRects(), flutter::PluginRegistrarWindows::UnregisterTopLevelWindowProcDelegate(), flutter::AccessibilityBridge::UpdateDelegate(), flutter::UploadRasterImage(), impeller::compiler::VertexTypeFromInputResource(), dart_utils::VmoFromFilename(), dart_utils::VmoFromFilenameAt(), flutter_runner::PointerDelegate::WatchLoop(), flutter::WriteServerErrorResponse(), zircon_dart_channel_create(), zircon_dart_handle_list_create(), _FlutterTaskRunner::~_FlutterTaskRunner(), flutter::AndroidEGLSurface::~AndroidEGLSurface(), flutter::AngleSurfaceManager::~AngleSurfaceManager(), tonic::FileLoader::~FileLoader(), fml::PlatformSemaphore::~PlatformSemaphore(), flutter::RuntimeController::~RuntimeController(), and flutter::testing::TestGLSurface::~TestGLSurface().