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.398 by root, Thu Apr 1 01:03:20 2010 UTC vs.
Revision 1.412 by sf-exg, Sat Jul 24 10:20:26 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# if 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
319#define RS_fgMask (RS_colorMask << RS_fgShift) 323#define RS_fgMask (RS_colorMask << RS_fgShift)
320 324
321// must have space for rxvt_fontset::fontCount * 2 + 2 values 325// must have space for rxvt_fontset::fontCount * 2 + 2 values
322#define RS_fontShift (RS_fgShift + Color_Bits) 326#define RS_fontShift (RS_fgShift + Color_Bits)
323#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */ 327#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */
328#define RS_fontCount rxvt_fontset::fontCount
324#define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful 329#define RS_fontMask ((RS_fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful
325 330
326// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral" 331// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
327#define RS_redraw (2UL << RS_fontShift) 332#define RS_redraw (2UL << RS_fontShift)
328 333
334#define RS_Sel (1UL << 22)
335
329// 5 custom bits for extensions 336// 4 custom bits for extensions
330#define RS_customCount 16UL 337#define RS_customCount 16UL
331#define RS_customShift 23 338#define RS_customShift 23
332#define RS_customMask ((RS_customCount - 1UL) << RS_customShift) 339#define RS_customMask ((RS_customCount - 1UL) << RS_customShift)
333 340
334// font styles 341// font styles
385 XTerm_Color_cursor = 12, // change actual 'Cursor' color 392 XTerm_Color_cursor = 12, // change actual 'Cursor' color
386 XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color 393 XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color
387 XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color 394 XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color
388 XTerm_Color05 = 15, // not implemented (tektronix fg) 395 XTerm_Color05 = 15, // not implemented (tektronix fg)
389 XTerm_Color06 = 16, // not implemented (tektronix bg) 396 XTerm_Color06 = 16, // not implemented (tektronix bg)
390 XTerm_Color_RV = 17, // change actual 'Highlight' color 397 XTerm_Color_HC = 17, // change actual 'Highlight' bg color
398 XTerm_Color_HTC = 19, // change actual 'Highlight' fg color
391 XTerm_logfile = 46, // not implemented 399 XTerm_logfile = 46, // not implemented
392 XTerm_font = 50, 400 XTerm_font = 50,
393 401
394 XTerm_konsole30 = 30, // reserved for konsole 402 XTerm_konsole30 = 30, // reserved for konsole
395 XTerm_konsole31 = 31, // reserved for konsole 403 XTerm_konsole31 = 31, // reserved for konsole
397 /* 405 /*
398 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) 406 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL)
399 */ 407 */
400 408
401 // deprecated 409 // deprecated
402 Rxvt_Color_BD = 18,
403 Rxvt_Color_UL = 19,
404 Rxvt_restoreFG = 39, 410 Rxvt_restoreFG = 39,
405 Rxvt_restoreBG = 49, 411 Rxvt_restoreBG = 49,
406 412
407 Rxvt_Pixmap = 20, // new bg pixmap 413 Rxvt_Pixmap = 20, // new bg pixmap
408 Rxvt_dumpscreen = 55, // dump scrollback and all of screen 414 Rxvt_dumpscreen = 55, // dump scrollback and all of screen
462 Color_White = maxBrightCOLOR, 468 Color_White = maxBrightCOLOR,
463#else 469#else
464 Color_White = maxCOLOR, 470 Color_White = maxCOLOR,
465#endif 471#endif
466 minTermCOLOR = Color_White + 1, 472 minTermCOLOR = Color_White + 1,
467#ifndef USE_256_COLORS 473#if USE_256_COLORS
474 maxTermCOLOR = Color_White + 240,
475#else
468 maxTermCOLOR = Color_White + 72, 476 maxTermCOLOR = Color_White + 72,
469#else
470 maxTermCOLOR = Color_White + 240,
471#endif 477#endif
472#ifndef NO_CURSORCOLOR 478#ifndef NO_CURSORCOLOR
473 Color_cursor, 479 Color_cursor,
474 Color_cursor2, 480 Color_cursor2,
475#endif 481#endif
485#if ENABLE_FRILLS 491#if ENABLE_FRILLS
486 Color_underline, 492 Color_underline,
487#endif 493#endif
488#ifdef OPTION_HC 494#ifdef OPTION_HC
489 Color_HC, 495 Color_HC,
496 Color_HTC,
490#endif 497#endif
491 Color_scroll, 498 Color_scroll,
492#ifdef RXVT_SCROLLBAR 499#ifdef RXVT_SCROLLBAR
493 Color_trough, 500 Color_trough,
494#endif 501#endif
506#else 513#else
507 TOTAL_COLORS = NRS_COLORS 514 TOTAL_COLORS = NRS_COLORS
508#endif 515#endif
509}; 516};
510 517
511#ifndef USE_256_COLORS 518#if USE_256_COLORS
512#define Color_Bits 7 // 0 .. maxTermCOLOR 519# define Color_Bits 9 // 0 .. maxTermCOLOR
513#else 520#else
514#define Color_Bits 9 // 0 .. maxTermCOLOR 521# define Color_Bits 7 // 0 .. maxTermCOLOR
515#endif 522#endif
516 523
517/* 524/*
518 * Resource list 525 * Resource list
519 */ 526 */
608/* 615/*
609 ***************************************************************************** 616 *****************************************************************************
610 * MACRO DEFINES 617 * MACRO DEFINES
611 ***************************************************************************** 618 *****************************************************************************
612 */ 619 */
620
621// speed hack, copy some member variable into a local variable of the same name
613#define dLocal(type,name) type const name = this->name 622#define dLocal(type,name) type const name = this->name
614 623
615// for speed reasons, we assume that all codepoints 32 to 126 are 624// for speed reasons, we assume that all codepoints 32 to 126 are
616// single-width. 625// single-width.
617#define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) 626#define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c))
957 scrollBar_t scrollBar; 966 scrollBar_t scrollBar;
958 uint8_t options[(Opt_count + 7) >> 3]; 967 uint8_t options[(Opt_count + 7) >> 3];
959 XSizeHints szHint; 968 XSizeHints szHint;
960 rxvt_color *pix_colors; 969 rxvt_color *pix_colors;
961 Cursor TermWin_cursor; /* cursor for vt window */ 970 Cursor TermWin_cursor; /* cursor for vt window */
962 int numlock_state;
963 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf 971 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf
964 line_t *drawn_buf; // text on screen 972 line_t *drawn_buf; // text on screen
965 line_t *swap_buf; // lines for swap buffer 973 line_t *swap_buf; // lines for swap buffer
966 char *tabs; /* per location: 1 == tab-stop */ 974 char *tabs; /* per location: 1 == tab-stop */
967 screen_t screen; 975 screen_t screen;
1300 void recolour_cursor (); 1308 void recolour_cursor ();
1301 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); 1309 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent);
1302 void window_calc (unsigned int newwidth, unsigned int newheight); 1310 void window_calc (unsigned int newwidth, unsigned int newheight);
1303 bool set_fonts (); 1311 bool set_fonts ();
1304 void set_string_property (Atom prop, const char *str, int len = -1); 1312 void set_string_property (Atom prop, const char *str, int len = -1);
1313 void set_mbstring_property (Atom prop, const char *str, int len = -1);
1305 void set_utf8_property (Atom prop, const char *str, int len = -1); 1314 void set_utf8_property (Atom prop, const char *str, int len = -1);
1306 void set_title (const char *str); 1315 void set_title (const char *str);
1307 void set_icon_name (const char *str); 1316 void set_icon_name (const char *str);
1308 void set_window_color (int idx, const char *color); 1317 void set_window_color (int idx, const char *color);
1309 void set_colorfgbg (); 1318 void set_colorfgbg ();
1399 else 1408 else
1400 priv_modes &= ~bit; 1409 priv_modes &= ~bit;
1401 } 1410 }
1402 1411
1403 // modifies first argument(!) 1412 // modifies first argument(!)
1413 void tt_paste (char *data, unsigned int len) NOTHROW;
1404 void paste (char *data, unsigned int len) NOTHROW; 1414 void paste (char *data, unsigned int len) NOTHROW;
1405 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1415 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1406 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1416 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1407 void scr_kill_char (line_t &l, int col) const NOTHROW; 1417 void scr_kill_char (line_t &l, int col) const NOTHROW;
1408 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1418 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1467 void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW; 1477 void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW;
1468 void selection_property (Window win, Atom prop) NOTHROW; 1478 void selection_property (Window win, Atom prop) NOTHROW;
1469 void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; 1479 void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW;
1470 int selection_request_other (Atom target, int selnum) NOTHROW; 1480 int selection_request_other (Atom target, int selnum) NOTHROW;
1471 void selection_clear (bool clipboard = false) NOTHROW; 1481 void selection_clear (bool clipboard = false) NOTHROW;
1472 void clipboard_copy (Time tm);
1473 void selection_make (Time tm); 1482 void selection_make (Time tm);
1474 bool selection_grab (Time tm, bool clipboard = false) NOTHROW; 1483 bool selection_grab (Time tm, bool clipboard = false) NOTHROW;
1475 void selection_start_colrow (int col, int row) NOTHROW; 1484 void selection_start_colrow (int col, int row) NOTHROW;
1476 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW; 1485 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW;
1477 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW; 1486 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines