diff options
author | fluxgen <fluxgen> | 2002-11-27 21:52:34 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-11-27 21:52:34 (GMT) |
commit | f604debc9feb28affd8e9108f4fd897017f704bd (patch) | |
tree | 830ab111e13935d1d7a907f43ae33f311490226f /src | |
parent | c9e62e7aee97862ec0e0527b4a963bc9d244e41c (diff) | |
download | fluxbox_lack-f604debc9feb28affd8e9108f4fd897017f704bd.zip fluxbox_lack-f604debc9feb28affd8e9108f4fd897017f704bd.tar.bz2 |
texture passed as const referens to BImageControl's renderImage
Diffstat (limited to 'src')
-rw-r--r-- | src/IconBar.cc | 6 | ||||
-rw-r--r-- | src/Slit.cc | 9 | ||||
-rw-r--r-- | src/Tab.cc | 20 | ||||
-rw-r--r-- | src/Toolbar.cc | 25 |
4 files changed, 30 insertions, 30 deletions
diff --git a/src/IconBar.cc b/src/IconBar.cc index d49b60d..ad18468 100644 --- a/src/IconBar.cc +++ b/src/IconBar.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: IconBar.cc,v 1.18 2002/10/29 15:53:45 fluxgen Exp $ | 22 | // $Id: IconBar.cc,v 1.19 2002/11/27 21:46:14 fluxgen Exp $ |
23 | 23 | ||
24 | #include "IconBar.hh" | 24 | #include "IconBar.hh" |
25 | #include "i18n.hh" | 25 | #include "i18n.hh" |
@@ -118,7 +118,7 @@ Window IconBar::delIcon(FluxboxWindow *fluxboxwin) { | |||
118 | void IconBar::loadTheme(unsigned int width, unsigned int height) { | 118 | void IconBar::loadTheme(unsigned int width, unsigned int height) { |
119 | BImageControl *image_ctrl = m_screen->getImageControl(); | 119 | BImageControl *image_ctrl = m_screen->getImageControl(); |
120 | Pixmap tmp = m_focus_pm; | 120 | Pixmap tmp = m_focus_pm; |
121 | FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus); | 121 | const FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus); |
122 | 122 | ||
123 | //If we are working on a PARENTRELATIVE, change to right focus value | 123 | //If we are working on a PARENTRELATIVE, change to right focus value |
124 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { | 124 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { |
@@ -130,7 +130,7 @@ void IconBar::loadTheme(unsigned int width, unsigned int height) { | |||
130 | m_focus_pixel = texture->color().pixel(); | 130 | m_focus_pixel = texture->color().pixel(); |
131 | } else { | 131 | } else { |
132 | m_focus_pm = | 132 | m_focus_pm = |
133 | image_ctrl->renderImage(width, height, texture); | 133 | image_ctrl->renderImage(width, height, *texture); |
134 | } | 134 | } |
135 | 135 | ||
136 | if (tmp) | 136 | if (tmp) |
diff --git a/src/Slit.cc b/src/Slit.cc index c4e4e7c..138af92 100644 --- a/src/Slit.cc +++ b/src/Slit.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // 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 |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Slit.cc,v 1.27 2002/11/27 12:30:38 fluxgen Exp $ | 25 | // $Id: Slit.cc,v 1.28 2002/11/27 21:50:09 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -414,11 +414,10 @@ void Slit::reconfigure() { | |||
414 | 414 | ||
415 | Pixmap tmp = frame.pixmap; | 415 | Pixmap tmp = frame.pixmap; |
416 | BImageControl *image_ctrl = screen()->getImageControl(); | 416 | BImageControl *image_ctrl = screen()->getImageControl(); |
417 | const FbTk::Texture *texture = &(screen()->getTheme()->getSlitTexture()); | 417 | const FbTk::Texture &texture = screen()->getTheme()->getSlitTexture(); |
418 | if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 418 | if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
419 | frame.pixmap = None; | 419 | frame.pixmap = None; |
420 | XSetWindowBackground(disp, frame.window, | 420 | XSetWindowBackground(disp, frame.window, texture.color().pixel()); |
421 | texture->color().pixel()); | ||
422 | } else { | 421 | } else { |
423 | frame.pixmap = image_ctrl->renderImage(frame.width, frame.height, | 422 | frame.pixmap = image_ctrl->renderImage(frame.width, frame.height, |
424 | texture); | 423 | texture); |
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Tab.cc,v 1.44 2002/11/27 13:03:04 fluxgen Exp $ | 22 | // $Id: Tab.cc,v 1.45 2002/11/27 21:51:33 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Tab.hh" | 24 | #include "Tab.hh" |
25 | 25 | ||
@@ -191,13 +191,13 @@ void Tab::lower() { | |||
191 | void Tab::loadTheme() { | 191 | void Tab::loadTheme() { |
192 | BImageControl *image_ctrl = m_win->getScreen()->getImageControl(); | 192 | BImageControl *image_ctrl = m_win->getScreen()->getImageControl(); |
193 | Pixmap tmp = m_focus_pm; | 193 | Pixmap tmp = m_focus_pm; |
194 | FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus); | 194 | const FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus); |
195 | 195 | ||
196 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { | 196 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { |
197 | FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_focus); | 197 | const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_focus; |
198 | if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 198 | if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
199 | m_focus_pm = None; | 199 | m_focus_pm = None; |
200 | m_focus_pixel = pt->color().pixel(); | 200 | m_focus_pixel = pt.color().pixel(); |
201 | } else | 201 | } else |
202 | m_focus_pm = | 202 | m_focus_pm = |
203 | image_ctrl->renderImage(m_size_w, m_size_h, pt); | 203 | image_ctrl->renderImage(m_size_w, m_size_h, pt); |
@@ -210,7 +210,7 @@ void Tab::loadTheme() { | |||
210 | m_focus_pixel = texture->color().pixel(); | 210 | m_focus_pixel = texture->color().pixel(); |
211 | } else | 211 | } else |
212 | m_focus_pm = | 212 | m_focus_pm = |
213 | image_ctrl->renderImage(m_size_w, m_size_h, texture); | 213 | image_ctrl->renderImage(m_size_w, m_size_h, *texture); |
214 | if (tmp) image_ctrl->removeImage(tmp); | 214 | if (tmp) image_ctrl->removeImage(tmp); |
215 | } | 215 | } |
216 | 216 | ||
@@ -218,10 +218,10 @@ void Tab::loadTheme() { | |||
218 | texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus); | 218 | texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus); |
219 | 219 | ||
220 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { | 220 | if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { |
221 | FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_unfocus); | 221 | const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_unfocus; |
222 | if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 222 | if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
223 | m_unfocus_pm = None; | 223 | m_unfocus_pm = None; |
224 | m_unfocus_pixel = pt->color().pixel(); | 224 | m_unfocus_pixel = pt.color().pixel(); |
225 | } else | 225 | } else |
226 | m_unfocus_pm = | 226 | m_unfocus_pm = |
227 | image_ctrl->renderImage(m_size_w, m_size_h, pt); | 227 | image_ctrl->renderImage(m_size_w, m_size_h, pt); |
@@ -231,7 +231,7 @@ void Tab::loadTheme() { | |||
231 | m_unfocus_pixel = texture->color().pixel(); | 231 | m_unfocus_pixel = texture->color().pixel(); |
232 | } else | 232 | } else |
233 | m_unfocus_pm = | 233 | m_unfocus_pm = |
234 | image_ctrl->renderImage(m_size_w, m_size_h, texture); | 234 | image_ctrl->renderImage(m_size_w, m_size_h, *texture); |
235 | } | 235 | } |
236 | 236 | ||
237 | if (tmp) image_ctrl->removeImage(tmp); | 237 | if (tmp) image_ctrl->removeImage(tmp); |
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index f1358e5..d8501ea 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // 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 |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.42 2002/11/27 12:20:23 fluxgen Exp $ | 25 | // $Id: Toolbar.cc,v 1.43 2002/11/27 21:48:41 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -384,14 +384,14 @@ void Toolbar::reconfigure() { | |||
384 | frame.label_h); | 384 | frame.label_h); |
385 | 385 | ||
386 | Pixmap tmp = frame.base; | 386 | Pixmap tmp = frame.base; |
387 | FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar); | 387 | const FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar); |
388 | if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 388 | if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
389 | frame.base = None; | 389 | frame.base = None; |
390 | XSetWindowBackground(display, frame.window, | 390 | XSetWindowBackground(display, frame.window, |
391 | texture->color().pixel()); | 391 | texture->color().pixel()); |
392 | } else { | 392 | } else { |
393 | frame.base = | 393 | frame.base = |
394 | image_ctrl->renderImage(frame.width, frame.height, texture); | 394 | image_ctrl->renderImage(frame.width, frame.height, *texture); |
395 | XSetWindowBackgroundPixmap(display, frame.window, frame.base); | 395 | XSetWindowBackgroundPixmap(display, frame.window, frame.base); |
396 | } | 396 | } |
397 | if (tmp) image_ctrl->removeImage(tmp); | 397 | if (tmp) image_ctrl->removeImage(tmp); |
@@ -404,7 +404,7 @@ void Toolbar::reconfigure() { | |||
404 | texture->color().pixel()); | 404 | texture->color().pixel()); |
405 | } else { | 405 | } else { |
406 | frame.label = | 406 | frame.label = |
407 | image_ctrl->renderImage(frame.window_label_w, frame.label_h, texture); | 407 | image_ctrl->renderImage(frame.window_label_w, frame.label_h, *texture); |
408 | XSetWindowBackgroundPixmap(display, frame.window_label, frame.label); | 408 | XSetWindowBackgroundPixmap(display, frame.window_label, frame.label); |
409 | } | 409 | } |
410 | if (tmp) image_ctrl->removeImage(tmp); | 410 | if (tmp) image_ctrl->removeImage(tmp); |
@@ -417,7 +417,7 @@ void Toolbar::reconfigure() { | |||
417 | texture->color().pixel()); | 417 | texture->color().pixel()); |
418 | } else { | 418 | } else { |
419 | frame.wlabel = | 419 | frame.wlabel = |
420 | image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture); | 420 | image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, *texture); |
421 | XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel); | 421 | XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel); |
422 | } | 422 | } |
423 | if (tmp) image_ctrl->removeImage(tmp); | 423 | if (tmp) image_ctrl->removeImage(tmp); |
@@ -426,11 +426,10 @@ void Toolbar::reconfigure() { | |||
426 | texture = &(screen()->getToolbarStyle()->clock); | 426 | texture = &(screen()->getToolbarStyle()->clock); |
427 | if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | 427 | if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { |
428 | frame.clk = None; | 428 | frame.clk = None; |
429 | XSetWindowBackground(display, frame.clock, | 429 | XSetWindowBackground(display, frame.clock, texture->color().pixel()); |
430 | texture->color().pixel()); | ||
431 | } else { | 430 | } else { |
432 | frame.clk = | 431 | frame.clk = |
433 | image_ctrl->renderImage(frame.clock_w, frame.label_h, texture); | 432 | image_ctrl->renderImage(frame.clock_w, frame.label_h, *texture); |
434 | XSetWindowBackgroundPixmap(display, frame.clock, frame.clk); | 433 | XSetWindowBackgroundPixmap(display, frame.clock, frame.clk); |
435 | } | 434 | } |
436 | if (tmp) image_ctrl->removeImage(tmp); | 435 | if (tmp) image_ctrl->removeImage(tmp); |
@@ -447,14 +446,15 @@ void Toolbar::reconfigure() { | |||
447 | XSetWindowBackground(display, frame.nwbutton, frame.button_pixel); | 446 | XSetWindowBackground(display, frame.nwbutton, frame.button_pixel); |
448 | } else { | 447 | } else { |
449 | frame.button = | 448 | frame.button = |
450 | image_ctrl->renderImage(frame.button_w, frame.button_w, texture); | 449 | image_ctrl->renderImage(frame.button_w, frame.button_w, *texture); |
451 | 450 | ||
452 | XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button); | 451 | XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button); |
453 | XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button); | 452 | XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button); |
454 | XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button); | 453 | XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button); |
455 | XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button); | 454 | XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button); |
456 | } | 455 | } |
457 | if (tmp) image_ctrl->removeImage(tmp); | 456 | if (tmp) |
457 | image_ctrl->removeImage(tmp); | ||
458 | 458 | ||
459 | tmp = frame.pbutton; | 459 | tmp = frame.pbutton; |
460 | texture = &(screen()->getToolbarStyle()->pressed); | 460 | texture = &(screen()->getToolbarStyle()->pressed); |
@@ -463,8 +463,9 @@ void Toolbar::reconfigure() { | |||
463 | frame.pbutton_pixel = texture->color().pixel(); | 463 | frame.pbutton_pixel = texture->color().pixel(); |
464 | } else | 464 | } else |
465 | frame.pbutton = | 465 | frame.pbutton = |
466 | image_ctrl->renderImage(frame.button_w, frame.button_w, texture); | 466 | image_ctrl->renderImage(frame.button_w, frame.button_w, *texture); |
467 | if (tmp) image_ctrl->removeImage(tmp); | 467 | if (tmp) |
468 | image_ctrl->removeImage(tmp); | ||
468 | 469 | ||
469 | XSetWindowBorder(display, frame.window, | 470 | XSetWindowBorder(display, frame.window, |
470 | screen()->getBorderColor()->pixel()); | 471 | screen()->getBorderColor()->pixel()); |