diff options
author | fluxgen <fluxgen> | 2001-12-29 10:27:41 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2001-12-29 10:27:41 (GMT) |
commit | e0dce8166ca9406a50e908569bb294ce57a76b7f (patch) | |
tree | 9a589ad1dbe55dd4cd1585eae8ac20293a6058e8 | |
parent | be3bbcdf3a7c89c09934fe26ee1754a033341616 (diff) | |
download | fluxbox-e0dce8166ca9406a50e908569bb294ce57a76b7f.zip fluxbox-e0dce8166ca9406a50e908569bb294ce57a76b7f.tar.bz2 |
Updated texture constants
-rw-r--r-- | src/Image.cc | 96 | ||||
-rw-r--r-- | src/Image.hh | 66 | ||||
-rw-r--r-- | src/Window.cc | 22 |
3 files changed, 87 insertions, 97 deletions
diff --git a/src/Image.cc b/src/Image.cc index feebba8..46ee34f 100644 --- a/src/Image.cc +++ b/src/Image.cc | |||
@@ -109,11 +109,11 @@ BImage::~BImage(void) { | |||
109 | 109 | ||
110 | 110 | ||
111 | Pixmap BImage::render(BTexture *texture) { | 111 | Pixmap BImage::render(BTexture *texture) { |
112 | if (texture->getTexture() & BImage_ParentRelative) | 112 | if (texture->getTexture() & BImage::PARENTRELATIVE) |
113 | return ParentRelative; | 113 | return ParentRelative; |
114 | else if (texture->getTexture() & BImage_Solid) | 114 | else if (texture->getTexture() & BImage::SOLID) |
115 | return render_solid(texture); | 115 | return render_solid(texture); |
116 | else if (texture->getTexture() & BImage_Gradient) | 116 | else if (texture->getTexture() & BImage::GRADIENT) |
117 | return render_gradient(texture); | 117 | return render_gradient(texture); |
118 | 118 | ||
119 | return None; | 119 | return None; |
@@ -156,7 +156,7 @@ Pixmap BImage::render_solid(BTexture *texture) { | |||
156 | width, height); | 156 | width, height); |
157 | 157 | ||
158 | #ifdef INTERLACE | 158 | #ifdef INTERLACE |
159 | if (texture->getTexture() & BImage_Interlaced) { | 159 | if (texture->getTexture() & BImage::INTERLACED) { |
160 | gcv.foreground = texture->getColorTo()->getPixel(); | 160 | gcv.foreground = texture->getColorTo()->getPixel(); |
161 | GC igc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, | 161 | GC igc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap, |
162 | GCForeground, &gcv); | 162 | GCForeground, &gcv); |
@@ -171,8 +171,8 @@ Pixmap BImage::render_solid(BTexture *texture) { | |||
171 | #endif // INTERLACE | 171 | #endif // INTERLACE |
172 | 172 | ||
173 | 173 | ||
174 | if (texture->getTexture() & BImage_Bevel1) { | 174 | if (texture->getTexture() & BImage::BEVEL1) { |
175 | if (texture->getTexture() & BImage_Raised) { | 175 | if (texture->getTexture() & BImage::RAISED) { |
176 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, | 176 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, |
177 | 0, height - 1, width - 1, height - 1); | 177 | 0, height - 1, width - 1, height - 1); |
178 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, | 178 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, |
@@ -182,7 +182,7 @@ Pixmap BImage::render_solid(BTexture *texture) { | |||
182 | 0, 0, width - 1, 0); | 182 | 0, 0, width - 1, 0); |
183 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 183 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
184 | 0, height - 1, 0, 0); | 184 | 0, height - 1, 0, 0); |
185 | } else if (texture->getTexture() & BImage_Sunken) { | 185 | } else if (texture->getTexture() & BImage::SUNKEN) { |
186 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 186 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
187 | 0, height - 1, width - 1, height - 1); | 187 | 0, height - 1, width - 1, height - 1); |
188 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 188 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
@@ -193,8 +193,8 @@ Pixmap BImage::render_solid(BTexture *texture) { | |||
193 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, | 193 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, |
194 | 0, height - 1, 0, 0); | 194 | 0, height - 1, 0, 0); |
195 | } | 195 | } |
196 | } else if (texture->getTexture() & BImage_Bevel2) { | 196 | } else if (texture->getTexture() & BImage::BEVEL2) { |
197 | if (texture->getTexture() & BImage_Raised) { | 197 | if (texture->getTexture() & BImage::RAISED) { |
198 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, | 198 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, |
199 | 1, height - 3, width - 3, height - 3); | 199 | 1, height - 3, width - 3, height - 3); |
200 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, | 200 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc, |
@@ -204,7 +204,7 @@ Pixmap BImage::render_solid(BTexture *texture) { | |||
204 | 1, 1, width - 3, 1); | 204 | 1, 1, width - 3, 1); |
205 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 205 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
206 | 1, height - 3, 1, 1); | 206 | 1, height - 3, 1, 1); |
207 | } else if (texture->getTexture() & BImage_Sunken) { | 207 | } else if (texture->getTexture() & BImage::SUNKEN) { |
208 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 208 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
209 | 1, height - 3, width - 3, height - 3); | 209 | 1, height - 3, width - 3, height - 3); |
210 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, | 210 | XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc, |
@@ -229,34 +229,34 @@ Pixmap BImage::render_gradient(BTexture *texture) { | |||
229 | int inverted = 0; | 229 | int inverted = 0; |
230 | 230 | ||
231 | #ifdef INTERLACE | 231 | #ifdef INTERLACE |
232 | interlaced = texture->getTexture() & BImage_Interlaced; | 232 | interlaced = texture->getTexture() & BImage::INTERLACED; |
233 | #endif // INTERLACE | 233 | #endif // INTERLACE |
234 | 234 | ||
235 | if (texture->getTexture() & BImage_Sunken) { | 235 | if (texture->getTexture() & BImage::SUNKEN) { |
236 | from = texture->getColorTo(); | 236 | from = texture->getColorTo(); |
237 | to = texture->getColor(); | 237 | to = texture->getColor(); |
238 | 238 | ||
239 | if (! (texture->getTexture() & BImage_Invert)) inverted = 1; | 239 | if (! (texture->getTexture() & BImage::INVERT)) inverted = 1; |
240 | } else { | 240 | } else { |
241 | from = texture->getColor(); | 241 | from = texture->getColor(); |
242 | to = texture->getColorTo(); | 242 | to = texture->getColorTo(); |
243 | 243 | ||
244 | if (texture->getTexture() & BImage_Invert) inverted = 1; | 244 | if (texture->getTexture() & BImage::INVERT) inverted = 1; |
245 | } | 245 | } |
246 | 246 | ||
247 | control->getGradientBuffers(width, height, &xtable, &ytable); | 247 | control->getGradientBuffers(width, height, &xtable, &ytable); |
248 | 248 | ||
249 | if (texture->getTexture() & BImage_Diagonal) dgradient(); | 249 | if (texture->getTexture() & BImage::DIAGONAL) dgradient(); |
250 | else if (texture->getTexture() & BImage_Elliptic) egradient(); | 250 | else if (texture->getTexture() & BImage::ELLIPTIC) egradient(); |
251 | else if (texture->getTexture() & BImage_Horizontal) hgradient(); | 251 | else if (texture->getTexture() & BImage::HORIZONTAL) hgradient(); |
252 | else if (texture->getTexture() & BImage_Pyramid) pgradient(); | 252 | else if (texture->getTexture() & BImage::PYRAMID) pgradient(); |
253 | else if (texture->getTexture() & BImage_Rectangle) rgradient(); | 253 | else if (texture->getTexture() & BImage::RECTANGLE) rgradient(); |
254 | else if (texture->getTexture() & BImage_Vertical) vgradient(); | 254 | else if (texture->getTexture() & BImage::VERTICAL) vgradient(); |
255 | else if (texture->getTexture() & BImage_CrossDiagonal) cdgradient(); | 255 | else if (texture->getTexture() & BImage::CROSSDIAGONAL) cdgradient(); |
256 | else if (texture->getTexture() & BImage_PipeCross) pcgradient(); | 256 | else if (texture->getTexture() & BImage::PIPECROSS) pcgradient(); |
257 | 257 | ||
258 | if (texture->getTexture() & BImage_Bevel1) bevel1(); | 258 | if (texture->getTexture() & BImage::BEVEL1) bevel1(); |
259 | else if (texture->getTexture() & BImage_Bevel2) bevel2(); | 259 | else if (texture->getTexture() & BImage::BEVEL2) bevel2(); |
260 | 260 | ||
261 | if (inverted) invert(); | 261 | if (inverted) invert(); |
262 | 262 | ||
@@ -2255,7 +2255,7 @@ Pixmap BImageControl::searchCache(unsigned int width, unsigned int height, | |||
2255 | (it.current()->height == height) && | 2255 | (it.current()->height == height) && |
2256 | (it.current()->texture == texture) && | 2256 | (it.current()->texture == texture) && |
2257 | (it.current()->pixel1 == c1->getPixel())) | 2257 | (it.current()->pixel1 == c1->getPixel())) |
2258 | if (texture & BImage_Gradient) { | 2258 | if (texture & BImage::GRADIENT) { |
2259 | if (it.current()->pixel2 == c2->getPixel()) { | 2259 | if (it.current()->pixel2 == c2->getPixel()) { |
2260 | it.current()->count++; | 2260 | it.current()->count++; |
2261 | return it.current()->pixmap; | 2261 | return it.current()->pixmap; |
@@ -2273,7 +2273,7 @@ Pixmap BImageControl::searchCache(unsigned int width, unsigned int height, | |||
2273 | 2273 | ||
2274 | Pixmap BImageControl::renderImage(unsigned int width, unsigned int height, | 2274 | Pixmap BImageControl::renderImage(unsigned int width, unsigned int height, |
2275 | BTexture *texture) { | 2275 | BTexture *texture) { |
2276 | if (texture->getTexture() & BImage_ParentRelative) return ParentRelative; | 2276 | if (texture->getTexture() & BImage::PARENTRELATIVE) return ParentRelative; |
2277 | 2277 | ||
2278 | Pixmap pixmap = searchCache(width, height, texture->getTexture(), | 2278 | Pixmap pixmap = searchCache(width, height, texture->getTexture(), |
2279 | texture->getColor(), texture->getColorTo()); | 2279 | texture->getColor(), texture->getColorTo()); |
@@ -2292,7 +2292,7 @@ Pixmap BImageControl::renderImage(unsigned int width, unsigned int height, | |||
2292 | tmp->texture = texture->getTexture(); | 2292 | tmp->texture = texture->getTexture(); |
2293 | tmp->pixel1 = texture->getColor()->getPixel(); | 2293 | tmp->pixel1 = texture->getColor()->getPixel(); |
2294 | 2294 | ||
2295 | if (texture->getTexture() & BImage_Gradient) | 2295 | if (texture->getTexture() & BImage::GRADIENT) |
2296 | tmp->pixel2 = texture->getColorTo()->getPixel(); | 2296 | tmp->pixel2 = texture->getColorTo()->getPixel(); |
2297 | else | 2297 | else |
2298 | tmp->pixel2 = 0l; | 2298 | tmp->pixel2 = 0l; |
@@ -2502,53 +2502,53 @@ void BImageControl::parseTexture(BTexture *texture, char *t) { | |||
2502 | *(ts + i) = tolower(*(t + i)); | 2502 | *(ts + i) = tolower(*(t + i)); |
2503 | 2503 | ||
2504 | if (strstr(ts, "parentrelative")) { | 2504 | if (strstr(ts, "parentrelative")) { |
2505 | texture->setTexture(BImage_ParentRelative); | 2505 | texture->setTexture(BImage::PARENTRELATIVE); |
2506 | } else { | 2506 | } else { |
2507 | texture->setTexture(0); | 2507 | texture->setTexture(0); |
2508 | 2508 | ||
2509 | if (strstr(ts, "solid")) | 2509 | if (strstr(ts, "solid")) |
2510 | texture->addTexture(BImage_Solid); | 2510 | texture->addTexture(BImage::SOLID); |
2511 | else if (strstr(ts, "gradient")) { | 2511 | else if (strstr(ts, "gradient")) { |
2512 | texture->addTexture(BImage_Gradient); | 2512 | texture->addTexture(BImage::GRADIENT); |
2513 | if (strstr(ts, "crossdiagonal")) | 2513 | if (strstr(ts, "crossdiagonal")) |
2514 | texture->addTexture(BImage_CrossDiagonal); | 2514 | texture->addTexture(BImage::CROSSDIAGONAL); |
2515 | else if (strstr(ts, "rectangle")) | 2515 | else if (strstr(ts, "rectangle")) |
2516 | texture->addTexture(BImage_Rectangle); | 2516 | texture->addTexture(BImage::RECTANGLE); |
2517 | else if (strstr(ts, "pyramid")) | 2517 | else if (strstr(ts, "pyramid")) |
2518 | texture->addTexture(BImage_Pyramid); | 2518 | texture->addTexture(BImage::PYRAMID); |
2519 | else if (strstr(ts, "pipecross")) | 2519 | else if (strstr(ts, "pipecross")) |
2520 | texture->addTexture(BImage_PipeCross); | 2520 | texture->addTexture(BImage::PIPECROSS); |
2521 | else if (strstr(ts, "elliptic")) | 2521 | else if (strstr(ts, "elliptic")) |
2522 | texture->addTexture(BImage_Elliptic); | 2522 | texture->addTexture(BImage::ELLIPTIC); |
2523 | else if (strstr(ts, "diagonal")) | 2523 | else if (strstr(ts, "diagonal")) |
2524 | texture->addTexture(BImage_Diagonal); | 2524 | texture->addTexture(BImage::DIAGONAL); |
2525 | else if (strstr(ts, "horizontal")) | 2525 | else if (strstr(ts, "horizontal")) |
2526 | texture->addTexture(BImage_Horizontal); | 2526 | texture->addTexture(BImage::HORIZONTAL); |
2527 | else if (strstr(ts, "vertical")) | 2527 | else if (strstr(ts, "vertical")) |
2528 | texture->addTexture(BImage_Vertical); | 2528 | texture->addTexture(BImage::VERTICAL); |
2529 | else | 2529 | else |
2530 | texture->addTexture(BImage_Diagonal); | 2530 | texture->addTexture(BImage::DIAGONAL); |
2531 | } else | 2531 | } else |
2532 | texture->addTexture(BImage_Solid); | 2532 | texture->addTexture(BImage::SOLID); |
2533 | 2533 | ||
2534 | if (strstr(ts, "raised")) | 2534 | if (strstr(ts, "raised")) |
2535 | texture->addTexture(BImage_Raised); | 2535 | texture->addTexture(BImage::RAISED); |
2536 | else if (strstr(ts, "sunken")) | 2536 | else if (strstr(ts, "sunken")) |
2537 | texture->addTexture(BImage_Sunken); | 2537 | texture->addTexture(BImage::SUNKEN); |
2538 | else if (strstr(ts, "flat")) | 2538 | else if (strstr(ts, "flat")) |
2539 | texture->addTexture(BImage_Flat); | 2539 | texture->addTexture(BImage::FLAT); |
2540 | else | 2540 | else |
2541 | texture->addTexture(BImage_Raised); | 2541 | texture->addTexture(BImage::RAISED); |
2542 | 2542 | ||
2543 | if (! (texture->getTexture() & BImage_Flat)) | 2543 | if (! (texture->getTexture() & BImage::FLAT)) |
2544 | if (strstr(ts, "bevel2")) | 2544 | if (strstr(ts, "bevel2")) |
2545 | texture->addTexture(BImage_Bevel2); | 2545 | texture->addTexture(BImage::BEVEL2); |
2546 | else | 2546 | else |
2547 | texture->addTexture(BImage_Bevel1); | 2547 | texture->addTexture(BImage::BEVEL1); |
2548 | 2548 | ||
2549 | #ifdef INTERLACE | 2549 | #ifdef INTERLACE |
2550 | if (strstr(ts, "interlaced")) | 2550 | if (strstr(ts, "interlaced")) |
2551 | texture->addTexture(BImage_Interlaced); | 2551 | texture->addTexture(BImage::INTERLACED); |
2552 | #endif // INTERLACE | 2552 | #endif // INTERLACE |
2553 | } | 2553 | } |
2554 | 2554 | ||
diff --git a/src/Image.hh b/src/Image.hh index 3811e69..a86a60a 100644 --- a/src/Image.hh +++ b/src/Image.hh | |||
@@ -27,6 +27,13 @@ | |||
27 | 27 | ||
28 | #include "Timer.hh" | 28 | #include "Timer.hh" |
29 | 29 | ||
30 | #ifndef _BASEDISPLAY_HH_ | ||
31 | #include "BaseDisplay.hh" | ||
32 | #endif | ||
33 | #ifndef _LINKEDLIST_HH_ | ||
34 | #include "LinkedList.hh" | ||
35 | #endif | ||
36 | |||
30 | class BImage; | 37 | class BImage; |
31 | class BImageControl; | 38 | class BImageControl; |
32 | 39 | ||
@@ -75,43 +82,6 @@ public: | |||
75 | }; | 82 | }; |
76 | 83 | ||
77 | 84 | ||
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 | 85 | ||
116 | class BImage { | 86 | class BImage { |
117 | private: | 87 | private: |
@@ -149,7 +119,27 @@ protected: | |||
149 | 119 | ||
150 | 120 | ||
151 | public: | 121 | public: |
152 | BImage(BImageControl *, unsigned int, unsigned int); | 122 | enum Bevel{FLAT=0x00002, SUNKEN=0x00004, RAISED=0x00008}; |
123 | enum Textures{SOLID=0x00010, GRADIENT=0x00020}; | ||
124 | enum Gradients{ | ||
125 | HORIZONTAL=0x00040, | ||
126 | VERTICAL=0x00080, | ||
127 | DIAGONAL=0x00100, | ||
128 | CROSSDIAGONAL=0x00200, | ||
129 | RECTANGLE=0x00400, | ||
130 | PYRAMID=0x00800, | ||
131 | PIPECROSS=0x01000, | ||
132 | ELLIPTIC=0x02000 | ||
133 | }; | ||
134 | |||
135 | enum { | ||
136 | BEVEL1=0x04000, BEVEL2=0x08000, // bevel types | ||
137 | INVERT=0x010000, //inverted image | ||
138 | PARENTRELATIVE=0x20000, | ||
139 | INTERLACED=0x40000 | ||
140 | }; | ||
141 | |||
142 | BImage(BImageControl *, unsigned int, unsigned int); | ||
153 | ~BImage(void); | 143 | ~BImage(void); |
154 | 144 | ||
155 | Pixmap render(BTexture *); | 145 | Pixmap render(BTexture *); |
diff --git a/src/Window.cc b/src/Window.cc index a99c9a6..6cccec7 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -707,7 +707,7 @@ void FluxboxWindow::decorate(void) { | |||
707 | 707 | ||
708 | Pixmap tmp = frame.fbutton; | 708 | Pixmap tmp = frame.fbutton; |
709 | BTexture *texture = &(screen->getWindowStyle()->b_focus); | 709 | BTexture *texture = &(screen->getWindowStyle()->b_focus); |
710 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 710 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
711 | frame.fbutton = None; | 711 | frame.fbutton = None; |
712 | frame.fbutton_pixel = texture->getColor()->getPixel(); | 712 | frame.fbutton_pixel = texture->getColor()->getPixel(); |
713 | } else | 713 | } else |
@@ -717,7 +717,7 @@ void FluxboxWindow::decorate(void) { | |||
717 | 717 | ||
718 | tmp = frame.ubutton; | 718 | tmp = frame.ubutton; |
719 | texture = &(screen->getWindowStyle()->b_unfocus); | 719 | texture = &(screen->getWindowStyle()->b_unfocus); |
720 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 720 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
721 | frame.ubutton = None; | 721 | frame.ubutton = None; |
722 | frame.ubutton_pixel = texture->getColor()->getPixel(); | 722 | frame.ubutton_pixel = texture->getColor()->getPixel(); |
723 | } else | 723 | } else |
@@ -727,7 +727,7 @@ void FluxboxWindow::decorate(void) { | |||
727 | 727 | ||
728 | tmp = frame.pbutton; | 728 | tmp = frame.pbutton; |
729 | texture = &(screen->getWindowStyle()->b_pressed); | 729 | texture = &(screen->getWindowStyle()->b_pressed); |
730 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 730 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
731 | frame.pbutton = None; | 731 | frame.pbutton = None; |
732 | frame.pbutton_pixel = texture->getColor()->getPixel(); | 732 | frame.pbutton_pixel = texture->getColor()->getPixel(); |
733 | } else | 733 | } else |
@@ -738,7 +738,7 @@ void FluxboxWindow::decorate(void) { | |||
738 | if (decorations.titlebar) { | 738 | if (decorations.titlebar) { |
739 | tmp = frame.ftitle; | 739 | tmp = frame.ftitle; |
740 | texture = &(screen->getWindowStyle()->t_focus); | 740 | texture = &(screen->getWindowStyle()->t_focus); |
741 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 741 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
742 | frame.ftitle = None; | 742 | frame.ftitle = None; |
743 | frame.ftitle_pixel = texture->getColor()->getPixel(); | 743 | frame.ftitle_pixel = texture->getColor()->getPixel(); |
744 | } else | 744 | } else |
@@ -750,7 +750,7 @@ void FluxboxWindow::decorate(void) { | |||
750 | 750 | ||
751 | tmp = frame.utitle; | 751 | tmp = frame.utitle; |
752 | texture = &(screen->getWindowStyle()->t_unfocus); | 752 | texture = &(screen->getWindowStyle()->t_unfocus); |
753 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 753 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
754 | frame.utitle = None; | 754 | frame.utitle = None; |
755 | frame.utitle_pixel = texture->getColor()->getPixel(); | 755 | frame.utitle_pixel = texture->getColor()->getPixel(); |
756 | } else | 756 | } else |
@@ -773,7 +773,7 @@ void FluxboxWindow::decorate(void) { | |||
773 | if (decorations.handle) { | 773 | if (decorations.handle) { |
774 | tmp = frame.fhandle; | 774 | tmp = frame.fhandle; |
775 | texture = &(screen->getWindowStyle()->h_focus); | 775 | texture = &(screen->getWindowStyle()->h_focus); |
776 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 776 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
777 | frame.fhandle = None; | 777 | frame.fhandle = None; |
778 | frame.fhandle_pixel = texture->getColor()->getPixel(); | 778 | frame.fhandle_pixel = texture->getColor()->getPixel(); |
779 | } else | 779 | } else |
@@ -783,7 +783,7 @@ void FluxboxWindow::decorate(void) { | |||
783 | 783 | ||
784 | tmp = frame.uhandle; | 784 | tmp = frame.uhandle; |
785 | texture = &(screen->getWindowStyle()->h_unfocus); | 785 | texture = &(screen->getWindowStyle()->h_unfocus); |
786 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 786 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
787 | frame.uhandle = None; | 787 | frame.uhandle = None; |
788 | frame.uhandle_pixel = texture->getColor()->getPixel(); | 788 | frame.uhandle_pixel = texture->getColor()->getPixel(); |
789 | } else | 789 | } else |
@@ -794,7 +794,7 @@ void FluxboxWindow::decorate(void) { | |||
794 | 794 | ||
795 | tmp = frame.fgrip; | 795 | tmp = frame.fgrip; |
796 | texture = &(screen->getWindowStyle()->g_focus); | 796 | texture = &(screen->getWindowStyle()->g_focus); |
797 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 797 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
798 | frame.fgrip = None; | 798 | frame.fgrip = None; |
799 | frame.fgrip_pixel = texture->getColor()->getPixel(); | 799 | frame.fgrip_pixel = texture->getColor()->getPixel(); |
800 | } else | 800 | } else |
@@ -805,7 +805,7 @@ void FluxboxWindow::decorate(void) { | |||
805 | 805 | ||
806 | tmp = frame.ugrip; | 806 | tmp = frame.ugrip; |
807 | texture = &(screen->getWindowStyle()->g_unfocus); | 807 | texture = &(screen->getWindowStyle()->g_unfocus); |
808 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 808 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
809 | frame.ugrip = None; | 809 | frame.ugrip = None; |
810 | frame.ugrip_pixel = texture->getColor()->getPixel(); | 810 | frame.ugrip_pixel = texture->getColor()->getPixel(); |
811 | } else | 811 | } else |
@@ -829,7 +829,7 @@ void FluxboxWindow::decorate(void) { | |||
829 | void FluxboxWindow::decorateLabel(void) { | 829 | void FluxboxWindow::decorateLabel(void) { |
830 | Pixmap tmp = frame.flabel; | 830 | Pixmap tmp = frame.flabel; |
831 | BTexture *texture = &(screen->getWindowStyle()->l_focus); | 831 | BTexture *texture = &(screen->getWindowStyle()->l_focus); |
832 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 832 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
833 | frame.flabel = None; | 833 | frame.flabel = None; |
834 | frame.flabel_pixel = texture->getColor()->getPixel(); | 834 | frame.flabel_pixel = texture->getColor()->getPixel(); |
835 | } else | 835 | } else |
@@ -839,7 +839,7 @@ void FluxboxWindow::decorateLabel(void) { | |||
839 | 839 | ||
840 | tmp = frame.ulabel; | 840 | tmp = frame.ulabel; |
841 | texture = &(screen->getWindowStyle()->l_unfocus); | 841 | texture = &(screen->getWindowStyle()->l_unfocus); |
842 | if (texture->getTexture() == (BImage_Flat | BImage_Solid)) { | 842 | if (texture->getTexture() == (BImage::FLAT | BImage::SOLID)) { |
843 | frame.ulabel = None; | 843 | frame.ulabel = None; |
844 | frame.ulabel_pixel = texture->getColor()->getPixel(); | 844 | frame.ulabel_pixel = texture->getColor()->getPixel(); |
845 | } else | 845 | } else |