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.4 by pcg, Thu Nov 27 10:12:10 2003 UTC vs.
Revision 1.12 by pcg, Tue Feb 24 00:44:23 2004 UTC

1/*
2 * $Id: rxvtlib.h.in,v 1.4 2003/11/27 10:12:10 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
184 * scrollback region : we're only here if TermWin.view_start != 0 134 * scrollback region : we're only here if TermWin.view_start != 0
185 * Rows [TermWin.saveLines] ... [TermWin.saveLines + TermWin.nrow - 1] 135 * Rows [TermWin.saveLines] ... [TermWin.saveLines + TermWin.nrow - 1]
186 * normal `unscrolled' screen region 136 * normal `unscrolled' screen region
187 */ 137 */
188typedef struct { 138typedef struct {
139 int16_t *tlen; /* length of each text line */
189 text_t **text; /* _all_ the text */ 140 text_t **text; /* _all_ the text */
190 int16_t *tlen; /* length of each text line */
191 rend_t **rend; /* rendition, uses RS_ flags */ 141 rend_t **rend; /* rendition, uses RS_ flags */
192 row_col_t cur; /* cursor position on the screen */ 142 row_col_t cur; /* cursor position on the screen */
193 uint16_t tscroll; /* top of settable scroll region */ 143 uint16_t tscroll; /* top of settable scroll region */
194 uint16_t bscroll; /* bottom of settable scroll region */ 144 uint16_t bscroll; /* bottom of settable scroll region */
195 uint16_t charset; /* character set number [0..3] */ 145 uint16_t charset; /* character set number [0..3] */
278 short top; /* slider top position */ 228 short top; /* slider top position */
279 short bot; /* slider bottom position */ 229 short bot; /* slider bottom position */
280 short style; /* style: rxvt, xterm, next */ 230 short style; /* style: rxvt, xterm, next */
281 short width; /* scrollbar width */ 231 short width; /* scrollbar width */
282 Window win; 232 Window win;
283 int (*update)(pR_ int, int, int, int); 233 int (rxvt_term::*update)(int, int, int, int);
234
235 void setIdle() { state = 1 ; }
236 void setMotion() { state = 'm'; }
237 void setUp() { state = 'U'; }
238 void setDn() { state = 'D'; }
284} scrollBar_t; 239} scrollBar_t;
285 240
286struct rxvt_vars { 241struct rxvt_vars {
287 TermWin_t TermWin; 242 TermWin_t TermWin;
288 scrollBar_t scrollBar; 243 scrollBar_t scrollBar;
289 menuBar_t menuBar; 244 menuBar_t menuBar;
290 Display *Xdisplay;
291 unsigned long Options; 245 unsigned long Options;
292 XSizeHints szHint; 246 XSizeHints szHint;
293 Colormap Xcmap; 247 rxvt_display *display;
294 rxvt_color *PixColors; 248 rxvt_color *PixColors;
295 short numPixColors; 249 short numPixColors;
296 Cursor TermWin_cursor; /* cursor for vt window */ 250 Cursor TermWin_cursor; /* cursor for vt window */
297 int Xdepth;
298 int sb_shadow; /* scrollbar shadow width */ 251 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 */ 252 int cmd_fd; /* pty file descriptor; connected to command */
301 int tty_fd; /* tty file descriptor; connected to child */ 253 int tty_fd; /* tty file descriptor; connected to child */
302 int num_fds; /* number of file descriptors being used */
303 int numlock_state; 254 int numlock_state;
304 text_t **drawn_text; /* text drawn on screen (characters) */ 255 text_t **drawn_text; /* text drawn on screen (characters) */
305 rend_t **drawn_rend; /* text drawn on screen (rendition) */ 256 rend_t **drawn_rend; /* text drawn on screen (rendition) */
306 text_t **buf_text; 257 text_t **buf_text;
307 rend_t **buf_rend; 258 rend_t **buf_rend;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines