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.53 by sf-exg, Sat Feb 12 00:50:04 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);
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);
373 void run (); 371 void run ();
374 ~rxvt_selection (); 372 ~rxvt_selection ();
375 373
376 void *user_data; 374 rxvt_term *term; // terminal to paste to, may be 0
377 375 void *cb_sv; // perl callback, may be 0
378private: 376
379 rxvt_display *display; 377 rxvt_display *display;
380 Time request_time; 378 Time request_time;
381 Window request_win; 379 Window request_win;
382 Atom request_prop; 380 Atom request_prop;
383 sel_cb request_cb;
384 381
385 unsigned char selection_wait; 382 unsigned char selection_wait;
386 unsigned char selection_type; 383 unsigned char selection_type;
387 384
385private:
388 char *incr_buf; 386 char *incr_buf;
389 size_t incr_buf_size, incr_buf_fill; 387 size_t incr_buf_size, incr_buf_fill;
390 388
391 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;
392 void x_cb (XEvent &xev); xevent_watcher x_ev; 390 void x_cb (XEvent &xev); xevent_watcher x_ev;
393 391
392 void finish (char *data = 0, unsigned int len = 0);
394 void stop (); 393 void stop ();
395 bool request (Atom target, int selnum); 394 bool request (Atom target, int selnum);
396 void handle_selection (Window win, Atom prop, bool delete_prop); 395 void handle_selection (Window win, Atom prop, bool delete_prop);
397}; 396};
398 397

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines