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

Comparing rxvt-unicode/src/rxvtcolor.h (file contents):
Revision 1.6 by pcg, Thu Feb 12 01:42:03 2004 UTC vs.
Revision 1.7 by pcg, Fri Feb 13 12:16:21 2004 UTC

88 void put_xim (rxvt_xim *xim); 88 void put_xim (rxvt_xim *xim);
89}; 89};
90 90
91struct im_watcher : watcher, callback0<void> { 91struct im_watcher : watcher, callback0<void> {
92 template<class O1, class O2> 92 template<class O1, class O2>
93 im_watcher (O1 *object, void (O2::*method)()) 93 im_watcher (O1 *object, void (O2::*method) ())
94 : callback0<void>(object,method) 94 : callback0<void> (object,method)
95 { } 95 { }
96 96
97 void start (rxvt_display *display) 97 void start (rxvt_display *display)
98 { 98 {
99 display->reg (this); 99 display->reg (this);
106 106
107struct xevent_watcher : watcher, callback1<void, XEvent &> { 107struct xevent_watcher : watcher, callback1<void, XEvent &> {
108 Window window; 108 Window window;
109 109
110 template<class O1, class O2> 110 template<class O1, class O2>
111 xevent_watcher (O1 *object, void (O2::*method)(XEvent &)) 111 xevent_watcher (O1 *object, void (O2::*method) (XEvent &))
112 : callback1<void, XEvent &>(object,method) 112 : callback1<void, XEvent &> (object,method)
113 { } 113 { }
114 114
115 void start (rxvt_display *display, Window window) 115 void start (rxvt_display *display, Window window)
116 { 116 {
117 this->window = window; 117 this->window = window;
130typedef unsigned long Pixel; 130typedef unsigned long Pixel;
131 131
132struct rxvt_color { 132struct rxvt_color {
133#if XFT 133#if XFT
134 XftColor c; 134 XftColor c;
135 operator Pixel() const { return c.pixel; } 135 operator Pixel () const { return c.pixel; }
136#else 136#else
137 Pixel p; 137 Pixel p;
138 operator Pixel() const { return p; } 138 operator Pixel () const { return p; }
139#endif 139#endif
140 140
141 bool operator == (const rxvt_color &b) const { return Pixel(*this) == Pixel(b); } 141 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); }
142 bool operator != (const rxvt_color &b) const { return Pixel(*this) != Pixel(b); } 142 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); }
143 143
144 void get (rxvt_display *display, unsigned short &cr, unsigned short &cg, unsigned short &cb); 144 void get (rxvt_display *display, unsigned short &cr, unsigned short &cg, unsigned short &cb);
145 145
146 bool set (rxvt_display *display, Pixel p); 146 bool set (rxvt_display *display, Pixel p);
147 bool set (rxvt_display *display, const char *name); 147 bool set (rxvt_display *display, const char *name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines