… | |
… | |
1597 | |
1597 | |
1598 | void |
1598 | void |
1599 | rxvt_term::selection_clear (bool clipboard = false) |
1599 | rxvt_term::selection_clear (bool clipboard = false) |
1600 | |
1600 | |
1601 | void |
1601 | void |
1602 | rxvt_term::clipboard_copy (Time eventtime) |
|
|
1603 | |
|
|
1604 | void |
|
|
1605 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1602 | rxvt_term::selection_make (Time eventtime, bool rect = false) |
1606 | CODE: |
1603 | CODE: |
1607 | THIS->selection.op = SELECTION_CONT; |
1604 | THIS->selection.op = SELECTION_CONT; |
1608 | THIS->selection.rect = rect; |
1605 | THIS->selection.rect = rect; |
1609 | THIS->selection_make (eventtime); |
1606 | THIS->selection_make (eventtime); |
1610 | |
1607 | |
1611 | int |
1608 | int |
1612 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1609 | rxvt_term::selection_grab (Time eventtime, bool clipboard = false) |
1613 | |
1610 | |
1614 | void |
1611 | void |
1615 | rxvt_term::selection (SV *newtext = 0) |
1612 | rxvt_term::selection (SV *newtext = 0, bool clipboard = false) |
1616 | PPCODE: |
1613 | PPCODE: |
1617 | { |
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 | |
1618 | if (GIMME_V != G_VOID) |
1618 | if (GIMME_V != G_VOID) |
1619 | XPUSHs (THIS->selection.text |
1619 | XPUSHs (text |
1620 | ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) |
1620 | ? sv_2mortal (wcs2sv (text, len)) |
1621 | : &PL_sv_undef); |
1621 | : &PL_sv_undef); |
1622 | |
1622 | |
1623 | if (newtext) |
1623 | if (newtext) |
1624 | { |
1624 | { |
1625 | free (THIS->selection.text); |
1625 | free (text); |
1626 | |
1626 | |
1627 | THIS->selection.text = sv2wcs (newtext); |
1627 | text = sv2wcs (newtext); |
1628 | THIS->selection.len = wcslen (THIS->selection.text); |
1628 | len = wcslen (text); |
1629 | } |
1629 | } |
1630 | } |
1630 | } |
1631 | |
1631 | |
1632 | char |
1632 | char |
1633 | rxvt_term::cur_charset () |
1633 | rxvt_term::cur_charset () |