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

Comparing cvsroot/rxvt-unicode/src/rxvt.h (file contents):
Revision 1.204 by root, Sun Jan 15 06:02:40 2006 UTC vs.
Revision 1.207 by root, Mon Jan 16 09:51:57 2006 UTC

16 16
17#if ENABLE_FRILLS 17#if ENABLE_FRILLS
18# define ENABLE_XEMBED 1 18# define ENABLE_XEMBED 1
19# define ENABLE_EWMH 1 19# define ENABLE_EWMH 1
20# define CURSOR_BLINK 1 20# define CURSOR_BLINK 1
21#else
22# define ENABLE_MINIMAL 1
21#endif 23#endif
22 24
23#include <limits.h> 25#include <limits.h>
24 26
25#include <X11/cursorfont.h> 27#include <X11/cursorfont.h>
35#include "rxvttoolkit.h" 37#include "rxvttoolkit.h"
36#include "iom.h" 38#include "iom.h"
37#include "salloc.h" 39#include "salloc.h"
38 40
39#include "rxvtperl.h" 41#include "rxvtperl.h"
42
43// try to avoid some macros to decrease code size, on some systems
44#if ENABLE_MINIMAL
45# define strcmp(a,b) (strcmp)(a,b)
46# define strlen(a) (strlen)(a)
47# define strcpy(a,b) (strcpy)(a,b)
48# define memset(a,c,l) (memset)(a,c,l)
49# define memcpy(a,b,l) (memcpy)(a,b,l)
50#endif
40 51
41/* 52/*
42 ***************************************************************************** 53 *****************************************************************************
43 * SYSTEM HACKS 54 * SYSTEM HACKS
44 ***************************************************************************** 55 *****************************************************************************
1215 // modifies first argument(!) 1226 // modifies first argument(!)
1216 void paste (char *data, unsigned int len); 1227 void paste (char *data, unsigned int len);
1217 1228
1218 long vt_emask, vt_emask_perl; 1229 long vt_emask, vt_emask_perl;
1219 1230
1220 void vt_select_input () 1231 void vt_select_input () const
1221 { 1232 {
1222 XSelectInput (display->display, vt, vt_emask | vt_emask_perl); 1233 XSelectInput (display->display, vt, vt_emask | vt_emask_perl);
1223 } 1234 }
1224 1235
1225#if TRANSPARENT 1236#if TRANSPARENT
1283 1294
1284 bool init (int argc, const char *const *argv); 1295 bool init (int argc, const char *const *argv);
1285 bool init_vars (); 1296 bool init_vars ();
1286 1297
1287 bool pty_fill (); 1298 bool pty_fill ();
1299
1300 void make_current () const // make this the "currently active" urxvt instance
1301 {
1302 SET_R (this);
1303 rxvt_set_locale (locale);
1304 set_environ (envv);
1305 }
1288 1306
1289 void init_secondary (); 1307 void init_secondary ();
1290 const char **init_resources (int argc, const char *const *argv); 1308 const char **init_resources (int argc, const char *const *argv);
1291 const char *x_resource (const char *name); 1309 const char *x_resource (const char *name);
1292 void init_env (); 1310 void init_env ();
1417 void map_menuBar (int map); 1435 void map_menuBar (int map);
1418#endif 1436#endif
1419 1437
1420 // screen.C 1438 // screen.C
1421 1439
1422 void lalloc (line_t &l) 1440 void lalloc (line_t &l) const
1423 { 1441 {
1424 l.t = (text_t *)talloc->alloc (); 1442 l.t = (text_t *)talloc->alloc ();
1425 l.r = (rend_t *)ralloc->alloc (); 1443 l.r = (rend_t *)ralloc->alloc ();
1426 } 1444 }
1427 1445
1431 talloc->free (l.t); 1449 talloc->free (l.t);
1432 ralloc->free (l.r); 1450 ralloc->free (l.r);
1433 } 1451 }
1434#endif 1452#endif
1435 1453
1436 void lresize (line_t &l) 1454 void lresize (line_t &l) const
1437 { 1455 {
1438 if (!l.t) 1456 if (!l.t)
1439 return; 1457 return;
1440 1458
1441 l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t)); 1459 l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t));
1445 1463
1446 if (ncol > prev_ncol) 1464 if (ncol > prev_ncol)
1447 scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); 1465 scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE);
1448 } 1466 }
1449 1467
1450 int fgcolor_of (rend_t r) 1468 int fgcolor_of (rend_t r) const
1451 { 1469 {
1452 int base = GET_BASEFG (r); 1470 int base = GET_BASEFG (r);
1453#ifndef NO_BRIGHTCOLOR 1471#ifndef NO_BRIGHTCOLOR
1454 if (r & RS_Bold 1472 if (r & RS_Bold
1455# if ENABLE_STYLES 1473# if ENABLE_STYLES
1459 base += minBrightCOLOR - minCOLOR; 1477 base += minBrightCOLOR - minCOLOR;
1460#endif 1478#endif
1461 return base; 1479 return base;
1462 } 1480 }
1463 1481
1464 int bgcolor_of (rend_t r) 1482 int bgcolor_of (rend_t r) const
1465 { 1483 {
1466 int base = GET_BASEBG (r); 1484 int base = GET_BASEBG (r);
1467#ifndef NO_BRIGHTCOLOR 1485#ifndef NO_BRIGHTCOLOR
1468 if (r & RS_Blink 1486 if (r & RS_Blink
1469# if ENABLE_STYLES 1487# if ENABLE_STYLES
1473 base += minBrightCOLOR - minCOLOR; 1491 base += minBrightCOLOR - minCOLOR;
1474#endif 1492#endif
1475 return base; 1493 return base;
1476 } 1494 }
1477 1495
1478 bool option (uint32_t opt) 1496 bool option (uint32_t opt) const
1479 { 1497 {
1480 return OPTION (opt); 1498 return OPTION (opt);
1481 } 1499 }
1482 1500
1483 void set_option (uint32_t opt, bool set) 1501 void set_option (uint32_t opt, bool set)
1486 options |= opt; 1504 options |= opt;
1487 else 1505 else
1488 options &= ~opt; 1506 options &= ~opt;
1489 } 1507 }
1490 1508
1491 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); 1509 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const;
1492 void scr_blank_screen_mem (line_t &l, rend_t efs); 1510 void scr_blank_screen_mem (line_t &l, rend_t efs) const;
1493 int scr_scroll_text (int row1, int row2, int count); 1511 int scr_scroll_text (int row1, int row2, int count);
1494 void scr_reset (); 1512 void scr_reset ();
1495 void scr_release (); 1513 void scr_release ();
1496 void scr_clear (bool really = false); 1514 void scr_clear (bool really = false);
1497 void scr_refresh (unsigned char refresh_type); 1515 void scr_refresh (unsigned char refresh_type);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines