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.1 by sasha, Wed Sep 12 20:29:24 2007 UTC vs.
Revision 1.8 by ayin, Thu Nov 15 11:36:15 2007 UTC

4 4
5#ifndef BACKGROUND_H_ 5#ifndef BACKGROUND_H_
6#define BACKGROUND_H_ 6#define BACKGROUND_H_
7 7
8#ifdef HAVE_AFTERIMAGE 8#ifdef HAVE_AFTERIMAGE
9# include <afterimage.h> 9# include <afterimage.h>
10# undef min
11# undef max
10#endif 12#endif
11 13
12#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) 14#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY)
13# define HAVE_BG_PIXMAP 1/* to simplify further usage */ 15# define HAVE_BG_PIXMAP 1/* to simplify further usage */
14struct bgPixmap_t { 16struct bgPixmap_t {
17
18 bgPixmap_t();
19 ~bgPixmap_t();
15 20
16 enum { 21 enum {
17 geometrySet = (1UL<<0), 22 geometrySet = (1UL<<0),
18 propScale = (1UL<<1), 23 propScale = (1UL<<1),
19 geometryFlags = (geometrySet|propScale), 24 geometryFlags = (geometrySet|propScale),
26 blurNeeded = (1UL<<12), 31 blurNeeded = (1UL<<12),
27 blurServerSide = (1UL<<13), /* this don't work yet */ 32 blurServerSide = (1UL<<13), /* this don't work yet */
28 33
29 isTransparent = (1UL<<16), 34 isTransparent = (1UL<<16),
30 isInvalid = (1UL<<17), 35 isInvalid = (1UL<<17),
31 isVtOrigin = (1UL<<18) /* if set pixmap has origin at corner of 36 isVtOrigin = (1UL<<18), /* if set pixmap has origin at corner of
32 vt window instead of parent[0]! */ 37 vt window instead of parent[0]! */
38 hasChanged = (1UL<<19)
33 }; 39 };
34 40
35 unsigned long flags; 41 unsigned long flags;
36 42
37 enum { 43 enum {
39 transpPmapTinted = tintNeeded, 45 transpPmapTinted = tintNeeded,
40 transpPmapBlured = blurNeeded, 46 transpPmapBlured = blurNeeded,
41 transpTransformations = (tintNeeded|blurNeeded) 47 transpTransformations = (tintNeeded|blurNeeded)
42 }; /* this flags are returned by make_transparency_pixmap if called */ 48 }; /* this flags are returned by make_transparency_pixmap if called */
43 49
44# ifdef XPM_BACKGROUND 50 bool check_clearChanged () { bool r = flags & hasChanged; flags &= ~hasChanged; return r; };
51
52# ifdef BG_IMAGE_FROM_FILE
45# ifdef HAVE_AFTERIMAGE 53# ifdef HAVE_AFTERIMAGE
46 ASImage *original_asim; 54 ASImage *original_asim;
47 bool render_asim (ASImage *background, ARGB32 background_tint); 55 bool render_asim (ASImage *background, ARGB32 background_tint);
48# endif 56# endif
49 57
60 h_align = v_align = defaultAlign; 68 h_align = v_align = defaultAlign;
61 flags |= geometrySet; 69 flags |= geometrySet;
62 }; 70 };
63 71
64 bool set_file (const char *file); 72 bool set_file (const char *file);
65# endif /* XPM_BACKGROUND */ 73# endif /* BG_IMAGE_FROM_FILE */
66 74
67 rxvt_term *target; 75 rxvt_term *target;
68 bool set_target (rxvt_term *new_target); 76 bool set_target (rxvt_term *new_target);
69 77
70# ifdef ENABLE_TRANSPARENCY 78# ifdef ENABLE_TRANSPARENCY
101 bool need_client_side_rendering (); 109 bool need_client_side_rendering ();
102 void apply (); 110 void apply ();
103 bool render (); 111 bool render ();
104 void invalidate () { 112 void invalidate () {
105 if (!(flags & isInvalid)) 113 if (!(flags & isInvalid))
106 { 114 {
107 flags |= isInvalid; 115 flags |= isInvalid;
108 invalid_since = NOW; 116 invalid_since = ev::now ();
109 } 117 }
110 }; 118 };
111}; 119};
112#else 120#else
113# undef HAVE_BG_PIXMAP 121# undef HAVE_BG_PIXMAP
114#endif 122#endif
115 123
116 124
117 125
118#endif /* _BACKGROUND_H_ */ 126#endif /* _BACKGROUND_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines