diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2012-02-16 00:33:11 +0100 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2012-02-16 00:33:11 +0100 |
commit | 8ebab415921d534461b0fb8bce8fa1442afaba42 (patch) | |
tree | fcd8f62b39d14cb9d081f030dfe3fc9493da1d15 | |
parent | 1ec0515e75320c42da4a224441642f82571e38b0 (diff) | |
download | st-patched-8ebab415921d534461b0fb8bce8fa1442afaba42.tar.bz2 st-patched-8ebab415921d534461b0fb8bce8fa1442afaba42.tar.xz st-patched-8ebab415921d534461b0fb8bce8fa1442afaba42.zip |
clean and name enum definitions.
-rw-r--r-- | st.c | 64 |
1 files changed, 54 insertions, 10 deletions
@@ -66,17 +66,61 @@ | |||
66 | #define X2COL(x) (((x) - BORDER)/xw.cw) | 66 | #define X2COL(x) (((x) - BORDER)/xw.cw) |
67 | #define Y2ROW(y) (((y) - BORDER)/xw.ch) | 67 | #define Y2ROW(y) (((y) - BORDER)/xw.ch) |
68 | 68 | ||
69 | /* Attribute, Cursor, Character state, Terminal mode, Screen draw mode */ | 69 | enum glyph_attribute { |
70 | enum { ATTR_NULL=0 , ATTR_REVERSE=1 , ATTR_UNDERLINE=2, ATTR_BOLD=4, ATTR_GFX=8 }; | 70 | ATTR_NULL = 0, |
71 | enum { CURSOR_UP, CURSOR_DOWN, CURSOR_LEFT, CURSOR_RIGHT, | 71 | ATTR_REVERSE = 1, |
72 | CURSOR_SAVE, CURSOR_LOAD }; | 72 | ATTR_UNDERLINE = 2, |
73 | enum { CURSOR_DEFAULT = 0, CURSOR_HIDE = 1, CURSOR_WRAPNEXT = 2 }; | 73 | ATTR_BOLD = 4, |
74 | enum { GLYPH_SET=1, GLYPH_DIRTY=2 }; | 74 | ATTR_GFX = 8, |
75 | enum { MODE_WRAP=1, MODE_INSERT=2, MODE_APPKEYPAD=4, MODE_ALTSCREEN=8, | 75 | }; |
76 | MODE_CRLF=16, MODE_MOUSEBTN=32, MODE_MOUSEMOTION=64, MODE_MOUSE=32|64, MODE_REVERSE=128 }; | 76 | |
77 | enum { ESC_START=1, ESC_CSI=2, ESC_OSC=4, ESC_TITLE=8, ESC_ALTCHARSET=16 }; | 77 | enum cursor_movement { |
78 | enum { WIN_VISIBLE=1, WIN_REDRAW=2, WIN_FOCUSED=4 }; | 78 | CURSOR_UP, |
79 | CURSOR_DOWN, | ||
80 | CURSOR_LEFT, | ||
81 | CURSOR_RIGHT, | ||
82 | CURSOR_SAVE, | ||
83 | CURSOR_LOAD | ||
84 | }; | ||
85 | |||
86 | enum cursor_state { | ||
87 | CURSOR_DEFAULT = 0, | ||
88 | CURSOR_HIDE = 1, | ||
89 | CURSOR_WRAPNEXT = 2 | ||
90 | }; | ||
91 | |||
92 | enum glyph_state { | ||
93 | GLYPH_SET = 1, | ||
94 | GLYPH_DIRTY = 2 | ||
95 | }; | ||
96 | |||
97 | enum term_mode { | ||
98 | MODE_WRAP = 1, | ||
99 | MODE_INSERT = 2, | ||
100 | MODE_APPKEYPAD = 4, | ||
101 | MODE_ALTSCREEN = 8, | ||
102 | MODE_CRLF = 16, | ||
103 | MODE_MOUSEBTN = 32, | ||
104 | MODE_MOUSEMOTION = 64, | ||
105 | MODE_MOUSE = 32|64, | ||
106 | MODE_REVERSE = 128 | ||
107 | }; | ||
108 | |||
109 | enum escape_state { | ||
110 | ESC_START = 1, | ||
111 | ESC_CSI = 2, | ||
112 | ESC_OSC = 4, | ||
113 | ESC_TITLE = 8, | ||
114 | ESC_ALTCHARSET = 16 | ||
115 | }; | ||
116 | |||
117 | enum window_state { | ||
118 | WIN_VISIBLE = 1, | ||
119 | WIN_REDRAW = 2, | ||
120 | WIN_FOCUSED = 4 | ||
121 | }; | ||
79 | 122 | ||
123 | /* bit macro */ | ||
80 | #undef B0 | 124 | #undef B0 |
81 | enum { B0=1, B1=2, B2=4, B3=8, B4=16, B5=32, B6=64, B7=128 }; | 125 | enum { B0=1, B1=2, B2=4, B3=8, B4=16, B5=32, B6=64, B7=128 }; |
82 | 126 | ||