--- rxvt-unicode/src/rxvtcolor.C 2004/07/29 22:34:12 1.17 +++ rxvt-unicode/src/rxvtcolor.C 2004/07/30 16:04:05 1.20 @@ -106,7 +106,11 @@ #ifdef USE_XIM static void +#if XIMCB_PROTO_BROKEN +im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3) +#else im_destroy_cb (XIM unused1, XPointer client_data, XPointer unused3) +#endif { rxvt_xim *xim = (rxvt_xim *)client_data; rxvt_display *display = xim->display; @@ -129,8 +133,7 @@ ximcallback.client_data = (XPointer)this; ximcallback.callback = im_destroy_cb; - ((void (*)(XIM, ...)) XSetIMValues) - (xim, XNDestroyCallback, &ximcallback, NULL); + XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL); return true; } @@ -410,3 +413,18 @@ #endif } +rxvt_color +rxvt_color::fade (rxvt_display *display, int percent) +{ + unsigned short cr, cg, cb; + rxvt_color faded; + + get (display, cr, cg, cb); + faded.set (display, + cr * percent / 100, + cg * percent / 100, + cb * percent / 100); + + return faded; +} +