ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtcolor.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtcolor.C (file contents):
Revision 1.18 by root, Fri Jul 30 14:12:38 2004 UTC vs.
Revision 1.20 by root, Fri Jul 30 16:04:05 2004 UTC

104 104
105///////////////////////////////////////////////////////////////////////////// 105/////////////////////////////////////////////////////////////////////////////
106 106
107#ifdef USE_XIM 107#ifdef USE_XIM
108static void 108static void
109#if XIMCB_PROTO_BROKEN
110im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3)
111#else
109im_destroy_cb (XIM unused1, XPointer client_data, XPointer unused3) 112im_destroy_cb (XIM unused1, XPointer client_data, XPointer unused3)
113#endif
110{ 114{
111 rxvt_xim *xim = (rxvt_xim *)client_data; 115 rxvt_xim *xim = (rxvt_xim *)client_data;
112 rxvt_display *display = xim->display; 116 rxvt_display *display = xim->display;
113 117
114 display->xims.erase (find (display->xims.begin (), display->xims.end (), xim)); 118 display->xims.erase (find (display->xims.begin (), display->xims.end (), xim));
407#else 411#else
408 XFreeColors (display->display, display->cmap, &p, 1, AllPlanes); 412 XFreeColors (display->display, display->cmap, &p, 1, AllPlanes);
409#endif 413#endif
410} 414}
411 415
416rxvt_color
417rxvt_color::fade (rxvt_display *display, int percent)
418{
419 unsigned short cr, cg, cb;
420 rxvt_color faded;
421
422 get (display, cr, cg, cb);
423 faded.set (display,
424 cr * percent / 100,
425 cg * percent / 100,
426 cb * percent / 100);
427
428 return faded;
429}
430

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines