mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-02 06:46:32 -04:00
kbd: break out XKB kbd struct to a separate file
This commit is contained in:
parent
5ca1ee701b
commit
061bbd7049
5 changed files with 56 additions and 44 deletions
33
terminal.h
33
terminal.h
|
|
@ -8,14 +8,10 @@
|
|||
#include <threads.h>
|
||||
#include <semaphore.h>
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <primary-selection-unstable-v1.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-keysyms.h>
|
||||
|
||||
#include "font.h"
|
||||
#include "tllist.h"
|
||||
#include "wayland.h"
|
||||
#include "kbd.h"
|
||||
|
||||
#define likely(c) __builtin_expect(!!(c), 1)
|
||||
#define unlikely(c) __builtin_expect(!!(c), 0)
|
||||
|
|
@ -123,33 +119,6 @@ struct vt {
|
|||
struct attributes saved_attrs;
|
||||
};
|
||||
|
||||
struct kbd {
|
||||
struct xkb_context *xkb;
|
||||
struct xkb_keymap *xkb_keymap;
|
||||
struct xkb_state *xkb_state;
|
||||
struct xkb_compose_table *xkb_compose_table;
|
||||
struct xkb_compose_state *xkb_compose_state;
|
||||
struct {
|
||||
int fd;
|
||||
|
||||
bool dont_re_repeat;
|
||||
int32_t delay;
|
||||
int32_t rate;
|
||||
uint32_t key;
|
||||
} repeat;
|
||||
|
||||
xkb_mod_index_t mod_shift;
|
||||
xkb_mod_index_t mod_alt;
|
||||
xkb_mod_index_t mod_ctrl;
|
||||
xkb_mod_index_t mod_meta;
|
||||
|
||||
/* Enabled modifiers */
|
||||
bool shift;
|
||||
bool alt;
|
||||
bool ctrl;
|
||||
bool meta;
|
||||
};
|
||||
|
||||
enum cursor_keys { CURSOR_KEYS_DONTCARE, CURSOR_KEYS_NORMAL, CURSOR_KEYS_APPLICATION};
|
||||
enum keypad_keys { KEYPAD_DONTCARE, KEYPAD_NUMERICAL, KEYPAD_APPLICATION };
|
||||
enum charset { CHARSET_ASCII, CHARSET_GRAPHIC };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue