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.407 by sf-exg, Wed Nov 16 18:52:17 2011 UTC vs.
Revision 1.413 by root, Wed Jan 18 12:39:14 2012 UTC

455 scr_clear (true); 455 scr_clear (true);
456 scr_refresh (); 456 scr_refresh ();
457} 457}
458 458
459void 459void
460rxvt_term::scr_soft_reset () 460rxvt_term::scr_soft_reset () NOTHROW
461{ 461{
462 /* only affects modes, nothing drastic such as clearing the screen */ 462 /* only affects modes, nothing drastic such as clearing the screen */
463#if ENABLE_OVERLAY 463#if ENABLE_OVERLAY
464 scr_overlay_off (); 464 scr_overlay_off ();
465#endif 465#endif
520 assert (s->cur.row >= 0); 520 assert (s->cur.row >= 0);
521 assert (s->cur.col >= 0); 521 assert (s->cur.col >= 0);
522} 522}
523 523
524void 524void
525rxvt_term::scr_swap_screen () 525rxvt_term::scr_swap_screen () NOTHROW
526{ 526{
527 if (!option (Opt_secondaryScreen)) 527 if (!option (Opt_secondaryScreen))
528 return; 528 return;
529 529
530 for (int i = prev_nrow; i--; ) 530 for (int i = prev_nrow; i--; )
1312 scr_blank_line (line, col, num, rstyle); 1312 scr_blank_line (line, col, num, rstyle);
1313} 1313}
1314 1314
1315/* ------------------------------------------------------------------------- */ 1315/* ------------------------------------------------------------------------- */
1316/* 1316/*
1317 * Erase part of whole of the screen 1317 * Erase part or whole of the screen
1318 * XTERM_SEQ: Clear screen after cursor : ESC [ 0 J 1318 * XTERM_SEQ: Clear screen after cursor : ESC [ 0 J
1319 * XTERM_SEQ: Clear screen before cursor: ESC [ 1 J 1319 * XTERM_SEQ: Clear screen before cursor: ESC [ 1 J
1320 * XTERM_SEQ: Clear whole screen : ESC [ 2 J 1320 * XTERM_SEQ: Clear whole screen : ESC [ 2 J
1321 */ 1321 */
1322void 1322void
1367 { 1367 {
1368 ren = DEFAULT_RSTYLE; 1368 ren = DEFAULT_RSTYLE;
1369 1369
1370 if (mapped) 1370 if (mapped)
1371 XClearArea (dpy, vt, 0, 1371 XClearArea (dpy, vt, 0,
1372 Row2Pixel (row - view_start), (unsigned int)width, 1372 Row2Pixel (row - view_start), (unsigned int)vt_width,
1373 (unsigned int)Height2Pixel (num), False); 1373 (unsigned int)Height2Pixel (num), False);
1374 } 1374 }
1375 else 1375 else
1376 { 1376 {
1377 ren = rstyle & (RS_fgMask | RS_bgMask); 1377 ren = rstyle & (RS_fgMask | RS_bgMask);
1380 { 1380 {
1381 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; 1381 gcvalue.foreground = pix_colors[bgcolor_of (rstyle)];
1382 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1382 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1383 XFillRectangle (dpy, vt, gc, 1383 XFillRectangle (dpy, vt, gc,
1384 0, Row2Pixel (row - view_start), 1384 0, Row2Pixel (row - view_start),
1385 (unsigned int)width, 1385 (unsigned int)vt_width,
1386 (unsigned int)Height2Pixel (num)); 1386 (unsigned int)Height2Pixel (num));
1387 gcvalue.foreground = pix_colors[Color_fg]; 1387 gcvalue.foreground = pix_colors[Color_fg];
1388 XChangeGC (dpy, gc, GCForeground, &gcvalue); 1388 XChangeGC (dpy, gc, GCForeground, &gcvalue);
1389 } 1389 }
1390 } 1390 }
1876 * Refresh the entire screen 1876 * Refresh the entire screen
1877 */ 1877 */
1878void 1878void
1879rxvt_term::scr_touch (bool refresh) NOTHROW 1879rxvt_term::scr_touch (bool refresh) NOTHROW
1880{ 1880{
1881 scr_expose (0, 0, width, height, refresh); 1881 scr_expose (0, 0, vt_width, vt_height, refresh);
1882} 1882}
1883 1883
1884/* ------------------------------------------------------------------------- */ 1884/* ------------------------------------------------------------------------- */
1885/* 1885/*
1886 * Move the display so that the line represented by scrollbar value Y is at 1886 * Move the display so that the line represented by scrollbar value Y is at
2167 { 2167 {
2168 int16_t nits; 2168 int16_t nits;
2169 int i = num_scr; 2169 int i = num_scr;
2170 int j; 2170 int j;
2171 int len, wlen; 2171 int len, wlen;
2172 dLocal (int, num_scr);
2173 2172
2174 j = nrow; 2173 j = nrow;
2175 wlen = len = -1; 2174 wlen = len = -1;
2176 row = i > 0 ? 0 : j - 1; 2175 row = i > 0 ? 0 : j - 1;
2177 2176
2668 */ 2667 */
2669#if 0 2668#if 0
2670void 2669void
2671rxvt_term::scr_dump (int fd) NOTHROW 2670rxvt_term::scr_dump (int fd) NOTHROW
2672{ 2671{
2673 int row, wrote; 2672 // if this method is needed, it can be implemented by factoring the
2674 unsigned int width, towrite; 2673 // relevant code in scr_printscreen
2675 const char r1[] = "\n";
2676
2677 for (row = saveLines + top_row;
2678 row < saveLines + nrow - 1; row++)
2679 {
2680 width = row_buf[row].l >= 0 ? row_buf[row].l
2681 : ncol;
2682 for (towrite = width; towrite; towrite -= wrote)
2683 {
2684 wrote = write (fd, & (row_buf[row].t[width - towrite]),
2685 towrite);
2686 if (wrote < 0)
2687 return; /* XXX: death, no report */
2688 }
2689 if (row_buf[row].l >= 0)
2690 if (write (fd, r1, 1) <= 0)
2691 return; /* XXX: death, no report */
2692 }
2693} 2674}
2694#endif 2675#endif
2695 2676
2696/* ------------------------------------------------------------------------- * 2677/* ------------------------------------------------------------------------- *
2697 * CHARACTER SELECTION * 2678 * CHARACTER SELECTION *
2723 for (unsigned int i = 0; i < len; i++) 2704 for (unsigned int i = 0; i < len; i++)
2724 if (data[i] == C0_LF) 2705 if (data[i] == C0_LF)
2725 data[i] = C0_CR; 2706 data[i] = C0_CR;
2726 2707
2727 if (priv_modes & PrivMode_BracketPaste) 2708 if (priv_modes & PrivMode_BracketPaste)
2728 tt_printf ("\e[200~"); 2709 tt_printf ("\x1b[200~");
2729 2710
2730 tt_write (data, len); 2711 tt_write (data, len);
2731 2712
2732 if (priv_modes & PrivMode_BracketPaste) 2713 if (priv_modes & PrivMode_BracketPaste)
2733 tt_printf ("\e[201~"); 2714 tt_printf ("\x1b[201~");
2734} 2715}
2735 2716
2736void 2717void
2737rxvt_term::paste (char *data, unsigned int len) NOTHROW 2718rxvt_term::paste (char *data, unsigned int len) NOTHROW
2738{ 2719{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines