--- rxvt-unicode/src/rxvt.h 2010/04/02 15:02:11 1.401 +++ rxvt-unicode/src/rxvt.h 2010/07/26 09:57:53 1.413 @@ -249,7 +249,7 @@ # define COLORTERMENVFULL COLORTERMENV #endif #ifndef TERMENV -# ifdef USE_256_COLORS +# if USE_256_COLORS # define TERMENV "rxvt-unicode-256color" # else # define TERMENV "rxvt-unicode" @@ -325,12 +325,15 @@ // must have space for rxvt_fontset::fontCount * 2 + 2 values #define RS_fontShift (RS_fgShift + Color_Bits) #define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */ -#define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful +#define RS_fontCount rxvt_fontset::fontCount +#define RS_fontMask ((RS_fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful // toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral" #define RS_redraw (2UL << RS_fontShift) -// 5 custom bits for extensions +#define RS_Sel (1UL << 22) + +// 4 custom bits for extensions #define RS_customCount 16UL #define RS_customShift 23 #define RS_customMask ((RS_customCount - 1UL) << RS_customShift) @@ -391,7 +394,8 @@ XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color XTerm_Color05 = 15, // not implemented (tektronix fg) XTerm_Color06 = 16, // not implemented (tektronix bg) - XTerm_Color_RV = 17, // change actual 'Highlight' color + XTerm_Color_HC = 17, // change actual 'Highlight' bg color + XTerm_Color_HTC = 19, // change actual 'Highlight' fg color XTerm_logfile = 46, // not implemented XTerm_font = 50, @@ -403,8 +407,6 @@ */ // deprecated - Rxvt_Color_BD = 18, - Rxvt_Color_UL = 19, Rxvt_restoreFG = 39, Rxvt_restoreBG = 49, @@ -468,10 +470,10 @@ Color_White = maxCOLOR, #endif minTermCOLOR = Color_White + 1, -#ifndef USE_256_COLORS - maxTermCOLOR = Color_White + 72, -#else +#if USE_256_COLORS maxTermCOLOR = Color_White + 240, +#else + maxTermCOLOR = Color_White + 72, #endif #ifndef NO_CURSORCOLOR Color_cursor, @@ -491,6 +493,7 @@ #endif #ifdef OPTION_HC Color_HC, + Color_HTC, #endif Color_scroll, #ifdef RXVT_SCROLLBAR @@ -512,10 +515,10 @@ #endif }; -#ifndef USE_256_COLORS -#define Color_Bits 7 // 0 .. maxTermCOLOR +#if USE_256_COLORS +# define Color_Bits 9 // 0 .. maxTermCOLOR #else -#define Color_Bits 9 // 0 .. maxTermCOLOR +# define Color_Bits 7 // 0 .. maxTermCOLOR #endif /* @@ -614,6 +617,8 @@ * MACRO DEFINES ***************************************************************************** */ + +// speed hack, copy some member variable into a local variable of the same name #define dLocal(type,name) type const name = this->name // for speed reasons, we assume that all codepoints 32 to 126 are @@ -804,7 +809,7 @@ text_t **text; rend_t **rend; - // while tempting to add swap() etc. here, it effetcively only increases code size + // while tempting to add swap() etc. here, it effectively only increases code size }; /* ------------------------------------------------------------------------- */ @@ -1305,6 +1310,7 @@ void window_calc (unsigned int newwidth, unsigned int newheight); bool set_fonts (); void set_string_property (Atom prop, const char *str, int len = -1); + void set_mbstring_property (Atom prop, const char *str, int len = -1); void set_utf8_property (Atom prop, const char *str, int len = -1); void set_title (const char *str); void set_icon_name (const char *str); @@ -1404,6 +1410,7 @@ } // modifies first argument(!) + void tt_paste (char *data, unsigned int len) NOTHROW; void paste (char *data, unsigned int len) NOTHROW; void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; @@ -1472,7 +1479,6 @@ void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; int selection_request_other (Atom target, int selnum) NOTHROW; void selection_clear (bool clipboard = false) NOTHROW; - void clipboard_copy (Time tm); void selection_make (Time tm); bool selection_grab (Time tm, bool clipboard = false) NOTHROW; void selection_start_colrow (int col, int row) NOTHROW;