| Flutter Linux Embedder |

fl_text_input_plugin.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXT_INPUT_PLUGIN_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXT_INPUT_PLUGIN_H_
7
8 #include <gtk/gtk.h>
9
10 #include "flutter/shell/platform/linux/fl_key_event.h"
11 #include "flutter/shell/platform/linux/fl_text_input_view_delegate.h"
12 #include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
13
14 G_BEGIN_DECLS
15
16 G_DECLARE_DERIVABLE_TYPE(FlTextInputPlugin,
17 fl_text_input_plugin,
18 FL,
19 TEXT_INPUT_PLUGIN,
20 GObject);
21
22 /**
23 * FlTextInputPlugin:
24 *
25 * #FlTextInputPlugin is a plugin that implements the shell side
26 * of SystemChannels.textInput from the Flutter services library.
27 */
28
29 struct _FlTextInputPluginClass {
30 GObjectClass parent_class;
31
32 /**
33 * Virtual method called to filter a keypress.
34 */
35 gboolean (*filter_keypress)(FlTextInputPlugin* self, FlKeyEvent* event);
36 };
37
38 /**
39 * fl_text_input_plugin_new:
40 * @messenger: an #FlBinaryMessenger.
41 * @im_context: (allow-none): a #GtkIMContext.
42 * @view_delegate: an #FlTextInputViewDelegate.
43 *
44 * Creates a new plugin that implements SystemChannels.textInput from the
45 * Flutter services library.
46 *
47 * Returns: a new #FlTextInputPlugin.
48 */
49 FlTextInputPlugin* fl_text_input_plugin_new(
50 FlBinaryMessenger* messenger,
51 GtkIMContext* im_context,
52 FlTextInputViewDelegate* view_delegate);
53
54 /**
55 * fl_text_input_plugin_filter_keypress
56 * @plugin: an #FlTextInputPlugin.
57 * @event: a #FlKeyEvent
58 *
59 * Process a Gdk key event.
60 *
61 * Returns: %TRUE if the event was used.
62 */
63 gboolean fl_text_input_plugin_filter_keypress(FlTextInputPlugin* plugin,
64 FlKeyEvent* event);
65
66 G_END_DECLS
67
68 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXT_INPUT_PLUGIN_H_
event
FlKeyEvent * event
Definition: fl_key_channel_responder.cc:118
fl_text_input_plugin_filter_keypress
gboolean fl_text_input_plugin_filter_keypress(FlTextInputPlugin *plugin, FlKeyEvent *event)
Definition: fl_text_input_plugin.cc:776
fl_text_input_view_delegate.h
_FlKeyEvent
Definition: fl_key_event.h:31
G_DECLARE_DERIVABLE_TYPE
G_BEGIN_DECLS G_DECLARE_DERIVABLE_TYPE(FlTextInputPlugin, fl_text_input_plugin, FL, TEXT_INPUT_PLUGIN, GObject)
_FlTextInputPluginClass::filter_keypress
gboolean(* filter_keypress)(FlTextInputPlugin *self, FlKeyEvent *event)
Definition: fl_text_input_plugin.h:35
fl_binary_messenger.h
_FlTextInputPluginClass::parent_class
GObjectClass parent_class
Definition: fl_text_input_plugin.h:30
_FlTextInputPluginClass
Definition: fl_text_input_plugin.h:29
FL
FL
Definition: fl_binary_messenger.cc:27
fl_key_event.h
fl_text_input_plugin_new
FlTextInputPlugin * fl_text_input_plugin_new(FlBinaryMessenger *messenger, GtkIMContext *im_context, FlTextInputViewDelegate *view_delegate)
Definition: fl_text_input_plugin.cc:745