--- rxvt-unicode/src/rxvttoolkit.h 2011/02/21 07:12:03 1.54 +++ rxvt-unicode/src/rxvttoolkit.h 2012/06/10 15:01:14 1.65 @@ -3,7 +3,7 @@ *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. - * Copyright (c) 2003-2006 Marc Lehmann + * Copyright (c) 2003-2011 Marc Lehmann * Copyright (c) 2011 Emanuele Giaquinta * * This program is free software; you can redistribute it and/or modify @@ -180,7 +180,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef USE_XIM +#if USE_XIM struct rxvt_xim : refcounted { void destroy (); @@ -214,10 +214,17 @@ #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 +{ + DISPLAY_HAS_RENDER = 1 << 0, + DISPLAY_HAS_RENDER_CONV = 1 << 1, +}; + struct rxvt_display : refcounted { event_vec xw; @@ -225,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; @@ -244,6 +251,7 @@ #ifdef POINTER_BLANK Cursor blank_cursor; #endif + uint8_t flags; rxvt_display (const char *id); XrmDatabase get_resources (bool refresh); @@ -257,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); @@ -271,7 +280,7 @@ #endif }; -#ifdef USE_XIM +#if USE_XIM struct im_watcher : rxvt_watcher, callback { void start (rxvt_display *display) @@ -347,8 +356,8 @@ bool alloc (rxvt_screen *screen, const rgba &color); void free (rxvt_screen *screen); - void get (rgba &color); - void get (XColor &color); + 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); @@ -367,22 +376,22 @@ struct rxvt_selection { - rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term, void *cb_sv = 0); + rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term); void run (); ~rxvt_selection (); rxvt_term *term; // terminal to paste to, may be 0 - void *cb_sv; // perl callback, may be 0 - + void *cb_sv; // managed by perl + rxvt_display *display; Time request_time; Window request_win; Atom request_prop; +private: unsigned char selection_wait; unsigned char selection_type; -private: char *incr_buf; size_t incr_buf_size, incr_buf_fill;