wip: initial input handling

This commit is contained in:
Daniel Eklöf 2019-06-19 10:04:47 +02:00
parent 3bd77bceb1
commit 71dde121e6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
9 changed files with 484 additions and 51 deletions

View file

@ -4,6 +4,11 @@
#include <stdbool.h>
#include <stddef.h>
#include <threads.h>
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-keysyms.h>
struct attributes {
bool bold;
bool italic;
@ -73,8 +78,29 @@ struct vt {
bool dim;
};
struct kbd {
struct xkb_context *xkb;
struct xkb_keymap *xkb_keymap;
struct xkb_state *xkb_state;
struct {
mtx_t mutex;
cnd_t cond;
int trigger;
int pipe_read_fd;
int pipe_write_fd;
enum {REPEAT_STOP, REPEAT_START, REPEAT_EXIT} cmd;
bool dont_re_repeat;
int32_t delay;
int32_t rate;
uint32_t key;
} repeat;
};
struct terminal {
pid_t slave;
int ptmx;
struct vt vt;
struct grid grid;
struct kbd kbd;
};