ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtcolor.h
Revision: 1.1
Committed: Mon Nov 24 17:28:08 2003 UTC (20 years, 6 months ago) by pcg
Content type: text/plain
Branch: MAIN
CVS Tags: stable, rel-1-3, rel-1-2
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.1 #ifndef RXVT_COLOR_H
2     #define RXVT_COLOR_H
3    
4     #include <X11/Xlib.h>
5    
6     #if XFT
7     # include <X11/Xft/Xft.h>
8     #endif
9    
10     #include "rxvtlib.h"
11    
12     struct rxvt_vars;
13    
14     typedef unsigned long Pixel;
15    
16     struct rxvt_color {
17     #if XFT
18     XftColor c;
19     operator Pixel() const { return c.pixel; }
20     #else
21     Pixel p;
22     operator Pixel() const { return p; }
23     #endif
24    
25     bool operator == (const rxvt_color &b) const { return Pixel(*this) == Pixel(b); }
26     bool operator != (const rxvt_color &b) const { return Pixel(*this) != Pixel(b); }
27    
28     void get (pR_ unsigned short &cr, unsigned short &cg, unsigned short &cb);
29    
30     bool set (pR_ Pixel p);
31     bool set (pR_ const char *name);
32     bool set (pR_ unsigned short cr, unsigned short cg, unsigned short cb);
33     };
34    
35     #endif
36