texture passed as const referens to BImageControl's renderImage
This commit is contained in:
parent
c9e62e7aee
commit
f604debc9f
5 changed files with 33 additions and 33 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: IconBar.cc,v 1.18 2002/10/29 15:53:45 fluxgen Exp $
|
||||
// $Id: IconBar.cc,v 1.19 2002/11/27 21:46:14 fluxgen Exp $
|
||||
|
||||
#include "IconBar.hh"
|
||||
#include "i18n.hh"
|
||||
|
@ -118,7 +118,7 @@ Window IconBar::delIcon(FluxboxWindow *fluxboxwin) {
|
|||
void IconBar::loadTheme(unsigned int width, unsigned int height) {
|
||||
BImageControl *image_ctrl = m_screen->getImageControl();
|
||||
Pixmap tmp = m_focus_pm;
|
||||
FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus);
|
||||
const FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus);
|
||||
|
||||
//If we are working on a PARENTRELATIVE, change to right focus value
|
||||
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
||||
|
@ -130,7 +130,7 @@ void IconBar::loadTheme(unsigned int width, unsigned int height) {
|
|||
m_focus_pixel = texture->color().pixel();
|
||||
} else {
|
||||
m_focus_pm =
|
||||
image_ctrl->renderImage(width, height, texture);
|
||||
image_ctrl->renderImage(width, height, *texture);
|
||||
}
|
||||
|
||||
if (tmp)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Slit.cc,v 1.27 2002/11/27 12:30:38 fluxgen Exp $
|
||||
// $Id: Slit.cc,v 1.28 2002/11/27 21:50:09 fluxgen Exp $
|
||||
|
||||
//use GNU extensions
|
||||
#ifndef _GNU_SOURCE
|
||||
|
@ -414,11 +414,10 @@ void Slit::reconfigure() {
|
|||
|
||||
Pixmap tmp = frame.pixmap;
|
||||
BImageControl *image_ctrl = screen()->getImageControl();
|
||||
const FbTk::Texture *texture = &(screen()->getTheme()->getSlitTexture());
|
||||
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
const FbTk::Texture &texture = screen()->getTheme()->getSlitTexture();
|
||||
if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
frame.pixmap = None;
|
||||
XSetWindowBackground(disp, frame.window,
|
||||
texture->color().pixel());
|
||||
XSetWindowBackground(disp, frame.window, texture.color().pixel());
|
||||
} else {
|
||||
frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
|
||||
texture);
|
||||
|
|
20
src/Tab.cc
20
src/Tab.cc
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Tab.cc,v 1.44 2002/11/27 13:03:04 fluxgen Exp $
|
||||
// $Id: Tab.cc,v 1.45 2002/11/27 21:51:33 fluxgen Exp $
|
||||
|
||||
#include "Tab.hh"
|
||||
|
||||
|
@ -191,13 +191,13 @@ void Tab::lower() {
|
|||
void Tab::loadTheme() {
|
||||
BImageControl *image_ctrl = m_win->getScreen()->getImageControl();
|
||||
Pixmap tmp = m_focus_pm;
|
||||
FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus);
|
||||
const FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus);
|
||||
|
||||
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
||||
FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_focus);
|
||||
if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_focus;
|
||||
if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
m_focus_pm = None;
|
||||
m_focus_pixel = pt->color().pixel();
|
||||
m_focus_pixel = pt.color().pixel();
|
||||
} else
|
||||
m_focus_pm =
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
||||
|
@ -210,7 +210,7 @@ void Tab::loadTheme() {
|
|||
m_focus_pixel = texture->color().pixel();
|
||||
} else
|
||||
m_focus_pm =
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, texture);
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, *texture);
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
}
|
||||
|
||||
|
@ -218,10 +218,10 @@ void Tab::loadTheme() {
|
|||
texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus);
|
||||
|
||||
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
||||
FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_unfocus);
|
||||
if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_unfocus;
|
||||
if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
m_unfocus_pm = None;
|
||||
m_unfocus_pixel = pt->color().pixel();
|
||||
m_unfocus_pixel = pt.color().pixel();
|
||||
} else
|
||||
m_unfocus_pm =
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
||||
|
@ -231,7 +231,7 @@ void Tab::loadTheme() {
|
|||
m_unfocus_pixel = texture->color().pixel();
|
||||
} else
|
||||
m_unfocus_pm =
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, texture);
|
||||
image_ctrl->renderImage(m_size_w, m_size_h, *texture);
|
||||
}
|
||||
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Toolbar.cc,v 1.42 2002/11/27 12:20:23 fluxgen Exp $
|
||||
// $Id: Toolbar.cc,v 1.43 2002/11/27 21:48:41 fluxgen Exp $
|
||||
|
||||
#include "Toolbar.hh"
|
||||
|
||||
|
@ -384,14 +384,14 @@ void Toolbar::reconfigure() {
|
|||
frame.label_h);
|
||||
|
||||
Pixmap tmp = frame.base;
|
||||
FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar);
|
||||
const FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar);
|
||||
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
frame.base = None;
|
||||
XSetWindowBackground(display, frame.window,
|
||||
texture->color().pixel());
|
||||
} else {
|
||||
frame.base =
|
||||
image_ctrl->renderImage(frame.width, frame.height, texture);
|
||||
image_ctrl->renderImage(frame.width, frame.height, *texture);
|
||||
XSetWindowBackgroundPixmap(display, frame.window, frame.base);
|
||||
}
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
|
@ -404,7 +404,7 @@ void Toolbar::reconfigure() {
|
|||
texture->color().pixel());
|
||||
} else {
|
||||
frame.label =
|
||||
image_ctrl->renderImage(frame.window_label_w, frame.label_h, texture);
|
||||
image_ctrl->renderImage(frame.window_label_w, frame.label_h, *texture);
|
||||
XSetWindowBackgroundPixmap(display, frame.window_label, frame.label);
|
||||
}
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
|
@ -417,7 +417,7 @@ void Toolbar::reconfigure() {
|
|||
texture->color().pixel());
|
||||
} else {
|
||||
frame.wlabel =
|
||||
image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture);
|
||||
image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, *texture);
|
||||
XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
|
||||
}
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
|
@ -426,11 +426,10 @@ void Toolbar::reconfigure() {
|
|||
texture = &(screen()->getToolbarStyle()->clock);
|
||||
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
frame.clk = None;
|
||||
XSetWindowBackground(display, frame.clock,
|
||||
texture->color().pixel());
|
||||
XSetWindowBackground(display, frame.clock, texture->color().pixel());
|
||||
} else {
|
||||
frame.clk =
|
||||
image_ctrl->renderImage(frame.clock_w, frame.label_h, texture);
|
||||
image_ctrl->renderImage(frame.clock_w, frame.label_h, *texture);
|
||||
XSetWindowBackgroundPixmap(display, frame.clock, frame.clk);
|
||||
}
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
|
@ -447,14 +446,15 @@ void Toolbar::reconfigure() {
|
|||
XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
|
||||
} else {
|
||||
frame.button =
|
||||
image_ctrl->renderImage(frame.button_w, frame.button_w, texture);
|
||||
image_ctrl->renderImage(frame.button_w, frame.button_w, *texture);
|
||||
|
||||
XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button);
|
||||
XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
|
||||
XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
|
||||
XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
|
||||
}
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
if (tmp)
|
||||
image_ctrl->removeImage(tmp);
|
||||
|
||||
tmp = frame.pbutton;
|
||||
texture = &(screen()->getToolbarStyle()->pressed);
|
||||
|
@ -463,8 +463,9 @@ void Toolbar::reconfigure() {
|
|||
frame.pbutton_pixel = texture->color().pixel();
|
||||
} else
|
||||
frame.pbutton =
|
||||
image_ctrl->renderImage(frame.button_w, frame.button_w, texture);
|
||||
if (tmp) image_ctrl->removeImage(tmp);
|
||||
image_ctrl->renderImage(frame.button_w, frame.button_w, *texture);
|
||||
if (tmp)
|
||||
image_ctrl->removeImage(tmp);
|
||||
|
||||
XSetWindowBorder(display, frame.window,
|
||||
screen()->getBorderColor()->pixel());
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
|
||||
// $Id: bsetroot.cc,v 1.11 2002/11/26 17:48:58 fluxgen Exp $
|
||||
// $Id: bsetroot.cc,v 1.12 2002/11/27 21:52:34 fluxgen Exp $
|
||||
|
||||
#include "bsetroot.hh"
|
||||
|
||||
|
@ -349,7 +349,7 @@ void bsetroot::gradient(void) {
|
|||
texture.colorTo().setPixel(BlackPixel(getXDisplay(), screen));
|
||||
|
||||
tmp = img_ctrl[screen]->renderImage(getScreenInfo(screen)->getWidth(),
|
||||
getScreenInfo(screen)->getHeight(), &texture);
|
||||
getScreenInfo(screen)->getHeight(), texture);
|
||||
|
||||
pixmaps[screen] = XCreatePixmap(getXDisplay(),
|
||||
getScreenInfo(screen)->getRootWindow(),
|
||||
|
@ -365,7 +365,7 @@ void bsetroot::gradient(void) {
|
|||
|
||||
setRootAtoms(pixmaps[screen], screen);
|
||||
|
||||
XSetWindowBackgroundPixmap(getXDisplay(),
|
||||
XSetWindowBackgroundPixmap(getXDisplay(),
|
||||
getScreenInfo(screen)->getRootWindow(), pixmaps[screen]);
|
||||
|
||||
XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
|
||||
|
|
Loading…
Reference in a new issue