… | |
… | |
218 | |
218 | |
219 | struct rxvt_display : refcounted |
219 | struct rxvt_display : refcounted |
220 | { |
220 | { |
221 | event_vec<xevent_watcher> xw; |
221 | event_vec<xevent_watcher> xw; |
222 | |
222 | |
223 | ev::prepare flush_ev; void flush_cb (ev::prepare &w, int revents); |
223 | ev::idle flush_ev; void flush_cb (ev::idle &w, int revents); |
224 | ev::io x_ev ; void x_cb (ev::io &w, int revents); |
224 | ev::io x_ev ; void x_cb (ev::io &w, int revents); |
225 | |
225 | |
226 | #ifdef USE_XIM |
226 | #ifdef USE_XIM |
227 | refcache<rxvt_xim> xims; |
227 | refcache<rxvt_xim> xims; |
228 | vector<im_watcher *> imw; |
228 | vector<im_watcher *> imw; |
… | |
… | |
329 | operator Pixel () const { return c.pixel; } |
329 | operator Pixel () const { return c.pixel; } |
330 | |
330 | |
331 | bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } |
331 | bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } |
332 | bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } |
332 | bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } |
333 | |
333 | |
|
|
334 | bool is_opaque () const |
|
|
335 | { |
|
|
336 | #if XFT |
|
|
337 | return c.color.alpha == rgba::MAX_CC; |
|
|
338 | #else |
|
|
339 | return 1; |
|
|
340 | #endif |
|
|
341 | } |
|
|
342 | |
334 | bool alloc (rxvt_screen *screen, const rgba &color); |
343 | bool alloc (rxvt_screen *screen, const rgba &color); |
335 | void free (rxvt_screen *screen); |
344 | void free (rxvt_screen *screen); |
336 | |
345 | |
337 | void get (rgba &color); |
346 | void get (rgba &color); |
338 | void get (XColor &color); |
347 | void get (XColor &color); |