1 | /* |
|
|
2 | * $Id: rxvtlib.h.in,v 1.8 2004/01/19 17:26:43 pcg Exp $ |
|
|
3 | */ |
|
|
4 | |
|
|
5 | #ifndef _RXVTLIB_H_ /* include once only */ |
1 | #ifndef _RXVTLIB_H_ /* include once only */ |
6 | #define _RXVTLIB_H_ |
2 | #define _RXVTLIB_H_ |
7 | |
|
|
8 | /* |
|
|
9 | * section 1 generated by GNU autoconf for @build@ |
|
|
10 | * this section may be changed as appropriate _before_ building |
|
|
11 | */ |
|
|
12 | /***************************************************************************** |
|
|
13 | * SECTION 1 * |
|
|
14 | *****************************************************************************/ |
|
|
15 | |
|
|
16 | /* |
|
|
17 | * The following line MUST not be changed without also changing |
|
|
18 | * config.h in the main directory before building |
|
|
19 | */ |
|
|
20 | // none anymore |
|
|
21 | |
|
|
22 | /***************************************************************************** |
|
|
23 | * INCLUDES * |
|
|
24 | *****************************************************************************/ |
|
|
25 | |
3 | |
26 | #include <stdio.h> |
4 | #include <stdio.h> |
27 | #include <ctype.h> |
5 | #include <ctype.h> |
28 | #include <errno.h> |
6 | #include <errno.h> |
29 | @include_stdarg_h@ |
7 | @include_stdarg_h@ |
… | |
… | |
60 | /* whatever normal size corresponds to a integer pointer */ |
38 | /* whatever normal size corresponds to a integer pointer */ |
61 | @rxvt_intp_define@ |
39 | @rxvt_intp_define@ |
62 | /* whatever normal size corresponds to a unsigned integer pointer */ |
40 | /* whatever normal size corresponds to a unsigned integer pointer */ |
63 | @rxvt_u_intp_define@ |
41 | @rxvt_u_intp_define@ |
64 | |
42 | |
65 | /***************************************************************************** |
|
|
66 | * SECTION 2 * |
|
|
67 | * DO NOT TOUCH ANYTHING BELOW HERE * |
|
|
68 | *****************************************************************************/ |
|
|
69 | |
|
|
70 | struct rxvt_fontset; |
43 | struct rxvt_fontset; |
71 | struct rxvt_color; |
44 | struct rxvt_color; |
72 | struct rxvt_vars; /* defined later on */ |
45 | struct rxvt_vars; /* defined later on */ |
73 | struct rxvt_term; |
46 | struct rxvt_term; |
|
|
47 | struct rxvt_display; |
|
|
48 | struct rxvt_im; |
|
|
49 | struct rxvt_drawable; |
74 | |
50 | |
75 | typedef struct rxvt_term *rxvt_t; |
51 | typedef struct rxvt_term *rxvt_t; |
76 | |
52 | |
77 | extern rxvt_t rxvt_current_term; |
53 | extern rxvt_t rxvt_current_term; |
78 | |
|
|
79 | #define EXPLICIT_CONTEXT 1 |
|
|
80 | |
|
|
81 | #if EXPLICIT_CONTEXT |
|
|
82 | |
|
|
83 | # define pR rxvt_t rxvt_term |
|
|
84 | # define aR rxvt_term |
|
|
85 | # define pR_ pR, |
|
|
86 | # define aR_ aR, |
|
|
87 | |
|
|
88 | # define R rxvt_term |
|
|
89 | |
54 | |
90 | # define SET_R(r) rxvt_current_term = (r) |
55 | # define SET_R(r) rxvt_current_term = (r) |
91 | # define GET_R rxvt_current_term |
56 | # define GET_R rxvt_current_term |
92 | |
57 | |
93 | #else |
|
|
94 | |
|
|
95 | # define pR |
|
|
96 | # define pR_ |
|
|
97 | # define aR |
|
|
98 | # define aR_ |
|
|
99 | |
|
|
100 | # define R rxvt_current_term |
|
|
101 | |
|
|
102 | # define SET_R(r) rxvt_current_term = (r) |
|
|
103 | # define GET_R R |
|
|
104 | |
|
|
105 | #endif |
|
|
106 | |
|
|
107 | #define dR rxvt_t rxvt_term = GET_R |
|
|
108 | |
|
|
109 | #define scrollbar_visible(rxvtvars) ((rxvtvars)->scrollBar.state) |
58 | #define scrollbar_visible() scrollBar.state |
110 | #define menubar_visible(rxvtvars) ((rxvtvars)->menuBar.state) |
59 | #define menubar_visible() menuBar.state |
111 | |
60 | |
112 | typedef struct { |
61 | typedef struct { |
113 | int32_t row; |
62 | int32_t row; |
114 | int32_t col; |
63 | int32_t col; |
115 | } row_col_t; |
64 | } row_col_t; |
… | |
… | |
152 | Window parent[6]; /* parent identifiers - we're parent[0] */ |
101 | Window parent[6]; /* parent identifiers - we're parent[0] */ |
153 | Window vt; /* vt100 window */ |
102 | Window vt; /* vt100 window */ |
154 | GC gc; /* GC for drawing */ |
103 | GC gc; /* GC for drawing */ |
155 | Pixmap pixmap; |
104 | Pixmap pixmap; |
156 | rxvt_fontset *fontset; |
105 | rxvt_fontset *fontset; |
|
|
106 | rxvt_drawable *drawable; |
157 | } TermWin_t; |
107 | } TermWin_t; |
158 | |
108 | |
159 | /* |
109 | /* |
160 | * screen accounting: |
110 | * screen accounting: |
161 | * screen_t elements |
111 | * screen_t elements |
… | |
… | |
266 | /* ------------------------------------------------------------------------- */ |
216 | /* ------------------------------------------------------------------------- */ |
267 | |
217 | |
268 | typedef struct { |
218 | typedef struct { |
269 | short state; |
219 | short state; |
270 | Window win; |
220 | Window win; |
|
|
221 | struct rxvt_drawable *drawable; |
271 | } menuBar_t; |
222 | } menuBar_t; |
272 | |
223 | |
273 | typedef struct { |
224 | typedef struct { |
274 | char state; /* scrollbar state */ |
225 | char state; /* scrollbar state */ |
275 | char init; /* scrollbar has been initialised */ |
226 | char init; /* scrollbar has been initialised */ |
… | |
… | |
278 | short top; /* slider top position */ |
229 | short top; /* slider top position */ |
279 | short bot; /* slider bottom position */ |
230 | short bot; /* slider bottom position */ |
280 | short style; /* style: rxvt, xterm, next */ |
231 | short style; /* style: rxvt, xterm, next */ |
281 | short width; /* scrollbar width */ |
232 | short width; /* scrollbar width */ |
282 | Window win; |
233 | Window win; |
283 | int (*update)(pR_ int, int, int, int); |
234 | int (rxvt_term::*update)(int, int, int, int); |
284 | |
235 | |
285 | void setIdle() { state = 1 ; } |
236 | void setIdle() { state = 1 ; } |
286 | void setMotion() { state = 'm'; } |
237 | void setMotion() { state = 'm'; } |
287 | void setUp() { state = 'U'; } |
238 | void setUp() { state = 'U'; } |
288 | void setDn() { state = 'D'; } |
239 | void setDn() { state = 'D'; } |
… | |
… | |
292 | TermWin_t TermWin; |
243 | TermWin_t TermWin; |
293 | scrollBar_t scrollBar; |
244 | scrollBar_t scrollBar; |
294 | menuBar_t menuBar; |
245 | menuBar_t menuBar; |
295 | unsigned long Options; |
246 | unsigned long Options; |
296 | XSizeHints szHint; |
247 | XSizeHints szHint; |
297 | Display *Xdisplay; |
248 | rxvt_display *display; |
298 | int Xdepth; |
|
|
299 | int Xscreen; |
|
|
300 | Visual *Xvisual; |
|
|
301 | Colormap Xcmap; |
|
|
302 | rxvt_color *PixColors; |
249 | rxvt_color *PixColors; |
303 | short numPixColors; |
250 | short numPixColors; |
304 | Cursor TermWin_cursor; /* cursor for vt window */ |
251 | Cursor TermWin_cursor; /* cursor for vt window */ |
305 | int sb_shadow; /* scrollbar shadow width */ |
252 | int sb_shadow; /* scrollbar shadow width */ |
306 | int Xfd; /* file descriptor of X server connection */ |
|
|
307 | int cmd_fd; /* pty file descriptor; connected to command */ |
253 | int cmd_fd; /* pty file descriptor; connected to command */ |
308 | int tty_fd; /* tty file descriptor; connected to child */ |
254 | int tty_fd; /* tty file descriptor; connected to child */ |
309 | int numlock_state; |
255 | int numlock_state; |
310 | text_t **drawn_text; /* text drawn on screen (characters) */ |
256 | text_t **drawn_text; /* text drawn on screen (characters) */ |
311 | rend_t **drawn_rend; /* text drawn on screen (rendition) */ |
257 | rend_t **drawn_rend; /* text drawn on screen (rendition) */ |