Flutter Engine
 
Loading...
Searching...
No Matches
fl_key_event_channel.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_KEY_EVENT_CHANNEL_H_
6#define FLUTTER_SHELL_PLATFORM_LINUX_FL_KEY_EVENT_CHANNEL_H_
7
9
10G_BEGIN_DECLS
11
12G_DECLARE_FINAL_TYPE(FlKeyEventChannel,
13 fl_key_event_channel,
14 FL,
15 KEY_EVENT_CHANNEL,
16 GObject);
17
18/**
19 * FlKeyEventChannel:
20 *
21 * #FlKeyEventChannel is a channel that implements the shell side
22 * of SystemChannels.keyEvent from the Flutter services library.
23 */
24
29
30/**
31 * fl_key_event_channel_new:
32 * @messenger: an #FlBinaryMessenger
33 *
34 * Creates a new channel that implements SystemChannels.keyEvent from the
35 * Flutter services library.
36 *
37 * Returns: a new #FlKeyEventChannel.
38 */
39FlKeyEventChannel* fl_key_event_channel_new(FlBinaryMessenger* messenger);
40
41/**
42 * fl_key_event_channel_send:
43 * @channel: an #FlKeyEventChannel
44 * @type: event type.
45 * @scan_code: scan code.
46 * @key_code: key code.
47 * @modifiers: modifiers.
48 * @unicode_scarlar_values:
49 * @specified_logical_key:
50 * @cancellable: (allow-none): a #GCancellable or %NULL.
51 * @callback: (scope async): a #GAsyncReadyCallback to call when the method
52 * returns.
53 * @user_data: (closure): user data to pass to @callback.
54 *
55 * Send a key event to the platform.
56 */
57void fl_key_event_channel_send(FlKeyEventChannel* channel,
59 int64_t scan_code,
60 int64_t key_code,
61 int64_t modifiers,
62 int64_t unicode_scarlar_values,
63 int64_t specified_logical_key,
64 GCancellable* cancellable,
65 GAsyncReadyCallback callback,
66 gpointer user_data);
67
68/**
69 * fl_key_event_channel_send_finish:
70 * @object:
71 * @result: a #GAsyncResult.
72 * @error: (allow-none): #GError location to store the error occurring, or %NULL
73 * to ignore.
74 *
75 * Completes request started with fl_key_event_channel_send().
76 *
77 * Returns: %TRUE on success.
78 */
79gboolean fl_key_event_channel_send_finish(GObject* object,
80 GAsyncResult* result,
81 gboolean* handled,
82 GError** error);
83
84G_END_DECLS
85
86#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_KEY_EVENT_CHANNEL_H_
GLenum type
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlKeyEventChannel, fl_key_event_channel, FL, KEY_EVENT_CHANNEL, GObject)
FlKeyEventChannel * fl_key_event_channel_new(FlBinaryMessenger *messenger)
gboolean fl_key_event_channel_send_finish(GObject *object, GAsyncResult *result, gboolean *handled, GError **error)
@ FL_KEY_EVENT_TYPE_KEYDOWN
@ FL_KEY_EVENT_TYPE_KEYUP
void fl_key_event_channel_send(FlKeyEventChannel *channel, FlKeyEventType type, int64_t scan_code, int64_t key_code, int64_t modifiers, int64_t unicode_scarlar_values, int64_t specified_logical_key, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
const gchar * channel
const uint8_t uint32_t uint32_t GError ** error
FlutterDesktopBinaryReply callback