--- rxvt-unicode/src/scrollbar.h 2007/12/31 01:05:51 1.7 +++ rxvt-unicode/src/scrollbar.h 2008/01/05 12:19:34 1.11 @@ -5,7 +5,7 @@ struct rxvt_term; -typedef struct { +struct scrollBar_t { char state; /* scrollbar state */ char init; /* scrollbar has been initialised */ unsigned int beg; /* slider sub-window begin height */ @@ -18,22 +18,23 @@ int last_bot; /* scrollbar last bottom position */ int last_top; /* scrollbar last top position */ int last_state; /* scrollbar last state */ + int len; unsigned char align; Window win; + Cursor leftptr_cursor; 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; +}; #define scrollbar_TotalWidth() (scrollBar.width + scrollBar.shadow * 2) #define scrollbar_isMotion() (scrollBar.state == 'm') #define scrollbar_isUp() (scrollBar.state == 'U') #define scrollbar_isDn() (scrollBar.state == 'D') #define scrollbar_isUpDn() (scrollbar_isUp () || scrollbar_isDn ()) -#define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win) #define scrollbarnext_dnval() (scrollBar.end + (scrollBar.width + 1)) #define scrollbarnext_upButton(y) ((y) > scrollBar.end \