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.17 by root, Thu Jul 29 22:34:12 2004 UTC vs.
Revision 1.21 by root, Mon Aug 2 04:53:34 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));
127 131
128 XIMCallback ximcallback; 132 XIMCallback ximcallback;
129 ximcallback.client_data = (XPointer)this; 133 ximcallback.client_data = (XPointer)this;
130 ximcallback.callback = im_destroy_cb; 134 ximcallback.callback = im_destroy_cb;
131 135
132 ((void (*)(XIM, ...)) XSetIMValues)
133 (xim, XNDestroyCallback, &ximcallback, NULL); 136 XSetIMValues (xim, XNDestroyCallback, &ximcallback, NULL);
134 137
135 return true; 138 return true;
136} 139}
137 140
138rxvt_xim::~rxvt_xim () 141rxvt_xim::~rxvt_xim ()
244 247
245void rxvt_display::flush () 248void rxvt_display::flush ()
246{ 249{
247 for (;;) 250 for (;;)
248 { 251 {
249 XFlush (display);
250
251 if (!XPending (display)) 252 if (!XPending (display))
252 break; 253 break;
253 254
254 x_cb (x_ev, 0); 255 x_cb (x_ev, 0);
255 } 256 }
408#else 409#else
409 XFreeColors (display->display, display->cmap, &p, 1, AllPlanes); 410 XFreeColors (display->display, display->cmap, &p, 1, AllPlanes);
410#endif 411#endif
411} 412}
412 413
414rxvt_color
415rxvt_color::fade (rxvt_display *display, int percent)
416{
417 unsigned short cr, cg, cb;
418 rxvt_color faded;
419
420 get (display, cr, cg, cb);
421 faded.set (display,
422 cr * percent / 100,
423 cg * percent / 100,
424 cb * percent / 100);
425
426 return faded;
427}
428

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines