… | |
… | |
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), |
… | |
… | |
1550 | EXTEND (SP, 2); |
1561 | EXTEND (SP, 2); |
1551 | PUSHs (sv_2mortal (newSViv (rc.row))); |
1562 | PUSHs (sv_2mortal (newSViv (rc.row))); |
1552 | PUSHs (sv_2mortal (newSViv (rc.col))); |
1563 | PUSHs (sv_2mortal (newSViv (rc.col))); |
1553 | } |
1564 | } |
1554 | |
1565 | |
1555 | if (items == 3) |
1566 | if (items >= 3) |
1556 | { |
1567 | { |
1557 | rc.row = SvIV (ST (1)); |
1568 | rc.row = SvIV (ST (1)); |
1558 | rc.col = SvIV (ST (2)); |
1569 | rc.col = SvIV (ST (2)); |
1559 | |
1570 | |
1560 | if (ix == 2) |
1571 | if (ix == 2) |
… | |
… | |
1576 | clamp_it (rc.col, 0, THIS->ncol); |
1587 | clamp_it (rc.col, 0, THIS->ncol); |
1577 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1588 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1578 | |
1589 | |
1579 | if (ix) |
1590 | if (ix) |
1580 | { |
1591 | { |
|
|
1592 | THIS->selection.screen = THIS->current_screen; |
|
|
1593 | |
1581 | THIS->want_refresh = 1; |
1594 | THIS->want_refresh = 1; |
1582 | THIS->refresh_check (); |
1595 | THIS->refresh_check (); |
1583 | } |
1596 | } |
1584 | } |
1597 | } |
1585 | } |
1598 | } |
1586 | |
1599 | |
1587 | char |
1600 | int |
1588 | rxvt_term::cur_charset () |
1601 | rxvt_term::selection_screen (int screen = -1) |
1589 | CODE: |
1602 | CODE: |
1590 | RETVAL = THIS->charsets [THIS->screen.charset]; |
1603 | RETVAL = THIS->selection.screen; |
1591 | OUTPUT: |
1604 | if (screen >= 0) |
|
|
1605 | THIS->selection.screen = screen; |
|
|
1606 | OUTPUT: |
1592 | RETVAL |
1607 | RETVAL |
1593 | |
1608 | |
1594 | void |
1609 | void |
1595 | rxvt_term::selection_clear () |
1610 | rxvt_term::selection_clear (bool clipboard = false) |
1596 | |
1611 | |
1597 | void |
1612 | void |
1598 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1613 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1599 | CODE: |
1614 | CODE: |
1600 | THIS->selection.op = SELECTION_CONT; |
1615 | THIS->selection.op = SELECTION_CONT; |
1601 | THIS->selection.rect = rect; |
1616 | THIS->selection.rect = rect; |
1602 | THIS->selection_make (eventtime); |
1617 | THIS->selection_make (eventtime); |
1603 | |
1618 | |
1604 | int |
1619 | int |
1605 | rxvt_term::selection_grab (Time eventtime) |
1620 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1606 | |
1621 | |
1607 | void |
1622 | void |
1608 | rxvt_term::selection (SV *newtext = 0) |
1623 | rxvt_term::selection (SV *newtext = 0, bool clipboard = false) |
1609 | PPCODE: |
1624 | PPCODE: |
1610 | { |
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 | |
1611 | if (GIMME_V != G_VOID) |
1629 | if (GIMME_V != G_VOID) |
1612 | XPUSHs (THIS->selection.text |
1630 | XPUSHs (text |
1613 | ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) |
1631 | ? sv_2mortal (wcs2sv (text, len)) |
1614 | : &PL_sv_undef); |
1632 | : &PL_sv_undef); |
1615 | |
1633 | |
1616 | if (newtext) |
1634 | if (newtext) |
1617 | { |
1635 | { |
1618 | free (THIS->selection.text); |
1636 | free (text); |
1619 | |
1637 | |
1620 | THIS->selection.text = sv2wcs (newtext); |
1638 | text = sv2wcs (newtext); |
1621 | THIS->selection.len = wcslen (THIS->selection.text); |
1639 | len = wcslen (text); |
1622 | } |
1640 | } |
1623 | } |
1641 | } |
|
|
1642 | |
|
|
1643 | char |
|
|
1644 | rxvt_term::cur_charset () |
|
|
1645 | CODE: |
|
|
1646 | RETVAL = THIS->charsets [THIS->screen.charset]; |
|
|
1647 | OUTPUT: |
|
|
1648 | RETVAL |
1624 | |
1649 | |
1625 | void |
1650 | void |
1626 | 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) |
1651 | 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) |
1627 | |
1652 | |
1628 | void |
1653 | void |
… | |
… | |
1650 | char *str = SvPVbyte (octets, len); |
1675 | char *str = SvPVbyte (octets, len); |
1651 | C_ARGS: |
1676 | C_ARGS: |
1652 | str, len |
1677 | str, len |
1653 | |
1678 | |
1654 | 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 |
1655 | rxvt_term::cmd_parse (SV *octets) |
1688 | rxvt_term::cmd_parse (SV *octets) |
1656 | CODE: |
1689 | CODE: |
1657 | { |
1690 | { |
1658 | STRLEN len; |
1691 | STRLEN len; |
1659 | char *str = SvPVbyte (octets, len); |
1692 | char *str = SvPVbyte (octets, len); |