--- rxvt-unicode/src/rxvttoolkit.h 2012/06/03 15:50:22 1.59 +++ rxvt-unicode/src/rxvttoolkit.h 2012/12/29 14:23:35 1.69 @@ -68,7 +68,7 @@ XA_WM_LOCALE_NAME, XA_XIM_SERVERS, #endif -#if ENABLE_TRANSPARENCY +#if BG_IMAGE_FROM_ROOT || ENABLE_PERL XA_XROOTPMAP_ID, XA_ESETROOT_PMAP_ID, #endif @@ -180,7 +180,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef USE_XIM +#if USE_XIM struct rxvt_xim : refcounted { void destroy (); @@ -214,14 +214,15 @@ #endif void set (rxvt_display *disp); - void select_visual (int bitdepth); + void select_visual (int id); + void select_depth (int bitdepth); // select visual by depth void clear (); }; -enum { +enum +{ DISPLAY_HAS_RENDER = 1 << 0, - DISPLAY_HAS_RENDER_MUL = 1 << 1, - DISPLAY_HAS_RENDER_CONV = 1 << 2, + DISPLAY_HAS_RENDER_CONV = 1 << 1, }; struct rxvt_display : refcounted @@ -231,7 +232,7 @@ ev::prepare flush_ev; void flush_cb (ev::prepare &w, int revents); ev::io x_ev ; void x_cb (ev::io &w, int revents); -#ifdef USE_XIM +#if USE_XIM refcache xims; vector imw; @@ -264,12 +265,13 @@ } Atom atom (const char *name); + Pixmap get_pixmap_property (Atom property); void set_selection_owner (rxvt_term *owner, bool clipboard); void reg (xevent_watcher *w); void unreg (xevent_watcher *w); -#ifdef USE_XIM +#if USE_XIM void reg (im_watcher *w); void unreg (im_watcher *w); @@ -278,7 +280,7 @@ #endif }; -#ifdef USE_XIM +#if USE_XIM struct im_watcher : rxvt_watcher, callback { void start (rxvt_display *display) @@ -317,14 +319,14 @@ struct rgba { - unsigned short r, g, b, a; + uint16_t r, g, b, a; enum { MIN_CC = 0x0000, MAX_CC = 0xffff }; rgba () { } - rgba (unsigned short r, unsigned short g, unsigned short b, unsigned short a = MAX_CC) + rgba (uint16_t r, uint16_t g, uint16_t b, uint16_t a = MAX_CC) : r(r), g(g), b(b), a(a) { } }; @@ -354,8 +356,14 @@ bool alloc (rxvt_screen *screen, const rgba &color); void free (rxvt_screen *screen); - void get (rgba &color); - void get (XColor &color); + operator rgba () const + { + rgba c; + get (c); + return c; + } + void get (rgba &color) const; + void get (XColor &color) const; bool set (rxvt_screen *screen, const char *name); bool set (rxvt_screen *screen, const rgba &color);