… | |
… | |
1550 | EXTEND (SP, 2); |
1550 | EXTEND (SP, 2); |
1551 | PUSHs (sv_2mortal (newSViv (rc.row))); |
1551 | PUSHs (sv_2mortal (newSViv (rc.row))); |
1552 | PUSHs (sv_2mortal (newSViv (rc.col))); |
1552 | PUSHs (sv_2mortal (newSViv (rc.col))); |
1553 | } |
1553 | } |
1554 | |
1554 | |
1555 | if (items == 3) |
1555 | if (items >= 3) |
1556 | { |
1556 | { |
1557 | rc.row = SvIV (ST (1)); |
1557 | rc.row = SvIV (ST (1)); |
1558 | rc.col = SvIV (ST (2)); |
1558 | rc.col = SvIV (ST (2)); |
1559 | |
1559 | |
1560 | if (ix == 2) |
1560 | if (ix == 2) |
… | |
… | |
1576 | clamp_it (rc.col, 0, THIS->ncol); |
1576 | clamp_it (rc.col, 0, THIS->ncol); |
1577 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1577 | clamp_it (rc.row, THIS->top_row, THIS->nrow - 1); |
1578 | |
1578 | |
1579 | if (ix) |
1579 | if (ix) |
1580 | { |
1580 | { |
|
|
1581 | THIS->selection.screen = THIS->current_screen; |
|
|
1582 | |
1581 | THIS->want_refresh = 1; |
1583 | THIS->want_refresh = 1; |
1582 | THIS->refresh_check (); |
1584 | THIS->refresh_check (); |
1583 | } |
1585 | } |
1584 | } |
1586 | } |
1585 | } |
1587 | } |
1586 | |
1588 | |
1587 | char |
1589 | int |
1588 | rxvt_term::cur_charset () |
1590 | rxvt_term::selection_screen (int screen = -1) |
1589 | CODE: |
1591 | CODE: |
1590 | RETVAL = THIS->charsets [THIS->screen.charset]; |
1592 | RETVAL = THIS->selection.screen; |
1591 | OUTPUT: |
1593 | if (screen >= 0) |
|
|
1594 | THIS->selection.screen = screen; |
|
|
1595 | OUTPUT: |
1592 | RETVAL |
1596 | RETVAL |
1593 | |
1597 | |
1594 | void |
1598 | void |
1595 | rxvt_term::selection_clear () |
1599 | rxvt_term::selection_clear (bool clipboard = false) |
1596 | |
1600 | |
1597 | void |
1601 | void |
1598 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1602 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1599 | CODE: |
1603 | CODE: |
1600 | THIS->selection.op = SELECTION_CONT; |
1604 | THIS->selection.op = SELECTION_CONT; |
1601 | THIS->selection.rect = rect; |
1605 | THIS->selection.rect = rect; |
1602 | THIS->selection_make (eventtime); |
1606 | THIS->selection_make (eventtime); |
1603 | |
1607 | |
1604 | int |
1608 | int |
1605 | rxvt_term::selection_grab (Time eventtime) |
1609 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1606 | |
1610 | |
1607 | void |
1611 | void |
1608 | rxvt_term::selection (SV *newtext = 0) |
1612 | rxvt_term::selection (SV *newtext = 0, bool clipboard = false) |
1609 | PPCODE: |
1613 | PPCODE: |
1610 | { |
1614 | { |
|
|
1615 | wchar_t * &text = clipboard ? THIS->selection.clip_text : THIS->selection.text; |
|
|
1616 | unsigned int &len = clipboard ? THIS->selection.clip_len : THIS->selection.len; |
|
|
1617 | |
1611 | if (GIMME_V != G_VOID) |
1618 | if (GIMME_V != G_VOID) |
1612 | XPUSHs (THIS->selection.text |
1619 | XPUSHs (text |
1613 | ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) |
1620 | ? sv_2mortal (wcs2sv (text, len)) |
1614 | : &PL_sv_undef); |
1621 | : &PL_sv_undef); |
1615 | |
1622 | |
1616 | if (newtext) |
1623 | if (newtext) |
1617 | { |
1624 | { |
1618 | free (THIS->selection.text); |
1625 | free (text); |
1619 | |
1626 | |
1620 | THIS->selection.text = sv2wcs (newtext); |
1627 | text = sv2wcs (newtext); |
1621 | THIS->selection.len = wcslen (THIS->selection.text); |
1628 | len = wcslen (text); |
1622 | } |
1629 | } |
1623 | } |
1630 | } |
|
|
1631 | |
|
|
1632 | char |
|
|
1633 | rxvt_term::cur_charset () |
|
|
1634 | CODE: |
|
|
1635 | RETVAL = THIS->charsets [THIS->screen.charset]; |
|
|
1636 | OUTPUT: |
|
|
1637 | RETVAL |
1624 | |
1638 | |
1625 | void |
1639 | 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) |
1640 | 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 | |
1641 | |
1628 | void |
1642 | void |