--- rxvt-unicode/src/rxvtlib.h.in 2003/11/25 11:52:42 1.3 +++ rxvt-unicode/src/rxvtlib.h.in 2004/01/31 02:14:58 1.10 @@ -1,7 +1,3 @@ -/* - * $Id: rxvtlib.h.in,v 1.3 2003/11/25 11:52:42 pcg Exp $ - */ - #ifndef _RXVTLIB_H_ /* include once only */ #define _RXVTLIB_H_ @@ -76,38 +72,11 @@ extern rxvt_t rxvt_current_term; -#define EXPLICIT_CONTEXT 1 - -#if EXPLICIT_CONTEXT - -# define pR rxvt_t rxvt_term -# define aR rxvt_term -# define pR_ pR, -# define aR_ aR, - -# define R rxvt_term - # define SET_R(r) rxvt_current_term = (r) # define GET_R rxvt_current_term -#else - -# define pR -# define pR_ -# define aR -# define aR_ - -# define R rxvt_current_term - -# define SET_R(r) rxvt_current_term = (r) -# define GET_R R - -#endif - -#define dR rxvt_t rxvt_term = GET_R - -#define scrollbar_visible(rxvtvars) ((rxvtvars)->scrollBar.state) -#define menubar_visible(rxvtvars) ((rxvtvars)->menuBar.state) +#define scrollbar_visible() scrollBar.state +#define menubar_visible() menuBar.state typedef struct { int32_t row; @@ -186,8 +155,8 @@ * normal `unscrolled' screen region */ typedef struct { - text_t **text; /* _all_ the text */ int16_t *tlen; /* length of each text line */ + text_t **text; /* _all_ the text */ rend_t **rend; /* rendition, uses RS_ flags */ row_col_t cur; /* cursor position on the screen */ uint16_t tscroll; /* top of settable scroll region */ @@ -280,26 +249,32 @@ short style; /* style: rxvt, xterm, next */ short width; /* scrollbar width */ Window win; - int (*update)(pR_ int, int, int, int); + int (rxvt_term::*update)(int, int, int, int); + + void setIdle() { state = 1 ; } + void setMotion() { state = 'm'; } + void setUp() { state = 'U'; } + void setDn() { state = 'D'; } } scrollBar_t; struct rxvt_vars { TermWin_t TermWin; scrollBar_t scrollBar; menuBar_t menuBar; - Display *Xdisplay; unsigned long Options; XSizeHints szHint; + Display *Xdisplay; + int Xdepth; + int Xscreen; + Visual *Xvisual; Colormap Xcmap; rxvt_color *PixColors; short numPixColors; Cursor TermWin_cursor; /* cursor for vt window */ - int Xdepth; int sb_shadow; /* scrollbar shadow width */ int Xfd; /* file descriptor of X server connection */ int cmd_fd; /* pty file descriptor; connected to command */ int tty_fd; /* tty file descriptor; connected to child */ - int num_fds; /* number of file descriptors being used */ int numlock_state; text_t **drawn_text; /* text drawn on screen (characters) */ rend_t **drawn_rend; /* text drawn on screen (rendition) */ @@ -312,6 +287,7 @@ sstyle_t selection_style; }; +void rxvt_init_signals (); rxvt_t rxvt_init (int argc, const char *const *argv); #endif /* _RXVTLIB_H_ */