--- rxvt-unicode/src/rxvtlib.h.in 2003/12/17 09:00:35 1.6 +++ rxvt-unicode/src/rxvtlib.h.in 2004/03/03 01:45:14 1.14 @@ -1,28 +1,6 @@ -/* - * $Id: rxvtlib.h.in,v 1.6 2003/12/17 09:00:35 pcg Exp $ - */ - #ifndef _RXVTLIB_H_ /* include once only */ #define _RXVTLIB_H_ -/* - * section 1 generated by GNU autoconf for @build@ - * this section may be changed as appropriate _before_ building - */ -/***************************************************************************** - * SECTION 1 * - *****************************************************************************/ - -/* - * The following line MUST not be changed without also changing - * config.h in the main directory before building - */ -// none anymore - -/***************************************************************************** - * INCLUDES * - *****************************************************************************/ - #include #include #include @@ -62,52 +40,23 @@ /* whatever normal size corresponds to a unsigned integer pointer */ @rxvt_u_intp_define@ -/***************************************************************************** - * SECTION 2 * - * DO NOT TOUCH ANYTHING BELOW HERE * - *****************************************************************************/ - struct rxvt_fontset; struct rxvt_color; struct rxvt_vars; /* defined later on */ struct rxvt_term; +struct rxvt_display; +struct rxvt_im; +struct rxvt_drawable; typedef struct rxvt_term *rxvt_t; 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; @@ -154,6 +103,7 @@ GC gc; /* GC for drawing */ Pixmap pixmap; rxvt_fontset *fontset; + rxvt_drawable *drawable; } TermWin_t; /* @@ -249,7 +199,7 @@ #define Opt_scrollTtyKeypress (1LU<<12) #define Opt_transparent (1LU<<13) #define Opt_transparent_all (1LU<<14) -#define Opt_mc_hack (1LU<<15) +#define Opt_15 (1LU<<15) // UNALLOCATED #define Opt_tripleclickwords (1LU<<16) #define Opt_scrollWithBuffer (1LU<<17) #define Opt_jumpScroll (1LU<<18) @@ -268,6 +218,7 @@ typedef struct { short state; Window win; + struct rxvt_drawable *drawable; } menuBar_t; typedef struct { @@ -280,23 +231,25 @@ 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; - Colormap Xcmap; + rxvt_display *display; 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 numlock_state;