aboutsummaryrefslogtreecommitdiff
path: root/st.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2017-10-11 08:47:14 -0500
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commited132e11271d18a5d8aa163096bc6192c694bc47 (patch)
tree81b7a8ef14efadfaee06e7848a1c7ab953cd5ce6 /st.h
parentdbe8676d7d69651132bde2b6d9ec3787cbbc552a (diff)
downloadst-ed132e11271d18a5d8aa163096bc6192c694bc47.tar.gz
st-ed132e11271d18a5d8aa163096bc6192c694bc47.tar.bz2
st-ed132e11271d18a5d8aa163096bc6192c694bc47.zip
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 <djpohly@gmail.com>
Diffstat (limited to 'st.h')
-rw-r--r--st.h18
1 files changed, 15 insertions, 3 deletions
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[];