-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: ecbc64c88ba825aa5147944861f38a254699c883: path_to: revision_to:
commit ecbc64c88ba825aa5147944861f38a254699c883 Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> Date: Tue Jan 29 14:45:55 2008 +0000 Make setup_scrollbar a method of scrollBar_t. diff --git a/src/init.C b/src/init.C
--- a/src/init.C +++ b/src/init.C @@ -487,7 +487,7 @@ rxvt_term::init_resources (int argc, const char *const *argv) # endif #endif - setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], rs[Rs_scrollBar_thickness]); + scrollBar.setup (this); #ifdef XTERM_REVERSE_VIDEO /* this is how xterm implements reverseVideo */ diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -1481,7 +1481,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { void resize_scrollbar (); int scrollbar_mapping (int map); int scrollbar_show (int update); - void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); // xdefaults.C void get_options (int argc, const char *const *argv); diff --git a/src/scrollbar.C b/src/scrollbar.C
--- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -175,10 +175,16 @@ rxvt_term::scrollbar_show (int update) } void -rxvt_term::setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness) +scrollBar_t::setup (rxvt_term *term) { int i; short style, width; + const char *scrollalign, *scrollstyle, *thickness; + + this->term = term; + scrollalign = term->rs[Rs_scrollBar_align]; + scrollstyle = term->rs[Rs_scrollstyle]; + thickness = term->rs[Rs_scrollBar_thickness]; # if defined(RXVT_SCROLLBAR) style = R_SB_RXVT; @@ -224,24 +230,24 @@ rxvt_term::setup_scrollbar (const char *scrollalign, const char *scrollstyle, co width = min (i, SB_WIDTH_MAXIMUM); # ifdef RXVT_SCROLLBAR - if (! option (Opt_scrollBar_floating) && style == R_SB_RXVT) + if (! term->option (Opt_scrollBar_floating) && style == R_SB_RXVT) scrollBar.shadow = SHADOW_WIDTH; # endif - scrollBar.style = style; - scrollBar.width = width; + this->style = style; + this->width = width; /* scrollBar.align = R_SB_ALIGN_CENTRE; */ if (scrollalign) { if (strncasecmp (scrollalign, "top", 3) == 0) - scrollBar.align = R_SB_ALIGN_TOP; + align = R_SB_ALIGN_TOP; else if (strncasecmp (scrollalign, "bottom", 6) == 0) - scrollBar.align = R_SB_ALIGN_BOTTOM; + align = R_SB_ALIGN_BOTTOM; } - scrollBar.last_bot = scrollBar.last_state = -1; + last_bot = last_state = -1; /* cursor scrollBar: Black-on-White */ - scrollBar.leftptr_cursor = XCreateFontCursor (dpy, XC_left_ptr); + leftptr_cursor = XCreateFontCursor (term->dpy, XC_left_ptr); } /*----------------------- end-of-file (C source) -----------------------*/ diff --git a/src/scrollbar.h b/src/scrollbar.h
--- a/src/scrollbar.h +++ b/src/scrollbar.h @@ -18,6 +18,7 @@ enum sb_state { }; struct scrollBar_t { + rxvt_term *term; char state; /* scrollbar state */ char init; /* scrollbar has been initialised */ unsigned int beg; /* slider sub-window begin height */ @@ -35,6 +36,7 @@ struct scrollBar_t { Window win; Cursor leftptr_cursor; int (rxvt_term::*update)(int, int, int, int); + void setup (rxvt_term *); bool upButton (int y) {
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 12:18:30 2024