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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.415 by root, Mon May 28 14:25:16 2012 UTC vs.
Revision 1.417 by root, Mon May 28 16:40:03 2012 UTC

28#include "rxvt.h" /* NECESSARY */ 28#include "rxvt.h" /* NECESSARY */
29#include "rxvtperl.h" /* NECESSARY */ 29#include "rxvtperl.h" /* NECESSARY */
30 30
31#include <inttypes.h> 31#include <inttypes.h>
32 32
33#include "salloc.C" // HACK, should be a separate compile!
34
35static inline void 33static inline void
36fill_text (text_t *start, text_t value, int len) 34fill_text (text_t *start, text_t value, int len)
37{ 35{
38 while (len--) 36 while (len--)
39 *start++ = value; 37 *start++ = value;
157/* ------------------------------------------------------------------------- * 155/* ------------------------------------------------------------------------- *
158 * SCREEN INITIALISATION * 156 * SCREEN INITIALISATION *
159 * ------------------------------------------------------------------------- */ 157 * ------------------------------------------------------------------------- */
160 158
161void 159void
162rxvt_term::scr_alloc () 160rxvt_term::scr_alloc () NOTHROW
163{ 161{
164 int tsize = sizeof (text_t) * ncol; 162 int tsize = sizeof (text_t) * ncol;
165 int rsize = sizeof (rend_t) * ncol; 163 int rsize = sizeof (rend_t) * ncol;
166 164
167 // we assume that rend_t size is a sufficient alignment 165 // we assume that rend_t size is a sufficient alignment
190 drawn_buf = (line_t *)chunk; 188 drawn_buf = (line_t *)chunk;
191 swap_buf = drawn_buf + nrow; 189 swap_buf = drawn_buf + nrow;
192 row_buf = swap_buf + nrow; 190 row_buf = swap_buf + nrow;
193} 191}
194 192
195void 193void ecb_cold
196rxvt_term::scr_reset () 194rxvt_term::scr_reset ()
197{ 195{
198#if ENABLE_OVERLAY 196#if ENABLE_OVERLAY
199 scr_overlay_off (); 197 scr_overlay_off ();
200#endif 198#endif
432 430
433/* ------------------------------------------------------------------------- */ 431/* ------------------------------------------------------------------------- */
434/* 432/*
435 * Free everything. That way malloc debugging can find leakage. 433 * Free everything. That way malloc debugging can find leakage.
436 */ 434 */
437void 435void ecb_cold
438rxvt_term::scr_release () NOTHROW 436rxvt_term::scr_release () NOTHROW
439{ 437{
440 free (chunk); 438 free (chunk);
441 free (tabs); 439 free (tabs);
442} 440}
443 441
444/* ------------------------------------------------------------------------- */ 442/* ------------------------------------------------------------------------- */
445/* 443/*
446 * Hard/Soft reset 444 * Hard/Soft reset
447 */ 445 */
448void 446void ecb_cold
449rxvt_term::scr_poweron () 447rxvt_term::scr_poweron ()
450{ 448{
451 scr_release (); 449 scr_release ();
452 450
453 row_buf = 0; 451 row_buf = 0;
459 457
460 scr_clear (true); 458 scr_clear (true);
461 scr_refresh (); 459 scr_refresh ();
462} 460}
463 461
464void 462void ecb_cold
465rxvt_term::scr_soft_reset () NOTHROW 463rxvt_term::scr_soft_reset () NOTHROW
466{ 464{
467 /* only affects modes, nothing drastic such as clearing the screen */ 465 /* only affects modes, nothing drastic such as clearing the screen */
468#if ENABLE_OVERLAY 466#if ENABLE_OVERLAY
469 scr_overlay_off (); 467 scr_overlay_off ();
635/* 633/*
636 * Scroll text between <row1> and <row2> inclusive, by <count> lines 634 * Scroll text between <row1> and <row2> inclusive, by <count> lines
637 * count positive ==> scroll up 635 * count positive ==> scroll up
638 * count negative ==> scroll down 636 * count negative ==> scroll down
639 */ 637 */
640int 638int ecb_hot
641rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW 639rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW
642{ 640{
643 if (count == 0 || (row1 > row2)) 641 if (count == 0 || (row1 > row2))
644 return 0; 642 return 0;
645 643
779 777
780/* ------------------------------------------------------------------------- */ 778/* ------------------------------------------------------------------------- */
781/* 779/*
782 * Add text given in <str> of length <len> to screen struct 780 * Add text given in <str> of length <len> to screen struct
783 */ 781 */
784void 782void ecb_hot
785rxvt_term::scr_add_lines (const wchar_t *str, int len, int minlines) NOTHROW 783rxvt_term::scr_add_lines (const wchar_t *str, int len, int minlines) NOTHROW
786{ 784{
787 if (len <= 0) /* sanity */ 785 if (len <= 0) /* sanity */
788 return; 786 return;
789 787
1139 * XTERM_SEQ: ESC 6 1137 * XTERM_SEQ: ESC 6
1140 * Move cursor left in row. If we're at the left boundary, shift everything 1138 * Move cursor left in row. If we're at the left boundary, shift everything
1141 * in that row right. Clear left column. 1139 * in that row right. Clear left column.
1142 */ 1140 */
1143#if !ENABLE_MINIMAL 1141#if !ENABLE_MINIMAL
1144void 1142void ecb_cold
1145rxvt_term::scr_backindex () NOTHROW 1143rxvt_term::scr_backindex () NOTHROW
1146{ 1144{
1147 if (screen.cur.col > 0) 1145 if (screen.cur.col > 0)
1148 scr_gotorc (0, -1, R_RELATIVE | C_RELATIVE); 1146 scr_gotorc (0, -1, R_RELATIVE | C_RELATIVE);
1149 else 1147 else
1156 * XTERM_SEQ: ESC 9 1154 * XTERM_SEQ: ESC 9
1157 * Move cursor right in row. If we're at the right boundary, shift everything 1155 * Move cursor right in row. If we're at the right boundary, shift everything
1158 * in that row left. Clear right column. 1156 * in that row left. Clear right column.
1159 */ 1157 */
1160#if !ENABLE_MINIMAL 1158#if !ENABLE_MINIMAL
1161void 1159void ecb_cold
1162rxvt_term::scr_forwardindex () NOTHROW 1160rxvt_term::scr_forwardindex () NOTHROW
1163{ 1161{
1164 if (screen.cur.col < ncol - 1) 1162 if (screen.cur.col < ncol - 1)
1165 scr_gotorc (0, 1, R_RELATIVE | C_RELATIVE); 1163 scr_gotorc (0, 1, R_RELATIVE | C_RELATIVE);
1166 else 1164 else
1417/* ------------------------------------------------------------------------- */ 1415/* ------------------------------------------------------------------------- */
1418/* 1416/*
1419 * Fill the screen with `E's 1417 * Fill the screen with `E's
1420 * XTERM_SEQ: Screen Alignment Test: ESC # 8 1418 * XTERM_SEQ: Screen Alignment Test: ESC # 8
1421 */ 1419 */
1422void 1420void ecb_cold
1423rxvt_term::scr_E () NOTHROW 1421rxvt_term::scr_E () NOTHROW
1424{ 1422{
1425 rend_t fs; 1423 rend_t fs;
1426 1424
1427 want_refresh = 1; 1425 want_refresh = 1;
1591/* ------------------------------------------------------------------------- */ 1589/* ------------------------------------------------------------------------- */
1592/* 1590/*
1593 * Set the scrolling region 1591 * Set the scrolling region
1594 * XTERM_SEQ: Set region <top> - <bot> inclusive: ESC [ <top> ; <bot> r 1592 * XTERM_SEQ: Set region <top> - <bot> inclusive: ESC [ <top> ; <bot> r
1595 */ 1593 */
1596void 1594void ecb_cold
1597rxvt_term::scr_scroll_region (int top, int bot) NOTHROW 1595rxvt_term::scr_scroll_region (int top, int bot) NOTHROW
1598{ 1596{
1599 max_it (top, 0); 1597 max_it (top, 0);
1600 min_it (bot, nrow - 1); 1598 min_it (bot, nrow - 1);
1601 1599
1611/* 1609/*
1612 * Make the cursor visible/invisible 1610 * Make the cursor visible/invisible
1613 * XTERM_SEQ: Make cursor visible : ESC [ ? 25 h 1611 * XTERM_SEQ: Make cursor visible : ESC [ ? 25 h
1614 * XTERM_SEQ: Make cursor invisible: ESC [ ? 25 l 1612 * XTERM_SEQ: Make cursor invisible: ESC [ ? 25 l
1615 */ 1613 */
1616void 1614void ecb_cold
1617rxvt_term::scr_cursor_visible (int mode) NOTHROW 1615rxvt_term::scr_cursor_visible (int mode) NOTHROW
1618{ 1616{
1619 want_refresh = 1; 1617 want_refresh = 1;
1620 1618
1621 if (mode) 1619 if (mode)
1628/* 1626/*
1629 * Set/unset automatic wrapping 1627 * Set/unset automatic wrapping
1630 * XTERM_SEQ: Set Wraparound : ESC [ ? 7 h 1628 * XTERM_SEQ: Set Wraparound : ESC [ ? 7 h
1631 * XTERM_SEQ: Unset Wraparound: ESC [ ? 7 l 1629 * XTERM_SEQ: Unset Wraparound: ESC [ ? 7 l
1632 */ 1630 */
1633void 1631void ecb_cold
1634rxvt_term::scr_autowrap (int mode) NOTHROW 1632rxvt_term::scr_autowrap (int mode) NOTHROW
1635{ 1633{
1636 if (mode) 1634 if (mode)
1637 screen.flags |= Screen_Autowrap; 1635 screen.flags |= Screen_Autowrap;
1638 else 1636 else
1647 * Relative mode: line numbers are relative to top margin of scrolling region 1645 * Relative mode: line numbers are relative to top margin of scrolling region
1648 * and the cursor cannot be moved outside. 1646 * and the cursor cannot be moved outside.
1649 * XTERM_SEQ: Set Absolute: ESC [ ? 6 h 1647 * XTERM_SEQ: Set Absolute: ESC [ ? 6 h
1650 * XTERM_SEQ: Set Relative: ESC [ ? 6 l 1648 * XTERM_SEQ: Set Relative: ESC [ ? 6 l
1651 */ 1649 */
1652void 1650void ecb_cold
1653rxvt_term::scr_relative_origin (int mode) NOTHROW 1651rxvt_term::scr_relative_origin (int mode) NOTHROW
1654{ 1652{
1655 if (mode) 1653 if (mode)
1656 screen.flags |= Screen_Relative; 1654 screen.flags |= Screen_Relative;
1657 else 1655 else
1664/* 1662/*
1665 * Set insert/replace mode 1663 * Set insert/replace mode
1666 * XTERM_SEQ: Set Insert mode : ESC [ ? 4 h 1664 * XTERM_SEQ: Set Insert mode : ESC [ ? 4 h
1667 * XTERM_SEQ: Set Replace mode: ESC [ ? 4 l 1665 * XTERM_SEQ: Set Replace mode: ESC [ ? 4 l
1668 */ 1666 */
1669void 1667void ecb_cold
1670rxvt_term::scr_insert_mode (int mode) NOTHROW 1668rxvt_term::scr_insert_mode (int mode) NOTHROW
1671{ 1669{
1672 if (mode) 1670 if (mode)
1673 screen.flags |= Screen_Insert; 1671 screen.flags |= Screen_Insert;
1674 else 1672 else
1680 * Set/Unset tabs 1678 * Set/Unset tabs
1681 * XTERM_SEQ: Set tab at current column : ESC H 1679 * XTERM_SEQ: Set tab at current column : ESC H
1682 * XTERM_SEQ: Clear tab at current column: ESC [ 0 g 1680 * XTERM_SEQ: Clear tab at current column: ESC [ 0 g
1683 * XTERM_SEQ: Clear all tabs : ESC [ 3 g 1681 * XTERM_SEQ: Clear all tabs : ESC [ 3 g
1684 */ 1682 */
1685void 1683void ecb_cold
1686rxvt_term::scr_set_tab (int mode) NOTHROW 1684rxvt_term::scr_set_tab (int mode) NOTHROW
1687{ 1685{
1688 if (mode < 0) 1686 if (mode < 0)
1689 memset (tabs, 0, ncol); 1687 memset (tabs, 0, ncol);
1690 else if (screen.cur.col < ncol) 1688 else if (screen.cur.col < ncol)
1729/* ------------------------------------------------------------------------- */ 1727/* ------------------------------------------------------------------------- */
1730/* 1728/*
1731 * Report current cursor position 1729 * Report current cursor position
1732 * XTERM_SEQ: Report position: ESC [ 6 n 1730 * XTERM_SEQ: Report position: ESC [ 6 n
1733 */ 1731 */
1734void 1732void ecb_cold
1735rxvt_term::scr_report_position () NOTHROW 1733rxvt_term::scr_report_position () NOTHROW
1736{ 1734{
1737 tt_printf ("\033[%d;%dR", screen.cur.row + 1, screen.cur.col + 1); 1735 tt_printf ("\033[%d;%dR", screen.cur.row + 1, screen.cur.col + 1);
1738} 1736}
1739 1737
1742 * ------------------------------------------------------------------------- */ 1740 * ------------------------------------------------------------------------- */
1743 1741
1744/* 1742/*
1745 * Set font style 1743 * Set font style
1746 */ 1744 */
1747void 1745void ecb_cold
1748rxvt_term::set_font_style () NOTHROW 1746rxvt_term::set_font_style () NOTHROW
1749{ 1747{
1750#if 0 1748#if 0
1751 switch (charsets [screen.charset]) 1749 switch (charsets [screen.charset])
1752 { 1750 {
1774 * XTERM_SEQ: Invoke G0 character set: CTRL-O 1772 * XTERM_SEQ: Invoke G0 character set: CTRL-O
1775 * XTERM_SEQ: Invoke G1 character set: CTRL-N 1773 * XTERM_SEQ: Invoke G1 character set: CTRL-N
1776 * XTERM_SEQ: Invoke G2 character set: ESC N 1774 * XTERM_SEQ: Invoke G2 character set: ESC N
1777 * XTERM_SEQ: Invoke G3 character set: ESC O 1775 * XTERM_SEQ: Invoke G3 character set: ESC O
1778 */ 1776 */
1779void 1777void ecb_cold
1780rxvt_term::scr_charset_choose (int set) NOTHROW 1778rxvt_term::scr_charset_choose (int set) NOTHROW
1781{ 1779{
1782 screen.charset = set; 1780 screen.charset = set;
1783 set_font_style (); 1781 set_font_style ();
1784} 1782}
1805 * ------------------------------------------------------------------------- */ 1803 * ------------------------------------------------------------------------- */
1806 1804
1807/* 1805/*
1808 * refresh matching text. 1806 * refresh matching text.
1809 */ 1807 */
1810bool 1808bool ecb_cold
1811rxvt_term::scr_refresh_rend (rend_t mask, rend_t value) NOTHROW 1809rxvt_term::scr_refresh_rend (rend_t mask, rend_t value) NOTHROW
1812{ 1810{
1813 bool found = false; 1811 bool found = false;
1814 1812
1815 for (int i = 0; i < nrow; i++) 1813 for (int i = 0; i < nrow; i++)
1834 PART_BEG = 0, 1832 PART_BEG = 0,
1835 PART_END, 1833 PART_END,
1836 RC_COUNT 1834 RC_COUNT
1837}; 1835};
1838 1836
1839void 1837void ecb_hot
1840rxvt_term::scr_expose (int x, int y, int ewidth, int eheight, bool refresh) NOTHROW 1838rxvt_term::scr_expose (int x, int y, int ewidth, int eheight, bool refresh) NOTHROW
1841{ 1839{
1842 int i; 1840 int i;
1843 row_col_t rc[RC_COUNT]; 1841 row_col_t rc[RC_COUNT];
1844 1842
1970 HOOK_INVOKE ((this, HOOK_BELL, DT_END)); 1968 HOOK_INVOKE ((this, HOOK_BELL, DT_END));
1971#endif 1969#endif
1972} 1970}
1973 1971
1974/* ------------------------------------------------------------------------- */ 1972/* ------------------------------------------------------------------------- */
1975void 1973void ecb_cold
1976rxvt_term::scr_printscreen (int fullhist) NOTHROW 1974rxvt_term::scr_printscreen (int fullhist) NOTHROW
1977{ 1975{
1978#ifdef PRINTPIPE 1976#ifdef PRINTPIPE
1979 int nrows, row_start; 1977 int nrows, row_start;
1980 FILE *fd = popen_printer (); 1978 FILE *fd = popen_printer ();
2029/* 2027/*
2030 * Refresh the screen 2028 * Refresh the screen
2031 * drawn_text/drawn_rend contain the screen information before the update. 2029 * drawn_text/drawn_rend contain the screen information before the update.
2032 * screen.text/screen.rend contain what the screen will change to. 2030 * screen.text/screen.rend contain what the screen will change to.
2033 */ 2031 */
2034void 2032void ecb_hot
2035rxvt_term::scr_refresh () NOTHROW 2033rxvt_term::scr_refresh () NOTHROW
2036{ 2034{
2037 int16_t col, row, /* column/row we're processing */ 2035 int16_t col, row, /* column/row we're processing */
2038 ocrow; /* old cursor row */ 2036 ocrow; /* old cursor row */
2039 int i; /* tmp */ 2037 int i; /* tmp */
2505 screen.flags = old_screen_flags; 2503 screen.flags = old_screen_flags;
2506 num_scr = 0; 2504 num_scr = 0;
2507 num_scr_allow = 1; 2505 num_scr_allow = 1;
2508} 2506}
2509 2507
2510void 2508void ecb_cold
2511rxvt_term::scr_remap_chars (line_t &l) NOTHROW 2509rxvt_term::scr_remap_chars (line_t &l) NOTHROW
2512{ 2510{
2513 if (!l.valid ()) 2511 if (!l.valid ())
2514 return; 2512 return;
2515 2513
2517 2515
2518 for (int i = ncol; i--; ) 2516 for (int i = ncol; i--; )
2519 l.r[i] = SET_FONT (l.r[i], FONTSET (l.r[i])->find_font (l.t[i])); 2517 l.r[i] = SET_FONT (l.r[i], FONTSET (l.r[i])->find_font (l.t[i]));
2520} 2518}
2521 2519
2522void 2520void ecb_cold
2523rxvt_term::scr_remap_chars () NOTHROW 2521rxvt_term::scr_remap_chars () NOTHROW
2524{ 2522{
2525 for (int i = total_rows; i--; ) 2523 for (int i = total_rows; i--; )
2526 scr_remap_chars (row_buf [i]); 2524 scr_remap_chars (row_buf [i]);
2527 2525
2530 scr_remap_chars (drawn_buf [i]); 2528 scr_remap_chars (drawn_buf [i]);
2531 scr_remap_chars (swap_buf [i]); 2529 scr_remap_chars (swap_buf [i]);
2532 } 2530 }
2533} 2531}
2534 2532
2535void 2533void ecb_cold
2536rxvt_term::scr_recolour (bool refresh) NOTHROW 2534rxvt_term::scr_recolour (bool refresh) NOTHROW
2537{ 2535{
2538 bool transparent = false; 2536 bool transparent = false;
2539 2537
2540#ifdef HAVE_BG_PIXMAP 2538#ifdef HAVE_BG_PIXMAP
2643 for (rend_t *srp = ROW(row).r; col < end_col; col++) 2641 for (rend_t *srp = ROW(row).r; col < end_col; col++)
2644 srp[col] ^= rstyle; 2642 srp[col] ^= rstyle;
2645} 2643}
2646 2644
2647/* ------------------------------------------------------------------------- */ 2645/* ------------------------------------------------------------------------- */
2648void 2646void ecb_hot
2649rxvt_term::scr_reverse_selection () NOTHROW 2647rxvt_term::scr_reverse_selection () NOTHROW
2650{ 2648{
2651 if (selection.op 2649 if (selection.op
2652 && current_screen == selection.screen 2650 && current_screen == selection.screen
2653 && selection.end.row >= view_start) 2651 && selection.end.row >= view_start)
2944/* ------------------------------------------------------------------------- */ 2942/* ------------------------------------------------------------------------- */
2945/* 2943/*
2946 * Mark or select text based upon number of clicks: 1, 2, or 3 2944 * Mark or select text based upon number of clicks: 1, 2, or 3
2947 * EXT: button 1 press 2945 * EXT: button 1 press
2948 */ 2946 */
2949void 2947void ecb_cold
2950rxvt_term::selection_click (int clicks, int x, int y) NOTHROW 2948rxvt_term::selection_click (int clicks, int x, int y) NOTHROW
2951{ 2949{
2952 clicks = ((clicks - 1) % 3) + 1; 2950 clicks = ((clicks - 1) % 3) + 1;
2953 selection.clicks = clicks; /* save clicks so extend will work */ 2951 selection.clicks = clicks; /* save clicks so extend will work */
2954 2952
2973 2971
2974/* ------------------------------------------------------------------------- */ 2972/* ------------------------------------------------------------------------- */
2975/* 2973/*
2976 * Mark a selection at the specified col/row 2974 * Mark a selection at the specified col/row
2977 */ 2975 */
2978void 2976void ecb_cold
2979rxvt_term::selection_start_colrow (int col, int row) NOTHROW 2977rxvt_term::selection_start_colrow (int col, int row) NOTHROW
2980{ 2978{
2981 want_refresh = 1; 2979 want_refresh = 1;
2982 2980
2983 selection.mark.row = row + view_start; 2981 selection.mark.row = row + view_start;
3010/* what do we want: spaces/tabs are delimiters or cutchars or non-cutchars */ 3008/* what do we want: spaces/tabs are delimiters or cutchars or non-cutchars */
3011#define DELIMIT_TEXT(x) \ 3009#define DELIMIT_TEXT(x) \
3012 (unicode::is_space (x) ? 2 : (x) <= 0xff && !!strchr (rs[Rs_cutchars], (x))) 3010 (unicode::is_space (x) ? 2 : (x) <= 0xff && !!strchr (rs[Rs_cutchars], (x)))
3013#define DELIMIT_REND(x) 1 3011#define DELIMIT_REND(x) 1
3014 3012
3015void 3013void ecb_cold
3016rxvt_term::selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW 3014rxvt_term::selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW
3017{ 3015{
3018 int col, row, dirnadd, tcol, trow, w1, w2; 3016 int col, row, dirnadd, tcol, trow, w1, w2;
3019 row_col_t bound; 3017 row_col_t bound;
3020 text_t *stp; 3018 text_t *stp;
3094 * EXT: button 3 press; button 1 or 3 drag 3092 * EXT: button 3 press; button 1 or 3 drag
3095 * flag == 0 ==> button 1 3093 * flag == 0 ==> button 1
3096 * flag == 1 ==> button 3 press 3094 * flag == 1 ==> button 3 press
3097 * flag == 2 ==> button 3 motion 3095 * flag == 2 ==> button 3 motion
3098 */ 3096 */
3099void 3097void ecb_cold
3100rxvt_term::selection_extend (int x, int y, int flag) NOTHROW 3098rxvt_term::selection_extend (int x, int y, int flag) NOTHROW
3101{ 3099{
3102 int col = clamp (Pixel2Col (x), 0, ncol); 3100 int col = clamp (Pixel2Col (x), 0, ncol);
3103 int row = clamp (Pixel2Row (y), 0, nrow - 1); 3101 int row = clamp (Pixel2Row (y), 0, nrow - 1);
3104 3102
3130 3128
3131/* ------------------------------------------------------------------------- */ 3129/* ------------------------------------------------------------------------- */
3132/* 3130/*
3133 * Extend the selection to the specified col/row 3131 * Extend the selection to the specified col/row
3134 */ 3132 */
3135void 3133void ecb_cold
3136rxvt_term::selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW 3134rxvt_term::selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW
3137{ 3135{
3138 row_col_t pos; 3136 row_col_t pos;
3139 enum { 3137 enum {
3140 LEFT, RIGHT 3138 LEFT, RIGHT
3331 ::swap (selection.beg.col, selection.end.col); 3329 ::swap (selection.beg.col, selection.end.col);
3332#endif 3330#endif
3333} 3331}
3334 3332
3335#if !ENABLE_MINIMAL 3333#if !ENABLE_MINIMAL
3336void 3334void ecb_cold
3337rxvt_term::selection_remove_trailing_spaces () NOTHROW 3335rxvt_term::selection_remove_trailing_spaces () NOTHROW
3338{ 3336{
3339 int32_t end_col, end_row; 3337 int32_t end_col, end_row;
3340 text_t *stp; 3338 text_t *stp;
3341 3339
3379/* ------------------------------------------------------------------------- */ 3377/* ------------------------------------------------------------------------- */
3380/* 3378/*
3381 * Double click on button 3 when already selected 3379 * Double click on button 3 when already selected
3382 * EXT: button 3 double click 3380 * EXT: button 3 double click
3383 */ 3381 */
3384void 3382void ecb_cold
3385rxvt_term::selection_rotate (int x, int y) NOTHROW 3383rxvt_term::selection_rotate (int x, int y) NOTHROW
3386{ 3384{
3387 selection.clicks = selection.clicks % 3 + 1; 3385 selection.clicks = selection.clicks % 3 + 1;
3388 selection_extend_colrow (Pixel2Col (x), Pixel2Row (y), 1, 0, 1); 3386 selection_extend_colrow (Pixel2Col (x), Pixel2Row (y), 1, 0, 1);
3389} 3387}
3391/* ------------------------------------------------------------------------- */ 3389/* ------------------------------------------------------------------------- */
3392/* 3390/*
3393 * Respond to a request for our current selection 3391 * Respond to a request for our current selection
3394 * EXT: SelectionRequest 3392 * EXT: SelectionRequest
3395 */ 3393 */
3396void 3394void ecb_cold
3397rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW 3395rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW
3398{ 3396{
3399 Atom property = rq.property == None ? rq.target : rq.property; 3397 Atom property = rq.property == None ? rq.target : rq.property;
3400 XSelectionEvent ev; 3398 XSelectionEvent ev;
3401 3399
3535 XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev); 3533 XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev);
3536} 3534}
3537 3535
3538/* ------------------------------------------------------------------------- */ 3536/* ------------------------------------------------------------------------- */
3539#ifdef USE_XIM 3537#ifdef USE_XIM
3540void 3538void ecb_cold
3541rxvt_term::im_set_position (XPoint &pos) NOTHROW 3539rxvt_term::im_set_position (XPoint &pos) NOTHROW
3542{ 3540{
3543 XWindowAttributes xwa; 3541 XWindowAttributes xwa;
3544 3542
3545 XGetWindowAttributes (dpy, vt, &xwa); 3543 XGetWindowAttributes (dpy, vt, &xwa);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines