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.395 by root, Thu Apr 1 00:41:07 2010 UTC vs.
Revision 1.401 by sf-exg, Fri Apr 2 15:02:11 2010 UTC

247# define COLORTERMENVFULL COLORTERMENV "-xpm" 247# define COLORTERMENVFULL COLORTERMENV "-xpm"
248#else 248#else
249# define COLORTERMENVFULL COLORTERMENV 249# define COLORTERMENVFULL COLORTERMENV
250#endif 250#endif
251#ifndef TERMENV 251#ifndef TERMENV
252# ifdef USE_256_COLORS
253# define TERMENV "rxvt-unicode-256color"
254# else
252# define TERMENV "rxvt-unicode" 255# define TERMENV "rxvt-unicode"
256# endif
253#endif 257#endif
254 258
255#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) 259#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR)
256# define NO_MOUSE_REPORT_SCROLLBAR 1 260# define NO_MOUSE_REPORT_SCROLLBAR 1
257#endif 261#endif
304enum { 308enum {
305 PRIMARY = 0, 309 PRIMARY = 0,
306 SECONDARY, 310 SECONDARY,
307}; 311};
308 312
313// define various rendition bits and masks. the rendition word
314// is 32 bits in size, and we should use it as efficiently as possible
315
309#define RS_None 0 316#define RS_None 0
310 317
318// GET_BGATTR depends on RS_fgShift > RS_bgShift
311#define RS_colorMask ((1UL << Color_Bits) - 1UL) 319#define RS_colorMask ((1UL << Color_Bits) - 1UL)
312#define RS_bgShift 0 320#define RS_bgShift 0
313#define RS_fgShift (RS_bgShift + Color_Bits) 321#define RS_fgShift (RS_bgShift + Color_Bits)
314#define RS_bgMask (RS_colorMask << RS_bgShift) 322#define RS_bgMask (RS_colorMask << RS_bgShift)
315#define RS_fgMask (RS_colorMask << RS_fgShift) 323#define RS_fgMask (RS_colorMask << RS_fgShift)
316 324
317// font styles 325// must have space for rxvt_fontset::fontCount * 2 + 2 values
318#define RS_Bold 0x08000000UL // value 1 326#define RS_fontShift (RS_fgShift + Color_Bits)
319#define RS_Italic 0x10000000UL // value 2 327#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */
328#define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful
320 329
321// fake styles 330// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
322#define RS_Blink 0x20000000UL // blink 331#define RS_redraw (2UL << RS_fontShift)
323#define RS_RVid 0x40000000UL // reverse video
324#define RS_Uline 0x80000000UL // underline
325 332
326// 5 custom bits for extensions 333// 5 custom bits for extensions
327#define RS_customCount 16UL 334#define RS_customCount 16UL
328#define RS_customShift 23 335#define RS_customShift 23
329#define RS_customMask ((RS_customCount - 1UL) << RS_customShift) 336#define RS_customMask ((RS_customCount - 1UL) << RS_customShift)
330 337
331// must have space for rxvt_fontset::fontCount * 2 + 2 values 338// font styles
332#define RS_fontShift (RS_fgShift + Color_Bits) 339#define RS_Bold (1UL << RS_styleShift)
333#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */
334#define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful
335
336// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
337#define RS_redraw (2UL << RS_fontShift) 340#define RS_Italic (2UL << RS_styleShift)
338 341
339#define RS_styleCount 4 342#define RS_styleCount 4
343#define RS_styleShift 27
340#define RS_styleMask (RS_Bold | RS_Italic) 344#define RS_styleMask (RS_Bold | RS_Italic)
341#define RS_styleShift 27 345
346// fake styles
347#define RS_Blink (1UL << 29)
348#define RS_RVid (1UL << 30) // reverse video
349#define RS_Uline (1UL << 31) // underline
342 350
343#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline) 351#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
344#define RS_attrMask (RS_baseattrMask | RS_fontMask) 352#define RS_attrMask (RS_baseattrMask | RS_fontMask)
345 353
346#define DEFAULT_RSTYLE (RS_None | (Color_fg << RS_fgShift) | (Color_bg << RS_bgShift)) 354#define DEFAULT_RSTYLE (RS_None | (Color_fg << RS_fgShift) | (Color_bg << RS_bgShift))
637 645
638#define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) 646#define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift)
639#define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift)) 647#define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift))
640 648
641#define GET_ATTR(x) (((x) & RS_attrMask)) 649#define GET_ATTR(x) (((x) & RS_attrMask))
650// return attributes defining the background, encoding doesn't matter
651// depends on RS_fgShift > RS_bgShift
642#define GET_BGATTR(x) \ 652#define GET_BGATTR(x) \
653 (expect_false ((x) & RS_RVid) \
643 (((x) & RS_RVid) ? (((x) & (RS_attrMask & ~RS_RVid)) \ 654 ? (((x) & (RS_attrMask & ~RS_RVid)) \
644 | (((x) & RS_colorMask) << RS_bgShift)) \ 655 | (((x) & RS_fgMask) >> (RS_fgShift - RS_bgShift))) \
645 : ((x) & (RS_attrMask | RS_bgMask))) 656 : ((x) & (RS_attrMask | RS_bgMask)))
646#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift)) 657#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift))
647#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift)) 658#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift))
648#define SET_ATTR(x,a) (((x) & ~RS_attrMask) | (a)) 659#define SET_ATTR(x,a) (((x) & ~RS_attrMask) | (a))
649 660
650#define RS_SAME(a,b) (!(((a) ^ (b)) & ~RS_Careful)) 661#define RS_SAME(a,b) (!(((a) ^ (b)) & ~RS_Careful))
950 scrollBar_t scrollBar; 961 scrollBar_t scrollBar;
951 uint8_t options[(Opt_count + 7) >> 3]; 962 uint8_t options[(Opt_count + 7) >> 3];
952 XSizeHints szHint; 963 XSizeHints szHint;
953 rxvt_color *pix_colors; 964 rxvt_color *pix_colors;
954 Cursor TermWin_cursor; /* cursor for vt window */ 965 Cursor TermWin_cursor; /* cursor for vt window */
955 int numlock_state;
956 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf 966 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf
957 line_t *drawn_buf; // text on screen 967 line_t *drawn_buf; // text on screen
958 line_t *swap_buf; // lines for swap buffer 968 line_t *swap_buf; // lines for swap buffer
959 char *tabs; /* per location: 1 == tab-stop */ 969 char *tabs; /* per location: 1 == tab-stop */
960 screen_t screen; 970 screen_t screen;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines