… | |
… | |
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), |
… | |
… | |
1597 | |
1608 | |
1598 | void |
1609 | void |
1599 | rxvt_term::selection_clear (bool clipboard = false) |
1610 | rxvt_term::selection_clear (bool clipboard = false) |
1600 | |
1611 | |
1601 | void |
1612 | void |
1602 | rxvt_term::clipboard_copy (Time eventtime) |
|
|
1603 | |
|
|
1604 | void |
|
|
1605 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1613 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1606 | CODE: |
1614 | CODE: |
1607 | THIS->selection.op = SELECTION_CONT; |
1615 | THIS->selection.op = SELECTION_CONT; |
1608 | THIS->selection.rect = rect; |
1616 | THIS->selection.rect = rect; |
1609 | THIS->selection_make (eventtime); |
1617 | THIS->selection_make (eventtime); |
1610 | |
1618 | |
1611 | int |
1619 | int |
1612 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1620 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1613 | |
1621 | |
1614 | void |
1622 | void |
1615 | rxvt_term::selection (SV *newtext = 0) |
1623 | rxvt_term::selection (SV *newtext = 0, bool clipboard = false) |
1616 | PPCODE: |
1624 | PPCODE: |
1617 | { |
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 | |
1618 | if (GIMME_V != G_VOID) |
1629 | if (GIMME_V != G_VOID) |
1619 | XPUSHs (THIS->selection.text |
1630 | XPUSHs (text |
1620 | ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) |
1631 | ? sv_2mortal (wcs2sv (text, len)) |
1621 | : &PL_sv_undef); |
1632 | : &PL_sv_undef); |
1622 | |
1633 | |
1623 | if (newtext) |
1634 | if (newtext) |
1624 | { |
1635 | { |
1625 | free (THIS->selection.text); |
1636 | free (text); |
1626 | |
1637 | |
1627 | THIS->selection.text = sv2wcs (newtext); |
1638 | text = sv2wcs (newtext); |
1628 | THIS->selection.len = wcslen (THIS->selection.text); |
1639 | len = wcslen (text); |
1629 | } |
1640 | } |
1630 | } |
1641 | } |
1631 | |
1642 | |
1632 | char |
1643 | char |
1633 | rxvt_term::cur_charset () |
1644 | rxvt_term::cur_charset () |
… | |
… | |
1664 | char *str = SvPVbyte (octets, len); |
1675 | char *str = SvPVbyte (octets, len); |
1665 | C_ARGS: |
1676 | C_ARGS: |
1666 | str, len |
1677 | str, len |
1667 | |
1678 | |
1668 | void |
1679 | void |
|
|
1680 | rxvt_term::tt_paste (SV *octets) |
|
|
1681 | INIT: |
|
|
1682 | STRLEN len; |
|
|
1683 | char *str = SvPVbyte (octets, len); |
|
|
1684 | C_ARGS: |
|
|
1685 | str, len |
|
|
1686 | |
|
|
1687 | void |
1669 | rxvt_term::cmd_parse (SV *octets) |
1688 | rxvt_term::cmd_parse (SV *octets) |
1670 | CODE: |
1689 | CODE: |
1671 | { |
1690 | { |
1672 | STRLEN len; |
1691 | STRLEN len; |
1673 | char *str = SvPVbyte (octets, len); |
1692 | char *str = SvPVbyte (octets, len); |