ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.h
(Generate patch)

Comparing rxvt-unicode/src/background.h (file contents):
Revision 1.19 by sf-exg, Tue Aug 31 15:14:06 2010 UTC vs.
Revision 1.26 by sf-exg, Tue Oct 12 21:26:57 2010 UTC

9# include <afterimage.h> 9# include <afterimage.h>
10# undef min 10# undef min
11# undef max 11# undef max
12#endif 12#endif
13 13
14#ifdef HAVE_PIXBUF
15#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
16#endif
17
14#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) 18#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY)
15# define HAVE_BG_PIXMAP 1 /* to simplify further usage */ 19# define HAVE_BG_PIXMAP 1 /* to simplify further usage */
16struct bgPixmap_t 20struct bgPixmap_t
17{ 21{
18 bgPixmap_t (); 22 bgPixmap_t ();
19 void destroy (); 23 void destroy ();
20 24
21 enum { 25 enum {
22 geometrySet = 1 << 0, 26 geometrySet = 1 << 0,
23 propScale = 1 << 1, 27 propScale = 1 << 1,
28 rootAlign = 1 << 2,
24 geometryFlags = geometrySet | propScale, 29 geometryFlags = geometrySet | propScale | rootAlign,
25 30
26 tintSet = 1 << 8, 31 tintSet = 1 << 8,
27 tintNeeded = 1 << 9, 32 tintNeeded = 1 << 9,
28 tintWholesome = 1 << 10, 33 tintWholesome = 1 << 10,
29 tintServerSide = 1 << 11, 34 tintServerSide = 1 << 11,
35 isTransparent = 1 << 16, 40 isTransparent = 1 << 16,
36 isInvalid = 1 << 17, 41 isInvalid = 1 << 17,
37 isVtOrigin = 1 << 18, /* if set pixmap has origin at corner of 42 isVtOrigin = 1 << 18, /* if set pixmap has origin at corner of
38 vt window instead of parent[0]! */ 43 vt window instead of parent[0]! */
39 hasChanged = 1 << 19, 44 hasChanged = 1 << 19,
45 sizeSensitive = 1 << 20,
40 }; 46 };
41 47
42 unsigned int flags; 48 unsigned int flags;
43 49
44 enum { 50 enum {
45 transpPmapTiled = 1 << 0, 51 transpPmapTiled = 1 << 0,
46 transpPmapTinted = tintNeeded, 52 transpPmapTinted = tintNeeded,
47 transpPmapBlured = blurNeeded, 53 transpPmapBlurred = blurNeeded,
48 transpTransformations = tintNeeded | blurNeeded, 54 transpTransformations = tintNeeded | blurNeeded,
49 }; /* these flags are returned by make_transparency_pixmap if called */ 55 }; /* these flags are returned by make_transparency_pixmap if called */
50 56
51 bool check_clearChanged () 57 bool check_clearChanged ()
52 { 58 {
58# ifdef BG_IMAGE_FROM_FILE 64# ifdef BG_IMAGE_FROM_FILE
59# ifdef HAVE_AFTERIMAGE 65# ifdef HAVE_AFTERIMAGE
60 ASImage *original_asim; 66 ASImage *original_asim;
61# endif 67# endif
62 68
69# ifdef HAVE_PIXBUF
70 GdkPixbuf *pixbuf;
71# endif
72
73 void get_image_geometry (int image_width, int image_height, int &w, int &h, int &x, int &y);
63 bool render_image (unsigned long background_flags); 74 bool render_image (unsigned long background_flags);
64 bool have_image; 75 bool have_image;
65 76
66 enum { 77 enum {
67 noScale = 0, 78 noScale = 0,
68 windowScale = 100, 79 windowScale = 100,
69 defaultScale = windowScale, 80 defaultScale = windowScale,
70 centerAlign = 50, 81 centerAlign = 50,
71 defaultAlign = centerAlign, 82 defaultAlign = centerAlign,
72 rootAlign = -10000
73 }; 83 };
74 84
75 unsigned int h_scale, v_scale;/* percents of the window size */ 85 unsigned int h_scale, v_scale;/* percents of the window size */
76 int h_align, v_align; /* percents of the window size: 86 int h_align, v_align; /* percents of the window size:
77 0 - left align, 50 - center, 100 - right */ 87 0 - left align, 50 - center, 100 - right */
103 bool set_transparent (); 113 bool set_transparent ();
104 bool set_blur_radius (const char *geom); 114 bool set_blur_radius (const char *geom);
105 bool set_tint (rxvt_color &new_tint); 115 bool set_tint (rxvt_color &new_tint);
106 bool unset_tint (); 116 bool unset_tint ();
107 bool set_shade (const char *shade_str); 117 bool set_shade (const char *shade_str);
118 bool tint_pixmap (Pixmap pixmap, Window root, int width, int height);
108 bool set_root_pixmap (); 119 bool set_root_pixmap ();
109 120
110 unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */ 121 unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */
111# endif 122# endif
112 double invalid_since, valid_since; 123 double invalid_since, valid_since;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines