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.38 by root, Fri Dec 14 05:25:26 2007 UTC vs.
Revision 1.47 by root, Wed Nov 5 14:43:54 2008 UTC

29# include <X11/Xft/Xft.h> 29# include <X11/Xft/Xft.h>
30#endif 30#endif
31 31
32#include "ev_cpp.h" 32#include "ev_cpp.h"
33 33
34#include "rxvtlib.h"
35#include "rxvtutil.h" 34#include "rxvtutil.h"
36 35
37#include "callback.h" 36#include "callback.h"
38 37
39// see rxvttoolkit.C:xa_names, which must be kept in sync 38// see rxvttoolkit.C:xa_names, which must be kept in sync
60#if ENABLE_EWMH 59#if ENABLE_EWMH
61 XA_NET_WM_PID, 60 XA_NET_WM_PID,
62 XA_NET_WM_NAME, 61 XA_NET_WM_NAME,
63 XA_NET_WM_ICON_NAME, 62 XA_NET_WM_ICON_NAME,
64 XA_NET_WM_PING, 63 XA_NET_WM_PING,
64 XA_NET_WM_ICON,
65#endif 65#endif
66#if USE_XIM 66#if USE_XIM
67 XA_WM_LOCALE_NAME, 67 XA_WM_LOCALE_NAME,
68 XA_XIM_SERVERS, 68 XA_XIM_SERVERS,
69#endif 69#endif
74#if ENABLE_XEMBED 74#if ENABLE_XEMBED
75 XA_XEMBED, 75 XA_XEMBED,
76 XA_XEMBED_INFO, 76 XA_XEMBED_INFO,
77#endif 77#endif
78#if !ENABLE_MINIMAL 78#if !ENABLE_MINIMAL
79 // these are usually allocated by other subsystens, but we do it 79 // these are usually allocated by other subsystems, but we do it
80 // here to avoid a server roundtrip. 80 // here to avoid a server roundtrip.
81 XA_SCREEN_RESOURCES, 81 XA_SCREEN_RESOURCES,
82 XA_XDCCC_LINEAR_RGB_CORRECTION, 82 XA_XDCCC_LINEAR_RGB_CORRECTION,
83 XA_XDCCC_LINEAR_RGB_MATRICES, 83 XA_XDCCC_LINEAR_RGB_MATRICES,
84 XA_WM_COLORMAP_WINDOWS, 84 XA_WM_COLORMAP_WINDOWS,
247 XrmDatabase get_resources (bool refresh); 247 XrmDatabase get_resources (bool refresh);
248 bool ref_init (); 248 bool ref_init ();
249 void ref_next (); 249 void ref_next ();
250 ~rxvt_display (); 250 ~rxvt_display ();
251 251
252 void flush (); 252 void flush ()
253 {
254 flush_ev.start ();
255 }
256
253 Atom atom (const char *name); 257 Atom atom (const char *name);
254 void set_selection_owner (rxvt_term *owner); 258 void set_selection_owner (rxvt_term *owner);
255 259
256 void reg (xevent_watcher *w); 260 void reg (xevent_watcher *w);
257 void unreg (xevent_watcher *w); 261 void unreg (xevent_watcher *w);
264 void put_xim (rxvt_xim *xim); 268 void put_xim (rxvt_xim *xim);
265#endif 269#endif
266}; 270};
267 271
268#ifdef USE_XIM 272#ifdef USE_XIM
269struct im_watcher : rxvt_watcher, callback<void (void)> { 273struct im_watcher : rxvt_watcher, callback<void (void)>
274{
270 void start (rxvt_display *display) 275 void start (rxvt_display *display)
271 { 276 {
272 display->reg (this); 277 display->reg (this);
273 } 278 }
274 279
326 operator Pixel () const { return c.pixel; } 331 operator Pixel () const { return c.pixel; }
327 332
328 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); } 333 bool operator == (const rxvt_color &b) const { return Pixel (*this) == Pixel (b); }
329 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } 334 bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); }
330 335
336 bool is_opaque () const
337 {
338#if XFT
339 return c.color.alpha == rgba::MAX_CC;
340#else
341 return 1;
342#endif
343 }
344
331 bool alloc (rxvt_screen *screen, const rgba &color); 345 bool alloc (rxvt_screen *screen, const rgba &color);
332 void free (rxvt_screen *screen); 346 void free (rxvt_screen *screen);
333 347
334 void get (rgba &color); 348 void get (rgba &color);
335 void get (XColor &color); 349 void get (XColor &color);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines