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.267 by ayin, Sat Feb 17 16:43:58 2007 UTC vs.
Revision 1.270 by sasha, Fri Jun 8 20:04:12 2007 UTC

73#endif 73#endif
74 74
75#include <termios.h> 75#include <termios.h>
76typedef struct termios ttymode_t; 76typedef struct termios ttymode_t;
77 77
78#ifdef HAVE_AFTERIMAGE
79# include <afterimage.h>
80#undef min
81#undef max
78#ifdef XPM_BACKGROUND 82#elif defined(XPM_BACKGROUND)
79# ifdef XPM_INC_X11 83# ifdef XPM_INC_X11
80# include <X11/xpm.h> 84# include <X11/xpm.h>
81# else 85# else
82# include <xpm.h> 86# include <xpm.h>
83# endif 87# endif
177#endif 181#endif
178 182
179#ifdef XPM_BACKGROUND 183#ifdef XPM_BACKGROUND
180typedef struct { 184typedef struct {
181 short w, h, x, y; 185 short w, h, x, y;
186 bool auto_resize ;
182 Pixmap pixmap; 187 Pixmap pixmap;
183} bgPixmap_t; 188} bgPixmap_t;
184#endif 189#endif
185 190
186/* 191/*
687#define Col2Pixel(col) ((int32_t)Width2Pixel(col)) 692#define Col2Pixel(col) ((int32_t)Width2Pixel(col))
688#define Row2Pixel(row) ((int32_t)Height2Pixel(row)) 693#define Row2Pixel(row) ((int32_t)Height2Pixel(row))
689#define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) 694#define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth)
690#define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) 695#define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight)
691 696
692#define OPTION(opt) (options & (opt))
693#define DEFAULT_OPTIONS (Opt_scrollBar \
694 | Opt_scrollTtyOutput \
695 | Opt_jumpScroll \
696 | Opt_secondaryScreen \
697 | Opt_secondaryScroll \
698 | Opt_pastableTabs \
699 | Opt_intensityStyles)
700
701// for m >= -n, ensure remainder lies between 0..n-1 697// for m >= -n, ensure remainder lies between 0..n-1
702#define MOD(m,n) (((m) + (n)) % (n)) 698#define MOD(m,n) (((m) + (n)) % (n))
703 699
704#define LINENO(n) MOD (term_start + int(n), total_rows) 700#define LINENO(n) MOD (term_start + int(n), total_rows)
705#define ROW(n) row_buf [LINENO (n)] 701#define ROW(n) row_buf [LINENO (n)]
1025 XComposeStatus compose; 1021 XComposeStatus compose;
1026 ttymode_t tio; 1022 ttymode_t tio;
1027 row_col_t oldcursor; 1023 row_col_t oldcursor;
1028#ifdef XPM_BACKGROUND 1024#ifdef XPM_BACKGROUND
1029 bgPixmap_t bgPixmap; 1025 bgPixmap_t bgPixmap;
1026#ifdef HAVE_AFTERIMAGE
1027 ASImageManager *asimman;
1028 ASImage *original_asim;
1029 struct { unsigned int width, height; } xpmAttr; /* all we need is width/height */
1030#else
1030 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ 1031 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */
1032#endif
1031#endif 1033#endif
1032 1034
1033#if ENABLE_OVERLAY 1035#if ENABLE_OVERLAY
1034 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions 1036 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions
1035 text_t **ov_text; 1037 text_t **ov_text;
1096 } 1098 }
1097 1099
1098#if TRANSPARENT || ENABLE_PERL 1100#if TRANSPARENT || ENABLE_PERL
1099 void rootwin_cb (XEvent &xev); 1101 void rootwin_cb (XEvent &xev);
1100 xevent_watcher rootwin_ev; 1102 xevent_watcher rootwin_ev;
1103 void check_our_parents_cb (time_watcher &w);
1104 time_watcher check_our_aprents_ev;
1101#endif 1105#endif
1102 1106
1103 void x_cb (XEvent &xev); 1107 void x_cb (XEvent &xev);
1104 void flush (); 1108 void flush ();
1105 xevent_watcher termwin_ev; 1109 xevent_watcher termwin_ev;
1294 { 1298 {
1295 int base = GET_BASEFG (r); 1299 int base = GET_BASEFG (r);
1296#ifndef NO_BRIGHTCOLOR 1300#ifndef NO_BRIGHTCOLOR
1297 if (r & RS_Bold 1301 if (r & RS_Bold
1298# if ENABLE_STYLES 1302# if ENABLE_STYLES
1299 && OPTION (Opt_intensityStyles) 1303 && option (Opt_intensityStyles)
1300# endif 1304# endif
1301 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1305 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR))
1302 base += minBrightCOLOR - minCOLOR; 1306 base += minBrightCOLOR - minCOLOR;
1303#endif 1307#endif
1304 return base; 1308 return base;
1308 { 1312 {
1309 int base = GET_BASEBG (r); 1313 int base = GET_BASEBG (r);
1310#ifndef NO_BRIGHTCOLOR 1314#ifndef NO_BRIGHTCOLOR
1311 if (r & RS_Blink 1315 if (r & RS_Blink
1312# if ENABLE_STYLES 1316# if ENABLE_STYLES
1313 && OPTION (Opt_intensityStyles) 1317 && option (Opt_intensityStyles)
1314# endif 1318# endif
1315 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1319 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR))
1316 base += minBrightCOLOR - minCOLOR; 1320 base += minBrightCOLOR - minCOLOR;
1317#endif 1321#endif
1318 return base; 1322 return base;
1319 } 1323 }
1320 1324
1321 bool option (uint32_t opt) const NOTHROW 1325 bool option (uint8_t opt) const NOTHROW
1322 { 1326 {
1323 return OPTION (opt); 1327 return options[opt >> 3] & (1 << (opt & 7));
1324 } 1328 }
1325 1329
1326 void set_option (uint32_t opt, bool set) NOTHROW 1330 void set_option (uint8_t opt, bool set = true) NOTHROW
1327 { 1331 {
1328 if (set) 1332 if (set)
1329 options |= opt; 1333 options[opt >> 3] |= (1 << (opt & 7));
1330 else 1334 else
1331 options &= ~opt; 1335 options[opt >> 3] &= ~(1 << (opt & 7));
1332 } 1336 }
1333 1337
1334 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1338 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1335 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1339 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1336 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1340 int scr_scroll_text (int row1, int row2, int count) NOTHROW;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines