--- rxvt-unicode/src/background.h 2008/11/04 13:20:40 1.16 +++ rxvt-unicode/src/background.h 2010/10/13 23:04:57 1.28 @@ -11,6 +11,10 @@ # undef max #endif +#ifdef HAVE_PIXBUF +#include +#endif + #if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) # define HAVE_BG_PIXMAP 1 /* to simplify further usage */ struct bgPixmap_t @@ -21,7 +25,8 @@ enum { geometrySet = 1 << 0, propScale = 1 << 1, - geometryFlags = geometrySet | propScale, + rootAlign = 1 << 2, + geometryFlags = geometrySet | propScale | rootAlign, tintSet = 1 << 8, tintNeeded = 1 << 9, @@ -30,13 +35,14 @@ tintFlags = tintSet | tintServerSide | tintNeeded | tintWholesome, blurNeeded = 1 << 12, - blurServerSide = 1 << 13, /* this doesn't work yet */ + blurServerSide = 1 << 13, isTransparent = 1 << 16, isInvalid = 1 << 17, isVtOrigin = 1 << 18, /* if set pixmap has origin at corner of vt window instead of parent[0]! */ hasChanged = 1 << 19, + sizeSensitive = 1 << 20, }; unsigned int flags; @@ -44,7 +50,7 @@ enum { transpPmapTiled = 1 << 0, transpPmapTinted = tintNeeded, - transpPmapBlured = blurNeeded, + transpPmapBlurred = blurNeeded, transpTransformations = tintNeeded | blurNeeded, }; /* these flags are returned by make_transparency_pixmap if called */ @@ -58,16 +64,22 @@ # ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE ASImage *original_asim; - bool render_asim (ASImage *background, ARGB32 background_tint); # endif +# ifdef HAVE_PIXBUF + GdkPixbuf *pixbuf; +# endif + + void get_image_geometry (int image_width, int image_height, int &w, int &h, int &x, int &y); + bool render_image (unsigned long background_flags); + bool have_image; + enum { noScale = 0, windowScale = 100, defaultScale = windowScale, centerAlign = 50, defaultAlign = centerAlign, - rootAlign = -10000 }; unsigned int h_scale, v_scale;/* percents of the window size */ @@ -103,6 +115,8 @@ bool set_tint (rxvt_color &new_tint); bool unset_tint (); bool set_shade (const char *shade_str); + bool blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height); + bool tint_pixmap (Pixmap pixmap, Visual *visual, int width, int height); bool set_root_pixmap (); unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */