From 71dde121e63177b0fc1bc2d6897e63e533d666fc Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 19 Jun 2019 10:04:47 +0200 Subject: wip: initial input handling --- terminal.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index efea5106..51c5af3d 100644 --- a/terminal.h +++ b/terminal.h @@ -4,6 +4,11 @@ #include #include +#include + +#include +#include + 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; }; -- cgit v1.3