--- rxvt-unicode/src/scrollbar-next.C 2003/11/24 17:31:28 1.2 +++ rxvt-unicode/src/scrollbar-next.C 2003/11/25 11:52:42 1.3 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: scrollbar-next.c *----------------------------------------------------------------------* - * $Id: scrollbar-next.C,v 1.2 2003/11/24 17:31:28 pcg Exp $ + * $Id: scrollbar-next.C,v 1.3 2003/11/25 11:52:42 pcg Exp $ * * Copyright (c) 1997,1998 mj olesen * Copyright (c) 1998 Alfredo K. Kojima @@ -125,13 +125,13 @@ for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { if ((a = data[y][x]) == ' ' || a == 'w') - pointcolour = R->h->whiteGC; + pointcolour = R->whiteGC; else if (a == '.' || a == 'l') - pointcolour = R->h->grayGC; + pointcolour = R->grayGC; else if (a == '%' || a == 'd') - pointcolour = R->h->darkGC; + pointcolour = R->darkGC; else /* if (a == '#' || a == 'b' || a) */ - pointcolour = R->h->blackGC; + pointcolour = R->blackGC; XDrawPoint(R->Xdisplay, d, pointcolour, x, y); } } @@ -150,11 +150,11 @@ gcvalue.graphics_exposures = False; gcvalue.foreground = R->PixColors[Color_Black]; - R->h->blackGC = XCreateGC(R->Xdisplay, R->scrollBar.win, + R->blackGC = XCreateGC(R->Xdisplay, R->scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); gcvalue.foreground = R->PixColors[Color_White]; - R->h->whiteGC = XCreateGC(R->Xdisplay, R->scrollBar.win, + R->whiteGC = XCreateGC(R->Xdisplay, R->scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); xcol.red = 0xaeba; @@ -163,7 +163,7 @@ if (!rxvt_rXAllocColor(aR_ &xcol, "light gray")) xcol.pixel = R->PixColors[Color_AntiqueWhite]; light = gcvalue.foreground = xcol.pixel; - R->h->grayGC = XCreateGC(R->Xdisplay, R->scrollBar.win, + R->grayGC = XCreateGC(R->Xdisplay, R->scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); xcol.red = 0x51aa; @@ -172,7 +172,7 @@ if (!rxvt_rXAllocColor(aR_ &xcol, "dark gray")) xcol.pixel = R->PixColors[Color_Grey25]; dark = gcvalue.foreground = xcol.pixel; - R->h->darkGC = XCreateGC(R->Xdisplay, R->scrollBar.win, + R->darkGC = XCreateGC(R->Xdisplay, R->scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); stipple = XCreateBitmapFromData(R->Xdisplay, R->scrollBar.win, @@ -186,20 +186,20 @@ /* XSetWindowBackground(R->Xdisplay, R->scrollBar.win, R->PixColors[Color_Red]); */ - R->h->stippleGC = XCreateGC(R->Xdisplay, R->scrollBar.win, + R->stippleGC = XCreateGC(R->Xdisplay, R->scrollBar.win, GCForeground | GCBackground | GCStipple | GCFillStyle | GCGraphicsExposures, &gcvalue); - R->h->dimple = rxvt_renderPixmap(aR_ SCROLLER_DIMPLE, SCROLLER_DIMPLE_WIDTH, + R->dimple = rxvt_renderPixmap(aR_ SCROLLER_DIMPLE, SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT); - R->h->upArrow = rxvt_renderPixmap(aR_ SCROLLER_ARROW_UP, ARROW_WIDTH, + R->upArrow = rxvt_renderPixmap(aR_ SCROLLER_ARROW_UP, ARROW_WIDTH, ARROW_HEIGHT); - R->h->downArrow = rxvt_renderPixmap(aR_ SCROLLER_ARROW_DOWN, ARROW_WIDTH, + R->downArrow = rxvt_renderPixmap(aR_ SCROLLER_ARROW_DOWN, ARROW_WIDTH, ARROW_HEIGHT); - R->h->upArrowHi = rxvt_renderPixmap(aR_ HI_SCROLLER_ARROW_UP, ARROW_WIDTH, + R->upArrowHi = rxvt_renderPixmap(aR_ HI_SCROLLER_ARROW_UP, ARROW_WIDTH, ARROW_HEIGHT); - R->h->downArrowHi = rxvt_renderPixmap(aR_ HI_SCROLLER_ARROW_DOWN, + R->downArrowHi = rxvt_renderPixmap(aR_ HI_SCROLLER_ARROW_DOWN, ARROW_WIDTH, ARROW_HEIGHT); } @@ -213,15 +213,15 @@ x2 = x1 + w - 1; /* right point */ y2 = y1 + h - 1; /* bottom point */ /* white top and left */ - XDrawLine(R->Xdisplay, d, R->h->whiteGC, x1, y1, x2, y1); - XDrawLine(R->Xdisplay, d, R->h->whiteGC, x1, y1, x1, y2); + XDrawLine(R->Xdisplay, d, R->whiteGC, x1, y1, x2, y1); + XDrawLine(R->Xdisplay, d, R->whiteGC, x1, y1, x1, y2); /* black bottom and right */ - XDrawLine(R->Xdisplay, d, R->h->blackGC, x1, y2, x2, y2); - XDrawLine(R->Xdisplay, d, R->h->blackGC, x2, y1, x2, y2); + XDrawLine(R->Xdisplay, d, R->blackGC, x1, y2, x2, y2); + XDrawLine(R->Xdisplay, d, R->blackGC, x2, y1, x2, y2); /* dark inside bottom and right */ x1++, y1++, x2--, y2--; /* move in one point */ - XDrawLine(R->Xdisplay, d, R->h->darkGC, x1, y2, x2, y2); - XDrawLine(R->Xdisplay, d, R->h->darkGC, x2, y1, x2, y2); + XDrawLine(R->Xdisplay, d, R->darkGC, x1, y2, x2, y2); + XDrawLine(R->Xdisplay, d, R->darkGC, x2, y1, x2, y2); } /* EXTPROTO */ @@ -237,27 +237,27 @@ } if (R->TermWin.nscrolled == 0 || !update) { - XFillRectangle(R->Xdisplay, R->scrollBar.win, R->h->grayGC, 0, 0, + XFillRectangle(R->Xdisplay, R->scrollBar.win, R->grayGC, 0, 0, SB_WIDTH_NEXT + 1, height); - XDrawRectangle(R->Xdisplay, R->scrollBar.win, R->h->blackGC, 0, + XDrawRectangle(R->Xdisplay, R->scrollBar.win, R->blackGC, 0, -SB_BORDER_WIDTH, SB_WIDTH_NEXT, height + SB_BORDER_WIDTH); - XFillRectangle(R->Xdisplay, R->scrollBar.win, R->h->stippleGC, + XFillRectangle(R->Xdisplay, R->scrollBar.win, R->stippleGC, SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); } if (R->TermWin.nscrolled) { if (last_top < R->scrollBar.top || !update) - XFillRectangle(R->Xdisplay, R->scrollBar.win, R->h->stippleGC, + XFillRectangle(R->Xdisplay, R->scrollBar.win, R->stippleGC, SB_LEFT_PADDING, SB_PADDING + last_top, SB_BUTTON_WIDTH, R->scrollBar.top - last_top); if (R->scrollBar.bot < last_bot || !update) - XFillRectangle(R->Xdisplay, R->scrollBar.win, R->h->stippleGC, + XFillRectangle(R->Xdisplay, R->scrollBar.win, R->stippleGC, SB_LEFT_PADDING, R->scrollBar.bot + SB_PADDING, SB_BUTTON_WIDTH, (last_bot - R->scrollBar.bot)); - XFillRectangle(R->Xdisplay, R->scrollBar.win, R->h->grayGC, + XFillRectangle(R->Xdisplay, R->scrollBar.win, R->grayGC, SB_LEFT_PADDING, R->scrollBar.top + SB_PADDING, SB_BUTTON_WIDTH, scrollbar_len); - XCopyArea(R->Xdisplay, R->h->dimple, R->scrollBar.win, R->h->whiteGC, 0, 0, + XCopyArea(R->Xdisplay, R->dimple, R->scrollBar.win, R->whiteGC, 0, 0, SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT, (SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2, R->scrollBar.top + SB_BEVEL_WIDTH_UPPER_LEFT + @@ -273,13 +273,13 @@ height - SB_BUTTON_SINGLE_HEIGHT, SB_BUTTON_WIDTH, SB_BUTTON_HEIGHT); - s = (scrollbar_isUp()) ? R->h->upArrowHi : R->h->upArrow; - XCopyArea(R->Xdisplay, s, R->scrollBar.win, R->h->whiteGC, 0, 0, + s = (scrollbar_isUp()) ? R->upArrowHi : R->upArrow; + XCopyArea(R->Xdisplay, s, R->scrollBar.win, R->whiteGC, 0, 0, ARROW_WIDTH, ARROW_HEIGHT, SB_BUTTON_FACE_X, height - SB_BUTTON_BOTH_HEIGHT + SB_BEVEL_WIDTH_UPPER_LEFT); - s = (scrollbar_isDn()) ? R->h->downArrowHi : R->h->downArrow; - XCopyArea(R->Xdisplay, s, R->scrollBar.win, R->h->whiteGC, 0, 0, + s = (scrollbar_isDn()) ? R->downArrowHi : R->downArrow; + XCopyArea(R->Xdisplay, s, R->scrollBar.win, R->whiteGC, 0, 0, ARROW_WIDTH, ARROW_HEIGHT, SB_BUTTON_FACE_X, height - SB_BUTTON_SINGLE_HEIGHT + SB_BEVEL_WIDTH_UPPER_LEFT); }