--- rxvt-unicode/src/background.h 2007/09/12 21:06:08 1.2 +++ rxvt-unicode/src/background.h 2007/11/19 15:33:34 1.10 @@ -6,14 +6,17 @@ #define BACKGROUND_H_ #ifdef HAVE_AFTERIMAGE -# include +# include +# undef min +# undef max #endif #if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) # define HAVE_BG_PIXMAP 1/* to simplify further usage */ -struct bgPixmap_t { - - bgPixmap_t(); +struct bgPixmap_t +{ + bgPixmap_t (); + void destroy (); enum { geometrySet = (1UL<<0), @@ -30,8 +33,9 @@ isTransparent = (1UL<<16), isInvalid = (1UL<<17), - isVtOrigin = (1UL<<18) /* if set pixmap has origin at corner of + isVtOrigin = (1UL<<18), /* if set pixmap has origin at corner of vt window instead of parent[0]! */ + hasChanged = (1UL<<19) }; unsigned long flags; @@ -43,13 +47,18 @@ transpTransformations = (tintNeeded|blurNeeded) }; /* this flags are returned by make_transparency_pixmap if called */ + bool check_clearChanged () { bool r = flags & hasChanged; flags &= ~hasChanged; return r; }; + # ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE ASImage *original_asim; bool render_asim (ASImage *background, ARGB32 background_tint); # endif - enum { defaultScale = 100, defaultAlign = 50 }; + enum { + noScale = 0, windowScale = 100, defaultScale = windowScale, + centerAlign = 50, defaultAlign = centerAlign, + rootAlign = -10000 }; unsigned int h_scale, v_scale;/* percents of the window size */ int h_align, v_align; /* percents of the window size: @@ -92,9 +101,7 @@ unsigned int pmap_depth; bool window_size_sensitive (); - bool window_position_sensitive () { - return (flags & isTransparent); - }; + bool window_position_sensitive (); bool is_parentOrigin () { return !(flags & isVtOrigin); @@ -105,9 +112,9 @@ bool render (); void invalidate () { if (!(flags & isInvalid)) - { - flags |= isInvalid; - invalid_since = NOW; + { + flags |= isInvalid; + invalid_since = ev::now (); } }; }; @@ -117,4 +124,4 @@ -#endif /* _BACKGROUND_H_ */ +#endif /* _BACKGROUND_H_ */