This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Expand file tree
/
Copy pathfl_keyboard_layout.h
More file actions
73 lines (62 loc) · 1.95 KB
/
fl_keyboard_layout.h
File metadata and controls
73 lines (62 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_LAYOUT_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_LAYOUT_H_
#include <glib-object.h>
#include <stdint.h>
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(FlKeyboardLayout,
fl_keyboard_layout,
FL,
KEYBOARD_LAYOUT,
GObject);
/**
* FlKeyboardLayout:
* Tracks keycode to to logical key mappings for #FlKeyboardHandler
*/
/**
* fl_keyboard_layout_new:
*
* Create a new #FlKeyboardLayout.
*
* Returns: a new #FlKeyboardLayout.
*/
FlKeyboardLayout* fl_keyboard_layout_new();
/**
* fl_keyboard_layout_has_group:
* @layout: a #FlKeyboardLayout.
* @group: a key group.
*
* Checks if a group is present in this layout.
*
* Returns: %TRUE if this group is present.
*/
gboolean fl_keyboard_layout_has_group(FlKeyboardLayout* layout, uint8_t group);
/**
* fl_keyboard_layout_has_group:
* @layout: a #FlKeyboardLayout.
* @group: a key group.
* @logical_key: a logical keycode.
*
* Sets the logical key for a given group and keycode.
*/
void fl_keyboard_layout_set_logical_key(FlKeyboardLayout* layout,
uint8_t group,
uint16_t keycode,
uint64_t logical_key);
/**
* fl_keyboard_layout_get_logical_key:
* @layout: a #FlKeyboardLayout.
* @group: a key group.
* @keycode: a keycode.
*
* Gets the logical key for the given group and keycode.
*
* Returns: the logical keycode or 0 if not set.
*/
uint64_t fl_keyboard_layout_get_logical_key(FlKeyboardLayout* layout,
uint8_t group,
uint16_t keycode);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_KEYBOARD_LAYOUT_H_