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_TEXT_INPUT_LINUX_FL_TEXT_INPUT_PLUGIN_H_
6#define FLUTTER_SHELL_TEXT_INPUT_LINUX_FL_TEXT_INPUT_PLUGIN_H_
7
8#include <gdk/gdk.h>
9
10#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
11
12G_BEGIN_DECLS
13
14G_DECLARE_FINAL_TYPE(FlTextInputPlugin,
15 fl_text_input_plugin,
16 FL,
17 TEXT_INPUT_PLUGIN,
18 GObject);
19
20/**
21 * FlTextInputPlugin:
22 *
23 * #FlTextInputPlugin is a plugin that implements the shell side
24 * of SystemChannels.textInput from the Flutter services library.
25 */
26
27/**
28 * fl_text_input_plugin_new:
29 * @messenger: an #FlBinaryMessenger.
30 *
31 * Creates a new plugin that implements SystemChannels.textInput from the
32 * Flutter services library.
33 *
34 * Returns: a new #FlTextInputPlugin.
35 */
36FlTextInputPlugin* fl_text_input_plugin_new(FlBinaryMessenger* messenger);
37
38/**
39 * fl_text_input_plugin_filter_keypress
40 * @plugin: an #FlTextInputPlugin.
41 * @event: a #GdkEventKey
42 *
43 * Process a Gdk key event.
44 *
45 * Returns: %TRUE if the event was used.
46 */
47gboolean fl_text_input_plugin_filter_keypress(FlTextInputPlugin* plugin,
48 GdkEventKey* event);
49
50G_END_DECLS
51
52#endif // FLUTTER_SHELL_TEXT_INPUT_LINUX_FL_TEXT_INPUT_PLUGIN_H_
53