aboutsummaryrefslogtreecommitdiff
path: root/src/Image.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Image.hh')
-rw-r--r--src/Image.hh75
1 files changed, 34 insertions, 41 deletions
diff --git a/src/Image.hh b/src/Image.hh
index 3811e69..94953f9 100644
--- a/src/Image.hh
+++ b/src/Image.hh
@@ -1,3 +1,6 @@
1// Image.hh for Fluxbox Window Manager
2// Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxbox@linuxmail.org)
3//
1// Image.hh for Blackbox - an X11 Window manager 4// Image.hh for Blackbox - an X11 Window manager
2// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
3// 6//
@@ -19,13 +22,18 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
21 24
22#ifndef _IMAGE_HH_ 25// $Id: Image.hh,v 1.5 2002/02/17 18:57:47 fluxgen Exp $
23#define _IMAGE_HH_ 26
27#ifndef IMAGE_HH
28#define IMAGE_HH
24 29
25#include <X11/Xlib.h> 30#include <X11/Xlib.h>
26#include <X11/Xutil.h> 31#include <X11/Xutil.h>
27 32
28#include "Timer.hh" 33#include "Timer.hh"
34#include "BaseDisplay.hh"
35
36#include <list>
29 37
30class BImage; 38class BImage;
31class BImageControl; 39class BImageControl;
@@ -75,43 +83,6 @@ public:
75}; 83};
76 84
77 85
78// bevel options
79#define BImage_Flat (1l<<1)
80#define BImage_Sunken (1l<<2)
81#define BImage_Raised (1l<<3)
82
83// textures
84#define BImage_Solid (1l<<4)
85#define BImage_Gradient (1l<<5)
86
87// gradients
88#define BImage_Horizontal (1l<<6)
89#define BImage_Vertical (1l<<7)
90#define BImage_Diagonal (1l<<8)
91#define BImage_CrossDiagonal (1l<<9)
92#define BImage_Rectangle (1l<<10)
93#define BImage_Pyramid (1l<<11)
94#define BImage_PipeCross (1l<<12)
95#define BImage_Elliptic (1l<<13)
96
97// bevel types
98#define BImage_Bevel1 (1l<<14)
99#define BImage_Bevel2 (1l<<15)
100
101// inverted image
102#define BImage_Invert (1l<<16)
103
104// parent relative image
105#define BImage_ParentRelative (1l<<17)
106
107#ifdef INTERLACE
108// fake interlaced image
109# define BImage_Interlaced (1l<<18)
110#endif // INTERLACE
111
112#include "BaseDisplay.hh"
113#include "LinkedList.hh"
114
115 86
116class BImage { 87class BImage {
117private: 88private:
@@ -149,7 +120,27 @@ protected:
149 120
150 121
151public: 122public:
152 BImage(BImageControl *, unsigned int, unsigned int); 123 enum Bevel{FLAT=0x00002, SUNKEN=0x00004, RAISED=0x00008};
124 enum Textures{SOLID=0x00010, GRADIENT=0x00020};
125 enum Gradients{
126 HORIZONTAL=0x00040,
127 VERTICAL=0x00080,
128 DIAGONAL=0x00100,
129 CROSSDIAGONAL=0x00200,
130 RECTANGLE=0x00400,
131 PYRAMID=0x00800,
132 PIPECROSS=0x01000,
133 ELLIPTIC=0x02000
134 };
135
136 enum {
137 BEVEL1=0x04000, BEVEL2=0x08000, // bevel types
138 INVERT=0x010000, //inverted image
139 PARENTRELATIVE=0x20000,
140 INTERLACED=0x40000
141 };
142
143 BImage(BImageControl *, unsigned int, unsigned int);
153 ~BImage(void); 144 ~BImage(void);
154 145
155 Pixmap render(BTexture *); 146 Pixmap render(BTexture *);
@@ -187,7 +178,9 @@ private:
187 unsigned long pixel1, pixel2, texture; 178 unsigned long pixel1, pixel2, texture;
188 } Cache; 179 } Cache;
189 180
190 LinkedList<Cache> *cache; 181 typedef std::list<Cache *> CacheList;
182
183 CacheList cache;
191 184
192 185
193protected: 186protected: