--- rxvt-unicode/src/rxvtperl.xs 2009/05/30 08:51:23 1.127 +++ rxvt-unicode/src/rxvtperl.xs 2010/12/07 17:51:27 1.133 @@ -641,7 +641,7 @@ # undef def HV *option = get_hv ("urxvt::OPTION", 1); -# define def(name,val) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0); +# define def(name) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0); # define nodef(name) # include "optinc.h" # undef nodef @@ -656,6 +656,17 @@ const_iv (NUM_RESOURCES), const_iv (DEFAULT_RSTYLE), const_iv (OVERLAY_RSTYLE), + const_iv (Color_Bits), + const_iv (RS_bgShift), const_iv (RS_bgMask), + const_iv (RS_fgShift), const_iv (RS_fgMask), + const_iv (RS_Careful), + const_iv (RS_fontCount), + const_iv (RS_fontShift), + const_iv (RS_fontMask), + const_iv (RS_baseattrMask), + const_iv (RS_attrMask), + const_iv (RS_redraw), + const_iv (RS_Sel), const_iv (RS_Bold), const_iv (RS_Italic), const_iv (RS_Blink), @@ -1552,7 +1563,7 @@ PUSHs (sv_2mortal (newSViv (rc.col))); } - if (items == 3) + if (items >= 3) { rc.row = SvIV (ST (1)); rc.col = SvIV (ST (2)); @@ -1578,21 +1589,25 @@ if (ix) { + THIS->selection.screen = THIS->current_screen; + THIS->want_refresh = 1; THIS->refresh_check (); } } } -char -rxvt_term::cur_charset () +int +rxvt_term::selection_screen (int screen = -1) CODE: - RETVAL = THIS->charsets [THIS->screen.charset]; - OUTPUT: + RETVAL = THIS->selection.screen; + if (screen >= 0) + THIS->selection.screen = screen; + OUTPUT: RETVAL void -rxvt_term::selection_clear () +rxvt_term::selection_clear (bool clipboard = false) void rxvt_term::selection_make (Time eventtime, bool rect = false) @@ -1602,26 +1617,36 @@ THIS->selection_make (eventtime); int -rxvt_term::selection_grab (Time eventtime) +rxvt_term::selection_grab (Time eventtime, bool clipboard = false) void -rxvt_term::selection (SV *newtext = 0) +rxvt_term::selection (SV *newtext = 0, bool clipboard = false) PPCODE: { + wchar_t * &text = clipboard ? THIS->selection.clip_text : THIS->selection.text; + unsigned int &len = clipboard ? THIS->selection.clip_len : THIS->selection.len; + if (GIMME_V != G_VOID) - XPUSHs (THIS->selection.text - ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) + XPUSHs (text + ? sv_2mortal (wcs2sv (text, len)) : &PL_sv_undef); if (newtext) { - free (THIS->selection.text); + free (text); - THIS->selection.text = sv2wcs (newtext); - THIS->selection.len = wcslen (THIS->selection.text); + text = sv2wcs (newtext); + len = wcslen (text); } } +char +rxvt_term::cur_charset () + CODE: + RETVAL = THIS->charsets [THIS->screen.charset]; + OUTPUT: + RETVAL + void rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle1 = RS_RVid, U32 rstyle2 = RS_RVid | RS_Uline) @@ -1652,6 +1677,14 @@ str, len void +rxvt_term::tt_paste (SV *octets) + INIT: + STRLEN len; + char *str = SvPVbyte (octets, len); + C_ARGS: + str, len + +void rxvt_term::cmd_parse (SV *octets) CODE: {