--- rxvt-unicode/src/rxvttoolkit.h 2011/02/12 00:50:04 1.53 +++ rxvt-unicode/src/rxvttoolkit.h 2012/06/03 17:48:28 1.60 @@ -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 @@ -218,6 +218,12 @@ void clear (); }; +enum { + DISPLAY_HAS_RENDER = 1 << 0, + DISPLAY_HAS_RENDER_MUL = 1 << 1, + DISPLAY_HAS_RENDER_CONV = 1 << 2, +}; + struct rxvt_display : refcounted { event_vec xw; @@ -244,6 +250,7 @@ #ifdef POINTER_BLANK Cursor blank_cursor; #endif + uint8_t flags; rxvt_display (const char *id); XrmDatabase get_resources (bool refresh); @@ -257,6 +264,7 @@ } 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); @@ -365,23 +373,21 @@ #define Sel_CompoundText 0x10 /* last request was COMPOUND_TEXT */ #define Sel_UTF8String 0x20 /* last request was UTF8_STRING */ -typedef void (*sel_cb)(char *data, unsigned int len, struct rxvt_selection *rs); - struct rxvt_selection { - rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, sel_cb cb, void *ptr); + rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term); void run (); ~rxvt_selection (); - void *user_data; + rxvt_term *term; // terminal to paste to, may be 0 + void *cb_sv; // managed by perl -private: rxvt_display *display; Time request_time; Window request_win; Atom request_prop; - sel_cb request_cb; +private: unsigned char selection_wait; unsigned char selection_type; @@ -391,6 +397,7 @@ void timer_cb (ev::timer &w, int revents); ev::timer timer_ev; void x_cb (XEvent &xev); xevent_watcher x_ev; + void finish (char *data = 0, unsigned int len = 0); void stop (); bool request (Atom target, int selnum); void handle_selection (Window win, Atom prop, bool delete_prop);