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

Comparing cvsroot/rxvt-unicode/src/background.h (file contents):
Revision 1.2 by sasha, Wed Sep 12 21:06:08 2007 UTC vs.
Revision 1.6 by root, Sun Nov 11 04:08:00 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(BG_IMAGE_FROM_FILE) || 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 {
28 blurNeeded = (1UL<<12), 30 blurNeeded = (1UL<<12),
29 blurServerSide = (1UL<<13), /* this don't work yet */ 31 blurServerSide = (1UL<<13), /* this don't work yet */
30 32
31 isTransparent = (1UL<<16), 33 isTransparent = (1UL<<16),
32 isInvalid = (1UL<<17), 34 isInvalid = (1UL<<17),
33 isVtOrigin = (1UL<<18) /* if set pixmap has origin at corner of 35 isVtOrigin = (1UL<<18), /* if set pixmap has origin at corner of
34 vt window instead of parent[0]! */ 36 vt window instead of parent[0]! */
37 hasChanged = (1UL<<19)
35 }; 38 };
36 39
37 unsigned long flags; 40 unsigned long flags;
38 41
39 enum { 42 enum {
40 transpPmapTiled = (1UL<<0), 43 transpPmapTiled = (1UL<<0),
41 transpPmapTinted = tintNeeded, 44 transpPmapTinted = tintNeeded,
42 transpPmapBlured = blurNeeded, 45 transpPmapBlured = blurNeeded,
43 transpTransformations = (tintNeeded|blurNeeded) 46 transpTransformations = (tintNeeded|blurNeeded)
44 }; /* this flags are returned by make_transparency_pixmap if called */ 47 }; /* this flags are returned by make_transparency_pixmap if called */
48
49 bool check_clearChanged () { bool r = flags & hasChanged; flags &= ~hasChanged; return r; };
45 50
46# ifdef BG_IMAGE_FROM_FILE 51# ifdef BG_IMAGE_FROM_FILE
47# ifdef HAVE_AFTERIMAGE 52# ifdef HAVE_AFTERIMAGE
48 ASImage *original_asim; 53 ASImage *original_asim;
49 bool render_asim (ASImage *background, ARGB32 background_tint); 54 bool render_asim (ASImage *background, ARGB32 background_tint);
103 bool need_client_side_rendering (); 108 bool need_client_side_rendering ();
104 void apply (); 109 void apply ();
105 bool render (); 110 bool render ();
106 void invalidate () { 111 void invalidate () {
107 if (!(flags & isInvalid)) 112 if (!(flags & isInvalid))
108 { 113 {
109 flags |= isInvalid; 114 flags |= isInvalid;
110 invalid_since = NOW; 115 invalid_since = ev::now ();
111 } 116 }
112 }; 117 };
113}; 118};
114#else 119#else
115# undef HAVE_BG_PIXMAP 120# undef HAVE_BG_PIXMAP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines