summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2012-02-16 00:33:11 +0100
committerAurélien Aptel <aurelien.aptel@gmail.com>2012-02-16 00:33:11 +0100
commit53ac69e90d95e52dedf99129e39a993d45c812ea (patch)
treefcd8f62b39d14cb9d081f030dfe3fc9493da1d15 /st.c
parent751fb765e4f26ce1500b4e8ee9f4cd5b6039b495 (diff)
clean and name enum definitions.
Diffstat (limited to 'st.c')
-rw-r--r--st.c64
1 files changed, 54 insertions, 10 deletions
diff --git a/st.c b/st.c
index e6a5e4e..89d123c 100644
--- a/st.c
+++ b/st.c
@@ -66,17 +66,61 @@
#define X2COL(x) (((x) - BORDER)/xw.cw)
#define Y2ROW(y) (((y) - BORDER)/xw.ch)
-/* Attribute, Cursor, Character state, Terminal mode, Screen draw mode */
-enum { ATTR_NULL=0 , ATTR_REVERSE=1 , ATTR_UNDERLINE=2, ATTR_BOLD=4, ATTR_GFX=8 };
-enum { CURSOR_UP, CURSOR_DOWN, CURSOR_LEFT, CURSOR_RIGHT,
- CURSOR_SAVE, CURSOR_LOAD };
-enum { CURSOR_DEFAULT = 0, CURSOR_HIDE = 1, CURSOR_WRAPNEXT = 2 };
-enum { GLYPH_SET=1, GLYPH_DIRTY=2 };
-enum { MODE_WRAP=1, MODE_INSERT=2, MODE_APPKEYPAD=4, MODE_ALTSCREEN=8,
- MODE_CRLF=16, MODE_MOUSEBTN=32, MODE_MOUSEMOTION=64, MODE_MOUSE=32|64, MODE_REVERSE=128 };
-enum { ESC_START=1, ESC_CSI=2, ESC_OSC=4, ESC_TITLE=8, ESC_ALTCHARSET=16 };
-enum { WIN_VISIBLE=1, WIN_REDRAW=2, WIN_FOCUSED=4 };
+enum glyph_attribute {
+ ATTR_NULL = 0,
+ ATTR_REVERSE = 1,
+ ATTR_UNDERLINE = 2,
+ ATTR_BOLD = 4,
+ ATTR_GFX = 8,
+};
+
+enum cursor_movement {
+ CURSOR_UP,
+ CURSOR_DOWN,
+ CURSOR_LEFT,
+ CURSOR_RIGHT,
+ CURSOR_SAVE,
+ CURSOR_LOAD
+};
+
+enum cursor_state {
+ CURSOR_DEFAULT = 0,
+ CURSOR_HIDE = 1,
+ CURSOR_WRAPNEXT = 2
+};
+
+enum glyph_state {
+ GLYPH_SET = 1,
+ GLYPH_DIRTY = 2
+};
+
+enum term_mode {
+ MODE_WRAP = 1,
+ MODE_INSERT = 2,
+ MODE_APPKEYPAD = 4,
+ MODE_ALTSCREEN = 8,
+ MODE_CRLF = 16,
+ MODE_MOUSEBTN = 32,
+ MODE_MOUSEMOTION = 64,
+ MODE_MOUSE = 32|64,
+ MODE_REVERSE = 128
+};
+
+enum escape_state {
+ ESC_START = 1,
+ ESC_CSI = 2,
+ ESC_OSC = 4,
+ ESC_TITLE = 8,
+ ESC_ALTCHARSET = 16
+};
+
+enum window_state {
+ WIN_VISIBLE = 1,
+ WIN_REDRAW = 2,
+ WIN_FOCUSED = 4
+};
+/* bit macro */
#undef B0
enum { B0=1, B1=2, B2=4, B3=8, B4=16, B5=32, B6=64, B7=128 };