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

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.484 by sf-exg, Fri May 25 08:27:47 2012 UTC vs.
Revision 1.487 by root, Mon May 28 14:25:16 2012 UTC

230 defaultAlign = centerAlign, 230 defaultAlign = centerAlign,
231}; 231};
232 232
233struct rxvt_image 233struct rxvt_image
234{ 234{
235 int id;
236 unsigned short alpha; 235 unsigned short alpha;
237 uint8_t flags; 236 uint8_t flags;
238 unsigned int h_scale, v_scale; /* percents of the window size */ 237 unsigned int h_scale, v_scale; /* percents of the window size */
239 int h_align, v_align; /* percents of the window size: 238 int h_align, v_align; /* percents of the window size:
240 0 - left align, 50 - center, 100 - right */ 239 0 - left align, 50 - center, 100 - right */
241 240
242# ifdef HAVE_PIXBUF 241# ifdef HAVE_PIXBUF
243 auto_ptr<GdkPixbuf> pixbuf; 242 GdkPixbuf *pixbuf;
243
244 void destroy ()
245 {
246 if (pixbuf)
247 g_object_unref (pixbuf);
248 }
244 249
245 int width () 250 int width ()
246 { 251 {
247 return gdk_pixbuf_get_width (pixbuf); 252 return gdk_pixbuf_get_width (pixbuf);
248 } 253 }
745{ 750{
746 text_t *t; // terminal the text 751 text_t *t; // terminal the text
747 rend_t *r; // rendition, uses RS_ flags 752 rend_t *r; // rendition, uses RS_ flags
748 tlen_t_ l; // length of each text line 753 tlen_t_ l; // length of each text line
749 uint32_t f; // flags 754 uint32_t f; // flags
755
756 bool valid ()
757 {
758 return l >= 0;
759 }
760
761 void alloc ()
762 {
763 l = 0;
764 }
750 765
751 bool is_longer () 766 bool is_longer ()
752 { 767 {
753 return f & LINE_LONGER; 768 return f & LINE_LONGER;
754 } 769 }
1025 scrollBar_t scrollBar; 1040 scrollBar_t scrollBar;
1026 uint8_t options[(Opt_count + 7) >> 3]; 1041 uint8_t options[(Opt_count + 7) >> 3];
1027 XSizeHints szHint; 1042 XSizeHints szHint;
1028 rxvt_color *pix_colors; 1043 rxvt_color *pix_colors;
1029 Cursor TermWin_cursor; /* cursor for vt window */ 1044 Cursor TermWin_cursor; /* cursor for vt window */
1045
1030 line_t *row_buf; // all lines, scrollback + terminal, circular 1046 line_t *row_buf; // all lines, scrollback + terminal, circular
1031 line_t *drawn_buf; // text on screen 1047 line_t *drawn_buf; // text on screen
1032 line_t *swap_buf; // lines for swap buffer 1048 line_t *swap_buf; // lines for swap buffer
1033 char *tabs; /* per location: 1 == tab-stop */ 1049 char *tabs; /* per location: 1 == tab-stop */
1034 screen_t screen; 1050 screen_t screen;
1241 char *cmdbuf_ptr, *cmdbuf_endp; 1257 char *cmdbuf_ptr, *cmdbuf_endp;
1242 char cmdbuf_base[CBUFSIZ]; 1258 char cmdbuf_base[CBUFSIZ];
1243 1259
1244 ptytty *pty; 1260 ptytty *pty;
1245 1261
1246 rxvt_salloc *talloc; // text line allocator 1262 // chunk contains all line_t's as well as rend_t and text_t buffers
1247 rxvt_salloc *ralloc; // rend line allocator 1263 // for drawn_buf, swap_buf and row_buf, in this order
1264 void *chunk;
1265 size_t chunk_size;
1248 1266
1249 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's 1267 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's
1250 1268
1251#if ENABLE_FRILLS || ISO_14755 1269#if ENABLE_FRILLS || ISO_14755
1252 // ISO 14755 entry support 1270 // ISO 14755 entry support
1426 void get_window_origin (int &x, int &y); 1444 void get_window_origin (int &x, int &y);
1427 Pixmap get_pixmap_property (Atom property); 1445 Pixmap get_pixmap_property (Atom property);
1428 1446
1429 // screen.C 1447 // screen.C
1430 1448
1431 void lalloc (line_t &l) const
1432 {
1433 l.t = (text_t *)talloc->alloc ();
1434 l.r = (rend_t *)ralloc->alloc ();
1435 }
1436
1437#if 0
1438 void lfree (line_t &l)
1439 {
1440 talloc->free (l.t);
1441 ralloc->free (l.r);
1442 }
1443#endif
1444
1445 void lresize (line_t &l) const
1446 {
1447 if (!l.t)
1448 return;
1449
1450 l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t));
1451 l.r = (rend_t *)ralloc->alloc (l.r, prev_ncol * sizeof (rend_t));
1452
1453 l.l = min (l.l, ncol);
1454
1455 if (ncol > prev_ncol)
1456 scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE);
1457 }
1458
1459 int fgcolor_of (rend_t r) const NOTHROW 1449 int fgcolor_of (rend_t r) const NOTHROW
1460 { 1450 {
1461 int base = GET_BASEFG (r); 1451 int base = GET_BASEFG (r);
1462#ifndef NO_BRIGHTCOLOR 1452#ifndef NO_BRIGHTCOLOR
1463 if (r & RS_Bold 1453 if (r & RS_Bold
1492 void set_option (uint8_t opt, bool set = true) NOTHROW; 1482 void set_option (uint8_t opt, bool set = true) NOTHROW;
1493 1483
1494 // modifies first argument(!) 1484 // modifies first argument(!)
1495 void tt_paste (char *data, unsigned int len) NOTHROW; 1485 void tt_paste (char *data, unsigned int len) NOTHROW;
1496 void paste (char *data, unsigned int len) NOTHROW; 1486 void paste (char *data, unsigned int len) NOTHROW;
1487 void scr_alloc () NOTHROW;
1497 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1488 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1498 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1489 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1499 void scr_kill_char (line_t &l, int col) const NOTHROW; 1490 void scr_kill_char (line_t &l, int col) const NOTHROW;
1500 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1491 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1501 void scr_reset (); 1492 void scr_reset ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines