Debian Codegraph @

squeek2lvgl/examples/de-with-custom-shift-keycap/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_DE = 0
21 } sq2lv_layout_id_t;
22
23 /* Layer type */
24 typedef struct {
25 /* Number of keys */
26 const int num_keys;
27 /* Key caps */
28 const char * const * const keycaps;
29 /* Key attributes */
30 const lv_btnmatrix_ctrl_t * const attributes;
31 /* Number of modifier keys */
32 const int num_modifiers;
33 /* Button indexes of modifier keys */
34 const int * const modifier_idxs;
35 /* Number of buttons that trigger a layer switch */
36 const int num_switchers;
37 /* Button indexes that trigger a layer switch */
38 const int * const switcher_idxs;
39 /* Indexes of layers to jump to when triggering layer switch buttons */
40 const int * const switcher_dests;
41 } sq2lv_layer_t;
42
43 /* Layout type */
44 typedef struct {
45 /* Layout name */
46 const char * const name;
47 /* Layout short name */
48 const char * const short_name;
49 /* Total number of layers */
50 const int num_layers;
51 /* Layers array */
52 const sq2lv_layer_t * const layers;
53 } sq2lv_layout_t;
54
55 /* Layouts */
56 extern const int sq2lv_num_layouts;
57 extern const sq2lv_layout_t sq2lv_layouts[];
58
59 /* Layout names (suitable for use in lv_dropdown_t) */
60 extern const char * const sq2lv_layout_names;
61 extern const char * const sq2lv_layout_short_names;
62
63 #endif /* SQ2LV_LAYOUTS_H */