Debian Codegraph @

squeek2lvgl/examples/es+fr+us/sq2lv_layouts.h

raw
1 /**
2 * Auto-generated with squeek2lvgl
3 **/
4
5 #ifndef SQ2LV_LAYOUTS_H
6 #define SQ2LV_LAYOUTS_H
7
8 #include "lvgl/lvgl.h"
9
10 #define SQ2LV_SCANCODES_ENABLED 0
11
12 /* Key attributes */
13 #define SQ2LV_CTRL_NON_CHAR (LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_CHECKED)
14 #define SQ2LV_CTRL_MOD_ACTIVE (LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_CHECKABLE)
15 #define SQ2LV_CTRL_MOD_INACTIVE (LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_CHECKABLE | LV_BTNMATRIX_CTRL_CHECKED)
16
17 /* Layout IDs, values can be used as indexes into the sq2lv_layouts array */
18 typedef enum {
19 SQ2LV_LAYOUT_NONE = -1,
20 SQ2LV_LAYOUT_ES = 0,
21 SQ2LV_LAYOUT_FR = 1,
22 SQ2LV_LAYOUT_US = 2
23 } sq2lv_layout_id_t;
24
25 /* Layer type */
26 typedef struct {
27 /* Number of keys */
28 const int num_keys;
29 /* Key caps */
30 const char * const * const keycaps;
31 /* Key attributes */
32 const lv_btnmatrix_ctrl_t * const attributes;
33 /* Number of modifier keys */
34 const int num_modifiers;
35 /* Button indexes of modifier keys */
36 const int * const modifier_idxs;
37 /* Number of buttons that trigger a layer switch */
38 const int num_switchers;
39 /* Button indexes that trigger a layer switch */
40 const int * const switcher_idxs;
41 /* Indexes of layers to jump to when triggering layer switch buttons */
42 const int * const switcher_dests;
43 } sq2lv_layer_t;
44
45 /* Layout type */
46 typedef struct {
47 /* Layout name */
48 const char * const name;
49 /* Layout short name */
50 const char * const short_name;
51 /* Total number of layers */
52 const int num_layers;
53 /* Layers array */
54 const sq2lv_layer_t * const layers;
55 } sq2lv_layout_t;
56
57 /* Layouts */
58 extern const int sq2lv_num_layouts;
59 extern const sq2lv_layout_t sq2lv_layouts[];
60
61 /* Layout names (suitable for use in lv_dropdown_t) */
62 extern const char * const sq2lv_layout_names;
63 extern const char * const sq2lv_layout_short_names;
64
65 #endif /* SQ2LV_LAYOUTS_H */