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.51 by sf-exg, Fri Feb 11 11:26:30 2011 UTC vs.
Revision 1.54 by root, Mon Feb 21 07:12:03 2011 UTC

363#define Sel_Clipboard 0x03 363#define Sel_Clipboard 0x03
364#define Sel_whereMask 0x0f 364#define Sel_whereMask 0x0f
365#define Sel_CompoundText 0x10 /* last request was COMPOUND_TEXT */ 365#define Sel_CompoundText 0x10 /* last request was COMPOUND_TEXT */
366#define Sel_UTF8String 0x20 /* last request was UTF8_STRING */ 366#define Sel_UTF8String 0x20 /* last request was UTF8_STRING */
367 367
368typedef void (*sel_cb)(char *data, unsigned int len, struct rxvt_selection *rs, void *ptr);
369
370struct rxvt_selection 368struct rxvt_selection
371{ 369{
372 rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, sel_cb cb, void *ptr); 370 rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term, void *cb_sv = 0);
371 void run ();
373 ~rxvt_selection (); 372 ~rxvt_selection ();
374 373
375private: 374 rxvt_term *term; // terminal to paste to, may be 0
375 void *cb_sv; // perl callback, may be 0
376
376 rxvt_display *display; 377 rxvt_display *display;
377 Time request_time; 378 Time request_time;
378 Window request_win; 379 Window request_win;
379 Atom request_prop; 380 Atom request_prop;
380 sel_cb request_cb;
381 void *user_data;
382 381
383 unsigned char selection_wait; 382 unsigned char selection_wait;
384 unsigned char selection_type; 383 unsigned char selection_type;
385 384
385private:
386 char *incr_buf; 386 char *incr_buf;
387 size_t incr_buf_size, incr_buf_fill; 387 size_t incr_buf_size, incr_buf_fill;
388 388
389 void timer_cb (ev::timer &w, int revents); ev::timer timer_ev; 389 void timer_cb (ev::timer &w, int revents); ev::timer timer_ev;
390 void x_cb (XEvent &xev); xevent_watcher x_ev; 390 void x_cb (XEvent &xev); xevent_watcher x_ev;
391 391
392 void finish (char *data = 0, unsigned int len = 0);
392 void stop (); 393 void stop ();
393 bool request (Atom target, int selnum); 394 bool request (Atom target, int selnum);
394 void handle_selection (Window win, Atom prop, bool delete_prop); 395 void handle_selection (Window win, Atom prop, bool delete_prop);
395}; 396};
396 397

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines