| Flutter Linux Embedder |

fl_keyboard_layout.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_KEYBOARD_LAYOUT_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_LAYOUT_H_
7
8 #include <glib-object.h>
9 #include <stdint.h>
10
11 G_BEGIN_DECLS
12
13 G_DECLARE_FINAL_TYPE(FlKeyboardLayout,
14 fl_keyboard_layout,
15 FL,
16 KEYBOARD_LAYOUT,
17 GObject);
18
19 /**
20 * FlKeyboardLayout:
21 * Tracks keycode to to logical key mappings for #FlKeyboardHandler
22 */
23
24 /**
25 * fl_keyboard_layout_new:
26 *
27 * Create a new #FlKeyboardLayout.
28 *
29 * Returns: a new #FlKeyboardLayout.
30 */
31 FlKeyboardLayout* fl_keyboard_layout_new();
32
33 /**
34 * fl_keyboard_layout_has_group:
35 * @layout: a #FlKeyboardLayout.
36 * @group: a key group.
37 *
38 * Checks if a group is present in this layout.
39 *
40 * Returns: %TRUE if this group is present.
41 */
42 gboolean fl_keyboard_layout_has_group(FlKeyboardLayout* layout, uint8_t group);
43
44 /**
45 * fl_keyboard_layout_has_group:
46 * @layout: a #FlKeyboardLayout.
47 * @group: a key group.
48 * @logical_key: a logical keycode.
49 *
50 * Sets the logical key for a given group and keycode.
51 */
52 void fl_keyboard_layout_set_logical_key(FlKeyboardLayout* layout,
53 uint8_t group,
54 uint16_t keycode,
55 uint64_t logical_key);
56
57 /**
58 * fl_keyboard_layout_get_logical_key:
59 * @layout: a #FlKeyboardLayout.
60 * @group: a key group.
61 * @keycode: a keycode.
62 *
63 * Gets the logical key for the given group and keycode.
64 *
65 * Returns: the logical keycode or 0 if not set.
66 */
67 uint64_t fl_keyboard_layout_get_logical_key(FlKeyboardLayout* layout,
68 uint8_t group,
69 uint16_t keycode);
70
71 G_END_DECLS
72
73 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_LAYOUT_H_
FL
FL
Definition: fl_binary_messenger.cc:27
fl_keyboard_layout_set_logical_key
void fl_keyboard_layout_set_logical_key(FlKeyboardLayout *layout, uint8_t group, uint16_t keycode, uint64_t logical_key)
Definition: fl_keyboard_layout.cc:49
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlKeyboardLayout, fl_keyboard_layout, FL, KEYBOARD_LAYOUT, GObject)
fl_keyboard_layout_new
FlKeyboardLayout * fl_keyboard_layout_new()
Definition: fl_keyboard_layout.cc:40
fl_keyboard_layout_has_group
gboolean fl_keyboard_layout_has_group(FlKeyboardLayout *layout, uint8_t group)
Definition: fl_keyboard_layout.cc:45
fl_keyboard_layout_get_logical_key
uint64_t fl_keyboard_layout_get_logical_key(FlKeyboardLayout *layout, uint8_t group, uint16_t keycode)
Definition: fl_keyboard_layout.cc:65