--- rxvt-unicode/src/rxvt.h 2007/01/20 00:45:30 1.266 +++ rxvt-unicode/src/rxvt.h 2007/06/10 15:16:15 1.272 @@ -75,7 +75,11 @@ #include typedef struct termios ttymode_t; -#ifdef XPM_BACKGROUND +#ifdef HAVE_AFTERIMAGE +# include +#undef min +#undef max +#elif defined(XPM_BACKGROUND) # ifdef XPM_INC_X11 # include # else @@ -179,6 +183,7 @@ #ifdef XPM_BACKGROUND typedef struct { short w, h, x, y; + bool auto_resize ; Pixmap pixmap; } bgPixmap_t; #endif @@ -689,15 +694,6 @@ #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) -#define OPTION(opt) (options & (opt)) -#define DEFAULT_OPTIONS (Opt_scrollBar \ - | Opt_scrollTtyOutput \ - | Opt_jumpScroll \ - | Opt_secondaryScreen \ - | Opt_secondaryScroll \ - | Opt_pastableTabs \ - | Opt_intensityStyles) - // for m >= -n, ensure remainder lies between 0..n-1 #define MOD(m,n) (((m) + (n)) % (n)) @@ -907,8 +903,6 @@ unsigned char want_refresh:1, #ifdef TRANSPARENT want_full_refresh:1, /* awaiting full screen refresh */ -#endif -#if defined(XPM_BACKGROUND) || defined(TRANSPARENT) am_transparent:1, /* is a transparent term */ am_pixmap_trans:1, /* transparency w/known root pixmap */ #endif @@ -1029,7 +1023,13 @@ row_col_t oldcursor; #ifdef XPM_BACKGROUND bgPixmap_t bgPixmap; +#ifdef HAVE_AFTERIMAGE + ASImageManager *asimman; + ASImage *original_asim; + struct { unsigned int width, height; } xpmAttr; /* all we need is width/height */ +#else XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ +#endif #endif #if ENABLE_OVERLAY @@ -1101,6 +1101,10 @@ void rootwin_cb (XEvent &xev); xevent_watcher rootwin_ev; #endif +#if TRANSPARENT + void check_our_parents_cb (time_watcher &w); + time_watcher check_our_parents_ev; +#endif void x_cb (XEvent &xev); void flush (); @@ -1298,7 +1302,7 @@ #ifndef NO_BRIGHTCOLOR if (r & RS_Bold # if ENABLE_STYLES - && OPTION (Opt_intensityStyles) + && option (Opt_intensityStyles) # endif && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) base += minBrightCOLOR - minCOLOR; @@ -1312,7 +1316,7 @@ #ifndef NO_BRIGHTCOLOR if (r & RS_Blink # if ENABLE_STYLES - && OPTION (Opt_intensityStyles) + && option (Opt_intensityStyles) # endif && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) base += minBrightCOLOR - minCOLOR; @@ -1320,17 +1324,17 @@ return base; } - bool option (uint32_t opt) const NOTHROW + bool option (uint8_t opt) const NOTHROW { - return OPTION (opt); + return options[opt >> 3] & (1 << (opt & 7)); } - void set_option (uint32_t opt, bool set) NOTHROW + void set_option (uint8_t opt, bool set = true) NOTHROW { if (set) - options |= opt; + options[opt >> 3] |= (1 << (opt & 7)); else - options &= ~opt; + options[opt >> 3] &= ~(1 << (opt & 7)); } void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;