--- rxvt-unicode/src/rxvt.h 2004/01/31 00:20:21 1.27 +++ rxvt-unicode/src/rxvt.h 2004/02/09 22:45:29 1.32 @@ -184,7 +184,7 @@ #define scrollBar_esc 30 #define menuBar_margin 2 /* margin below text */ -#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) +#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) # define HAVE_SCROLLBARS #endif @@ -202,9 +202,11 @@ #define R_SB_RXVT 0 #define R_SB_NEXT 1 #define R_SB_XTERM 2 +#define R_SB_PLAIN 4 #define SB_WIDTH_NEXT 19 -#define SB_WIDTH_XTERM 7 +#define SB_WIDTH_XTERM 15 +#define SB_WIDTH_PLAIN 7 #ifndef SB_WIDTH_RXVT # define SB_WIDTH_RXVT 10 #endif @@ -606,9 +608,9 @@ (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) #endif -#define XDEPTH Xdepth -#define XCMAP Xcmap -#define XVISUAL Xvisual +#define XDEPTH display->depth +#define XCMAP display->cmap +#define XVISUAL display->visual #define IMBUFSIZ 128 /* input modifier buffer sizes */ #ifndef BUFSIZ @@ -650,8 +652,6 @@ #define TermWin_TotalWidth() ((int32_t)TermWin.width + 2 * (int32_t)TermWin.int_bwidth) #define TermWin_TotalHeight() ((int32_t)TermWin.height + 2 * (int32_t)TermWin.int_bwidth) -#define Xroot DefaultRootWindow(Xdisplay) - /* how to build & extract colors and attributes */ #define GET_BASEFG(x) (((x) & RS_fgMask)) #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) @@ -950,6 +950,9 @@ GC xscrollbarGC, ShadowGC; #endif +#ifdef PLAIN_SCROLLBAR + GC pscrollbarGC; +#endif #ifdef NEXT_SCROLLBAR GC blackGC, whiteGC, @@ -1070,11 +1073,23 @@ void flush (); + void rootwin_cb (XEvent &xev); + xevent_watcher rootwin_ev; + + void x_cb (XEvent &xev); + xevent_watcher termwin_ev; + xevent_watcher vt_ev; +#ifdef HAVE_SCROLLBARS + xevent_watcher scrollbar_ev; +#endif +#ifdef MENUBAR + xevent_watcher menubar_ev; +#endif + void check_cb (check_watcher &w); check_watcher check_ev; void destroy_cb (time_watcher &w); time_watcher destroy_ev; void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; - void x_cb (io_watcher &w, short revents); io_watcher x_ev; void incr_cb (time_watcher &w); time_watcher incr_ev; @@ -1106,7 +1121,6 @@ uint32_t next_char (); bool pty_fill (); - void process_x_events (); void *operator new (size_t s); void operator delete (void *p, size_t s); @@ -1158,13 +1172,12 @@ /* autoconvert */ // command.C - void lookup_key (XKeyEvent *ev); + void lookup_key (XKeyEvent &ev); unsigned int cmd_write (const unsigned char *str, unsigned int count); uint32_t cmd_getc (); - void mouse_report (const XButtonEvent *ev); - void process_x_event (XEvent *ev); - void button_press (XButtonEvent *ev); - void button_release (XButtonEvent *ev); + void mouse_report (const XButtonEvent &ev); + void button_press (const XButtonEvent &ev); + void button_release (const XButtonEvent &ev); int check_our_parents (); #ifdef PRINTPIPE FILE * popen_printer (); @@ -1286,7 +1299,7 @@ void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret); void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange); void selection_remove_trailing_spaces (); - void selection_send (const XSelectionRequestEvent *rq); + void selection_send (const XSelectionRequestEvent &rq); #if defined(NEXT_SCROLLBAR) // scrollbar-next.C @@ -1294,20 +1307,22 @@ void init_scrollbar_stuff (); void drawBevel (Drawable d, int x1, int y1, int w, int h); int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_next // HACK #endif #if defined(RXVT_SCROLLBAR) // scrollbar-rxvt.C void Draw_button (int x, int y, int state, int dirn); int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_rxvt // HACK #endif #if defined(XTERM_SCROLLBAR) // scrollbar-xterm.C int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len); -# define scrollbar_update scrollbar_show_xterm // HACK +#endif + +#if defined(PLAIN_SCROLLBAR) + // scrollbar-plain.C + int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len); #endif // scrollbar.C