From ed132e11271d18a5d8aa163096bc6192c694bc47 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Wed, 11 Oct 2017 08:47:14 -0500 Subject: Move key-matching functions into x.c Modifiers and keysyms are specific to X, and the functions match and kmap are only used in x.c. Needed to global-ize the key arrays and lengths from config.h (for now). Signed-off-by: Devin J. Pohly --- st.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'st.h') diff --git a/st.h b/st.h index 372462d..c255b7c 100644 --- a/st.h +++ b/st.h @@ -176,6 +176,16 @@ typedef struct { const Arg arg; } Shortcut; +typedef struct { + KeySym k; + uint mask; + char *s; + /* three valued logic variables: 0 indifferent, 1 on, -1 off */ + signed char appkey; /* application keypad */ + signed char appcursor; /* application cursor */ + signed char crlf; /* crlf mode */ +} Key; + void die(const char *, ...); void redraw(void); @@ -184,7 +194,6 @@ void tnew(int, int); void tresize(int, int); void tsetdirt(int, int); void tsetdirtattr(int); -int match(uint, uint); void ttynew(void); size_t ttyread(void); void ttyresize(int, int); @@ -193,9 +202,7 @@ void ttywrite(const char *, size_t); void resettitle(void); -char *kmap(KeySym, uint); void selclear(void); - void selinit(void); void selnormalize(void); int selected(int, int); @@ -255,7 +262,12 @@ extern MouseShortcut mshortcuts[]; extern size_t mshortcutslen; extern Shortcut shortcuts[]; extern size_t shortcutslen; +extern KeySym mappedkeys[]; +extern size_t mappedkeyslen; +extern uint ignoremod; extern uint forceselmod; +extern Key key[]; +extern size_t keyslen; extern uint selmasks[]; extern size_t selmaskslen; extern char ascii_printable[]; -- cgit v1.2.3-13-gbd6f