ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.128 by root, Sat Dec 26 09:42:16 2009 UTC vs.
Revision 1.133 by root, Tue Dec 7 17:51:27 2010 UTC

639# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); 639# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0));
640# include "hookinc.h" 640# include "hookinc.h"
641# undef def 641# undef def
642 642
643 HV *option = get_hv ("urxvt::OPTION", 1); 643 HV *option = get_hv ("urxvt::OPTION", 1);
644# define def(name,val) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0); 644# define def(name) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0);
645# define nodef(name) 645# define nodef(name)
646# include "optinc.h" 646# include "optinc.h"
647# undef nodef 647# undef nodef
648# undef def 648# undef def
649 649
654 } *civ, const_iv[] = { 654 } *civ, const_iv[] = {
655# define const_iv(name) { # name, (IV)name } 655# define const_iv(name) { # name, (IV)name }
656 const_iv (NUM_RESOURCES), 656 const_iv (NUM_RESOURCES),
657 const_iv (DEFAULT_RSTYLE), 657 const_iv (DEFAULT_RSTYLE),
658 const_iv (OVERLAY_RSTYLE), 658 const_iv (OVERLAY_RSTYLE),
659 const_iv (Color_Bits),
660 const_iv (RS_bgShift), const_iv (RS_bgMask),
661 const_iv (RS_fgShift), const_iv (RS_fgMask),
662 const_iv (RS_Careful),
663 const_iv (RS_fontCount),
664 const_iv (RS_fontShift),
665 const_iv (RS_fontMask),
666 const_iv (RS_baseattrMask),
667 const_iv (RS_attrMask),
668 const_iv (RS_redraw),
669 const_iv (RS_Sel),
659 const_iv (RS_Bold), 670 const_iv (RS_Bold),
660 const_iv (RS_Italic), 671 const_iv (RS_Italic),
661 const_iv (RS_Blink), 672 const_iv (RS_Blink),
662 const_iv (RS_RVid), 673 const_iv (RS_RVid),
663 const_iv (RS_Uline), 674 const_iv (RS_Uline),
1594 THIS->selection.screen = screen; 1605 THIS->selection.screen = screen;
1595 OUTPUT: 1606 OUTPUT:
1596 RETVAL 1607 RETVAL
1597 1608
1598void 1609void
1599rxvt_term::selection_clear () 1610rxvt_term::selection_clear (bool clipboard = false)
1600 1611
1601void 1612void
1602rxvt_term::selection_make (Time eventtime, bool rect = false) 1613rxvt_term::selection_make (Time eventtime, bool rect = false)
1603 CODE: 1614 CODE:
1604 THIS->selection.op = SELECTION_CONT; 1615 THIS->selection.op = SELECTION_CONT;
1605 THIS->selection.rect = rect; 1616 THIS->selection.rect = rect;
1606 THIS->selection_make (eventtime); 1617 THIS->selection_make (eventtime);
1607 1618
1608int 1619int
1609rxvt_term::selection_grab (Time eventtime) 1620rxvt_term::selection_grab (Time eventtime, bool clipboard = false)
1610 1621
1611void 1622void
1612rxvt_term::selection (SV *newtext = 0) 1623rxvt_term::selection (SV *newtext = 0, bool clipboard = false)
1613 PPCODE: 1624 PPCODE:
1614{ 1625{
1626 wchar_t * &text = clipboard ? THIS->selection.clip_text : THIS->selection.text;
1627 unsigned int &len = clipboard ? THIS->selection.clip_len : THIS->selection.len;
1628
1615 if (GIMME_V != G_VOID) 1629 if (GIMME_V != G_VOID)
1616 XPUSHs (THIS->selection.text 1630 XPUSHs (text
1617 ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) 1631 ? sv_2mortal (wcs2sv (text, len))
1618 : &PL_sv_undef); 1632 : &PL_sv_undef);
1619 1633
1620 if (newtext) 1634 if (newtext)
1621 { 1635 {
1622 free (THIS->selection.text); 1636 free (text);
1623 1637
1624 THIS->selection.text = sv2wcs (newtext); 1638 text = sv2wcs (newtext);
1625 THIS->selection.len = wcslen (THIS->selection.text); 1639 len = wcslen (text);
1626 } 1640 }
1627} 1641}
1628 1642
1629char 1643char
1630rxvt_term::cur_charset () 1644rxvt_term::cur_charset ()
1661 char *str = SvPVbyte (octets, len); 1675 char *str = SvPVbyte (octets, len);
1662 C_ARGS: 1676 C_ARGS:
1663 str, len 1677 str, len
1664 1678
1665void 1679void
1680rxvt_term::tt_paste (SV *octets)
1681 INIT:
1682 STRLEN len;
1683 char *str = SvPVbyte (octets, len);
1684 C_ARGS:
1685 str, len
1686
1687void
1666rxvt_term::cmd_parse (SV *octets) 1688rxvt_term::cmd_parse (SV *octets)
1667 CODE: 1689 CODE:
1668{ 1690{
1669 STRLEN len; 1691 STRLEN len;
1670 char *str = SvPVbyte (octets, len); 1692 char *str = SvPVbyte (octets, len);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines