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

Comparing rxvt-unicode/src/rxvttoolkit.h (file contents):
Revision 1.16 by root, Tue Jan 31 00:25:16 2006 UTC vs.
Revision 1.22 by root, Thu Feb 2 14:41:00 2006 UTC

158#ifdef POINTER_BLANK 158#ifdef POINTER_BLANK
159 Cursor blank_cursor; 159 Cursor blank_cursor;
160#endif 160#endif
161 161
162 rxvt_display (const char *id); 162 rxvt_display (const char *id);
163 XrmDatabase get_resources (); 163 XrmDatabase get_resources (bool refresh);
164 bool ref_init (); 164 bool ref_init ();
165 void ref_next (); 165 void ref_next ();
166 ~rxvt_display (); 166 ~rxvt_display ();
167 167
168 void flush (); 168 void flush ();
222 222
223///////////////////////////////////////////////////////////////////////////// 223/////////////////////////////////////////////////////////////////////////////
224 224
225typedef unsigned long Pixel; 225typedef unsigned long Pixel;
226 226
227struct rxvt_rgba { 227struct rgba {
228 unsigned short r, g, b, a; 228 unsigned short r, g, b, a;
229 229
230 enum { MIN_CC = 0x0000, MAX_CC = 0xffff }; 230 enum { MIN_CC = 0x0000, MAX_CC = 0xffff };
231 231
232 rxvt_rgba () 232 rgba ()
233 { } 233 { }
234 234
235 rxvt_rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC) 235 rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC)
236 : r(r), g(g), b(b), a(a) 236 : r(r), g(g), b(b), a(a)
237 { } 237 { }
238}; 238};
239 239
240struct rxvt_color { 240struct rxvt_color {
241#if XFT 241#if XFT
242 XftColor c; 242 XftColor c;
243#else
244 XColor c;
245#endif
246
243 operator Pixel () const { return c.pixel; } 247 operator Pixel () const { return c.pixel; }
244#else
245 Pixel p;
246 operator Pixel () const { return p; }
247#endif
248 248
249 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } 249 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); }
250 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } 250 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); }
251 251
252 bool alloc (rxvt_screen *screen, rxvt_rgba rgba); 252 bool alloc (rxvt_screen *screen, const rgba &color);
253 void free (rxvt_screen *screen); 253 void free (rxvt_screen *screen);
254 254
255 void get (rxvt_screen *screen, rxvt_rgba &rgba); 255 void get (rgba &color);
256 void get (XColor &color);
256 257
257 bool set (rxvt_screen *screen, const char *name); 258 bool set (rxvt_screen *screen, const char *name);
258 bool set (rxvt_screen *screen, rxvt_rgba rgba); 259 bool set (rxvt_screen *screen, const rgba &color);
259 260
260 rxvt_color fade (rxvt_screen *screen, int percent); // fades to black 261 void fade (rxvt_screen *screen, int percent, rxvt_color &result, const rgba &to = rgba (0, 0, 0));
261 rxvt_color fade (rxvt_screen *screen, int percent, rxvt_color &fadeto);
262}; 262};
263 263
264#endif 264#endif
265 265

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines