ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtlib.h.in
(Generate patch)

Comparing rxvt-unicode/src/rxvtlib.h.in (file contents):
Revision 1.6 by pcg, Wed Dec 17 09:00:35 2003 UTC vs.
Revision 1.13 by pcg, Tue Feb 24 16:25:45 2004 UTC

1/*
2 * $Id: rxvtlib.h.in,v 1.6 2003/12/17 09:00:35 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
70struct rxvt_fontset; 43struct rxvt_fontset;
71struct rxvt_color; 44struct rxvt_color;
72struct rxvt_vars; /* defined later on */ 45struct rxvt_vars; /* defined later on */
73struct rxvt_term; 46struct rxvt_term;
47struct rxvt_display;
48struct rxvt_im;
49struct rxvt_drawable;
74 50
75typedef struct rxvt_term *rxvt_t; 51typedef struct rxvt_term *rxvt_t;
76 52
77extern rxvt_t rxvt_current_term; 53extern 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
112typedef struct { 61typedef 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
268typedef struct { 218typedef 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
273typedef struct { 224typedef 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);
235
236 void setIdle() { state = 1 ; }
237 void setMotion() { state = 'm'; }
238 void setUp() { state = 'U'; }
239 void setDn() { state = 'D'; }
284} scrollBar_t; 240} scrollBar_t;
285 241
286struct rxvt_vars { 242struct rxvt_vars {
287 TermWin_t TermWin; 243 TermWin_t TermWin;
288 scrollBar_t scrollBar; 244 scrollBar_t scrollBar;
289 menuBar_t menuBar; 245 menuBar_t menuBar;
290 Display *Xdisplay;
291 unsigned long Options; 246 unsigned long Options;
292 XSizeHints szHint; 247 XSizeHints szHint;
293 Colormap Xcmap; 248 rxvt_display *display;
294 rxvt_color *PixColors; 249 rxvt_color *PixColors;
295 short numPixColors; 250 short numPixColors;
296 Cursor TermWin_cursor; /* cursor for vt window */ 251 Cursor TermWin_cursor; /* cursor for vt window */
297 int Xdepth;
298 int sb_shadow; /* scrollbar shadow width */ 252 int sb_shadow; /* scrollbar shadow width */
299 int Xfd; /* file descriptor of X server connection */
300 int cmd_fd; /* pty file descriptor; connected to command */ 253 int cmd_fd; /* pty file descriptor; connected to command */
301 int tty_fd; /* tty file descriptor; connected to child */ 254 int tty_fd; /* tty file descriptor; connected to child */
302 int numlock_state; 255 int numlock_state;
303 text_t **drawn_text; /* text drawn on screen (characters) */ 256 text_t **drawn_text; /* text drawn on screen (characters) */
304 rend_t **drawn_rend; /* text drawn on screen (rendition) */ 257 rend_t **drawn_rend; /* text drawn on screen (rendition) */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines