COMMON = \
command.o rxvtfont.o init.o logging.o main.o misc.o netdisp.o \
- ptytty.o screen.o \ scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
+ ptytty.o screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
scrollbar-xterm.o scrollbar-plain.o xdefaults.o xpm.o encoding.o \
rxvttoolkit.o rxvtutil.o iom.o keyboard.o @PERL_O@
}
#endif
-/*----------------------------------------------------------------------*
- * miscellaneous drawing routines
- */
-
-/*
- * Draw top/left and bottom/right border shadows around windows
- */
-#ifdef RXVT_SCROLLBAR
-void
-rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
-{
- int shadow;
-
- shadow = (w == 0 || h == 0) ? 1 : 2;
- w += x - 1;
- h += y - 1;
- for (; shadow-- > 0; x++, y++, w--, h--)
- {
- XDrawLine (display, win, topShadow, x, y, w, y);
- XDrawLine (display, win, topShadow, x, y, x, h);
- XDrawLine (display, win, botShadow, w, h, w, y + 1);
- XDrawLine (display, win, botShadow, w, h, x + 1, h);
- }
-}
-#endif
-
// should not be used in interactive programs, for obvious reasons
void rxvt_usleep (int usecs)
{
char ** rxvt_splitcommastring (const char *cs);
void rxvt_freecommastring (char **cs);
char * rxvt_File_find (const char *file, const char *ext, const char *path);
-void rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h);
-void rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type);
void rxvt_usleep (int usecs);
/////////////////////////////////////////////////////////////////////////////
/*----------------------------------------------------------------------*/
#if defined(RXVT_SCROLLBAR)
-#define DOUBLED 1
+#define SHADOW_WIDTH 1
+
+static void
+rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h)
+{
+ int shadow;
+
+ shadow = (w == 0 || h == 0) ? 1 : SHADOW_WIDTH;
+ w += x - 1;
+ h += y - 1;
+ for (; shadow-- > 0; x++, y++, w--, h--)
+ {
+ XDrawLine (display, win, topShadow, x, y, w, y);
+ XDrawLine (display, win, topShadow, x, y, x, h);
+ XDrawLine (display, win, botShadow, w, h, w, y + 1);
+ XDrawLine (display, win, botShadow, w, h, x + 1, h);
+ }
+}
/* draw triangular button with a shadow of 2 pixels */
void
XDrawLine (display->display, scrollBar.win, top,
pt[0].x, pt[0].y, pt[1].x, pt[1].y);
-#if DOUBLED
+#if SHADOW_WIDTH > 1
/* doubled */
pt[0].x++;
XDrawLine (display->display, scrollBar.win, bot,
pt[2].x, pt[2].y, pt[1].x, pt[1].y);
-#if DOUBLED
+#if SHADOW_WIDTH > 1
/* doubled */
pt[1].x--;
if (dirn == UP)