aboutsummaryrefslogtreecommitdiff
path: root/win.h
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-23 14:16:52 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:56:26 -0600
commit05c66cb37d9ff278a3e0c45682c4b5e7945deb42 (patch)
tree273ee88089e86784a261c5564dd51e9489bcd09e /win.h
parent33201ac65f74e45b4fa60822ba9a538c3cfa9b25 (diff)
downloadst-patched-05c66cb37d9ff278a3e0c45682c4b5e7945deb42.tar.bz2
st-patched-05c66cb37d9ff278a3e0c45682c4b5e7945deb42.tar.xz
st-patched-05c66cb37d9ff278a3e0c45682c4b5e7945deb42.zip
Split mode bits between Term and TermWindow
Moves the mode bits used by x.c from Term to TermWindow, absorbing UI/input-related mode bits (visible/focused/numlock) along the way. This is gradually reducing external references to Term. Since TermWindow is already internal to x.c, we add xsetmode() to allow st to modify window bits in accordance with escape sequences. IS_SET() is redefined accordingly (term.mode in st.c, win.mode in x.c). Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'win.h')
-rw-r--r--win.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/win.h b/win.h
index 123662e..1e08b16 100644
--- a/win.h
+++ b/win.h
@@ -1,5 +1,28 @@
1/* See LICENSE for license details. */ 1/* See LICENSE for license details. */
2 2
3enum win_mode {
4 MODE_VISIBLE = 1 << 0,
5 MODE_FOCUSED = 1 << 1,
6 MODE_APPKEYPAD = 1 << 2,
7 MODE_MOUSEBTN = 1 << 3,
8 MODE_MOUSEMOTION = 1 << 4,
9 MODE_REVERSE = 1 << 5,
10 MODE_KBDLOCK = 1 << 6,
11 MODE_HIDE = 1 << 7,
12 MODE_APPCURSOR = 1 << 8,
13 MODE_MOUSESGR = 1 << 9,
14 MODE_8BIT = 1 << 10,
15 MODE_BLINK = 1 << 11,
16 MODE_FBLINK = 1 << 12,
17 MODE_FOCUS = 1 << 13,
18 MODE_MOUSEX10 = 1 << 14,
19 MODE_MOUSEMANY = 1 << 15,
20 MODE_BRCKTPASTE = 1 << 16,
21 MODE_NUMLOCK = 1 << 17,
22 MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\
23 |MODE_MOUSEMANY,
24};
25
3void draw(void); 26void draw(void);
4void drawregion(int, int, int, int); 27void drawregion(int, int, int, int);
5 28
@@ -10,5 +33,6 @@ void xloadcols(void);
10int xsetcolorname(int, const char *); 33int xsetcolorname(int, const char *);
11void xsettitle(char *); 34void xsettitle(char *);
12int xsetcursor(int); 35int xsetcursor(int);
36void xsetmode(int, unsigned int);
13void xsetpointermotion(int); 37void xsetpointermotion(int);
14void xsetsel(char *); 38void xsetsel(char *);