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.14 by root, Mon Jan 30 02:21:21 2006 UTC vs.
Revision 1.21 by root, Wed Feb 1 18:36:48 2006 UTC

62 XA_SCREEN_RESOURCES, 62 XA_SCREEN_RESOURCES,
63 XA_XDCCC_LINEAR_RGB_CORRECTION, 63 XA_XDCCC_LINEAR_RGB_CORRECTION,
64 XA_XDCCC_LINEAR_RGB_MATRICES, 64 XA_XDCCC_LINEAR_RGB_MATRICES,
65 XA_WM_COLORMAP_WINDOWS, 65 XA_WM_COLORMAP_WINDOWS,
66 XA_WM_STATE, 66 XA_WM_STATE,
67 XA_cursor,
68# if USE_XIM
69 // various selection targets used by XIM
70 XA_TRANSPORT,
71 XA_LOCALES,
72 XA__XIM_PROTOCOL,
73 XA__XIM_XCONNECT,
74 XA__XIM_MOREDATA,
75# endif
67#endif 76#endif
68 NUM_XA 77 NUM_XA
69}; 78};
70 79
71struct rxvt_term; 80struct rxvt_term;
213 222
214///////////////////////////////////////////////////////////////////////////// 223/////////////////////////////////////////////////////////////////////////////
215 224
216typedef unsigned long Pixel; 225typedef unsigned long Pixel;
217 226
218struct rxvt_rgba { 227struct rgba {
219 unsigned short r, g, b, a; 228 unsigned short r, g, b, a;
220 229
221 enum { MIN_CC = 0x0000, MAX_CC = 0xffff }; 230 enum { MIN_CC = 0x0000, MAX_CC = 0xffff };
222 231
223 rxvt_rgba () 232 rgba ()
224 { } 233 { }
225 234
226 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)
227 : r(r), g(g), b(b), a(a) 236 : r(r), g(g), b(b), a(a)
228 { } 237 { }
229}; 238};
230 239
231struct rxvt_color { 240struct rxvt_color {
232#if XFT 241#if XFT
233 XftColor c; 242 XftColor c;
243#else
244 XColor c;
245#endif
246
234 operator Pixel () const { return c.pixel; } 247 operator Pixel () const { return c.pixel; }
235#else
236 Pixel p;
237 operator Pixel () const { return p; }
238#endif
239 248
240 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); }
241 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); }
242 251
243 void get (rxvt_screen *screen, rxvt_rgba &rgba); 252 bool alloc (rxvt_screen *screen, const rgba &color);
253 void free (rxvt_screen *screen);
254
255 void get (rgba &color);
256 void get (XColor &color);
244 257
245 bool set (rxvt_screen *screen, const char *name); 258 bool set (rxvt_screen *screen, const char *name);
246 bool set (rxvt_screen *screen, rxvt_rgba rgba); 259 bool set (rxvt_screen *screen, const rgba &color);
247 260
248 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));
249 rxvt_color fade (rxvt_screen *screen, int percent, rxvt_color &fadeto);
250
251 void free (rxvt_screen *screen);
252}; 262};
253 263
254#endif 264#endif
255 265

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines