--- rxvt-unicode/src/background.h 2010/10/22 18:03:10 1.29 +++ rxvt-unicode/src/background.h 2010/12/02 11:02:16 1.38 @@ -12,7 +12,7 @@ #endif #ifdef HAVE_PIXBUF -#include +#include #endif #if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) @@ -23,19 +23,19 @@ void destroy (); enum { - geometrySet = 1 << 0, propScale = 1 << 1, rootAlign = 1 << 2, - geometryFlags = geometrySet | propScale | rootAlign, + geometryFlags = propScale | rootAlign, tintSet = 1 << 8, tintNeeded = 1 << 9, tintWholesome = 1 << 10, - tintServerSide = 1 << 11, - tintFlags = tintSet | tintServerSide | tintNeeded | tintWholesome, + tintFlags = tintSet | tintNeeded | tintWholesome, - blurNeeded = 1 << 12, - blurServerSide = 1 << 13, + blurNeeded = 1 << 11, + + HAS_RENDER = 1 << 12, + HAS_RENDER_CONV = 1 << 13, isTransparent = 1 << 16, isInvalid = 1 << 17, @@ -59,6 +59,9 @@ # ifdef HAVE_PIXBUF GdkPixbuf *pixbuf; + bool pixbuf_to_pixmap (GdkPixbuf *pixbuf, Pixmap pixmap, GC gc, + int src_x, int src_y, int dst_x, int dst_y, + unsigned int width, unsigned int height); # endif void get_image_geometry (int image_width, int image_height, int &w, int &h, int &x, int &y); @@ -76,26 +79,20 @@ unsigned int h_scale, v_scale;/* percents of the window size */ int h_align, v_align; /* percents of the window size: 0 - left align, 50 - center, 100 - right */ - void unset_geometry () - { - flags = flags & ~geometryFlags; - }; - bool set_geometry (const char *geom); + bool set_geometry (const char *geom, bool update = false); void set_defaultGeometry () { h_scale = v_scale = defaultScale; h_align = v_align = defaultAlign; - flags |= geometrySet; - }; + } bool set_file (const char *file); # endif /* BG_IMAGE_FROM_FILE */ rxvt_term *target; - bool set_target (rxvt_term *new_target); + void set_target (rxvt_term *new_target); # ifdef ENABLE_TRANSPARENCY - int root_depth; /* obtained when target is set */ Pixmap root_pixmap; /* current root pixmap set */ rxvt_color tint; int shade; @@ -108,7 +105,7 @@ 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 (); + void set_root_pixmap (); unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */ # endif @@ -118,6 +115,9 @@ unsigned int pmap_width, pmap_height; unsigned int pmap_depth; + int target_x; + int target_y; + bool set_position (int x, int y); bool window_size_sensitive (); bool window_position_sensitive (); @@ -131,7 +131,7 @@ flags |= isInvalid; invalid_since = ev::now (); } - }; + } }; #else # undef HAVE_BG_PIXMAP