ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtcolor.h
Revision: 1.2
Committed: Sat Jan 31 00:20:21 2004 UTC (20 years, 4 months ago) by pcg
Content type: text/plain
Branch: MAIN
CVS Tags: before_astyle, after_astyle
Changes since 1.1: +4 -4 lines
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 pcg 1.2 void get (rxvt_term *t, unsigned short &cr, unsigned short &cg, unsigned short &cb);
29 pcg 1.1
30 pcg 1.2 bool set (rxvt_term *t, Pixel p);
31     bool set (rxvt_term *t, const char *name);
32     bool set (rxvt_term *t, unsigned short cr, unsigned short cg, unsigned short cb);
33 pcg 1.1 };
34    
35     #endif
36