buffybox/buffyboard/sq2lv_layouts.h

71 lines
2 KiB
C
Raw Normal View History

2021-09-13 13:30:15 +02:00
/**
2021-09-19 21:06:03 +02:00
* Auto-generated with squeek2lvgl
2021-09-13 13:30:15 +02:00
**/
#ifndef SQ2LV_LAYOUTS_H
#define SQ2LV_LAYOUTS_H
#include "lvgl/lvgl.h"
2021-09-19 21:06:03 +02:00
#define SQ2LV_SCANCODES_ENABLED 1
2021-09-13 13:30:15 +02:00
/* Layout IDs, values can be used as indexes into the sq2lv_layouts array */
typedef enum {
SQ2LV_LAYOUT_NONE = -1,
2021-09-13 13:30:15 +02:00
SQ2LV_LAYOUT_TERMINAL_US = 0
} sq2lv_layout_id_t;
/* Layer type */
typedef struct {
/* Number of keys */
const int num_keys;
/* Key caps */
2021-09-23 13:19:02 +02:00
const char * const * const keycaps;
2021-09-20 10:18:53 +02:00
/* Key attributes */
2024-02-19 13:20:20 +00:00
const lv_buttonmatrix_ctrl_t * const attributes;
2021-09-13 20:11:35 +02:00
/* Number of modifier keys */
const int num_modifiers;
/* Button indexes of modifier keys */
const int * const modifier_idxs;
2021-09-13 13:30:15 +02:00
/* Number of buttons that trigger a layer switch */
const int num_switchers;
/* Button indexes that trigger a layer switch */
const int * const switcher_idxs;
/* Indexes of layers to jump to when triggering layer switch buttons */
const int * const switcher_dests;
/* Total number of scancodes */
const int num_scancodes;
/* Flat array of scancodes */
const int * const scancodes;
/* Start index in scancodes array for key cap */
const int * const scancode_idxs;
/* Number of scancodes for key cap */
const int * const scancode_nums;
} sq2lv_layer_t;
/* Layout type */
typedef struct {
2021-09-19 21:06:03 +02:00
/* Layout name */
const char * const name;
/* Layout short name */
const char * const short_name;
2021-09-13 13:30:15 +02:00
/* Total number of layers */
const int num_layers;
/* Layers array */
const sq2lv_layer_t * const layers;
} sq2lv_layout_t;
/* Layouts */
extern const int sq2lv_num_layouts;
extern const sq2lv_layout_t sq2lv_layouts[];
/* Layout names (suitable for use in lv_dropdown_t) */
extern const char * const sq2lv_layout_names;
2021-09-19 21:06:03 +02:00
extern const char * const sq2lv_layout_short_names;
2021-09-13 13:30:15 +02:00
/* Unique scancodes from all layout (suitable for setting up uinput devices) */
extern const int sq2lv_num_unique_scancodes;
extern const int sq2lv_unique_scancodes[];
#endif /* SQ2LV_LAYOUTS_H */