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
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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 "IconBar.hh"
|
||||||
#include "i18n.hh"
|
#include "i18n.hh"
|
||||||
|
@ -118,7 +118,7 @@ Window IconBar::delIcon(FluxboxWindow *fluxboxwin) {
|
||||||
void IconBar::loadTheme(unsigned int width, unsigned int height) {
|
void IconBar::loadTheme(unsigned int width, unsigned int height) {
|
||||||
BImageControl *image_ctrl = m_screen->getImageControl();
|
BImageControl *image_ctrl = m_screen->getImageControl();
|
||||||
Pixmap tmp = m_focus_pm;
|
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 we are working on a PARENTRELATIVE, change to right focus value
|
||||||
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
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();
|
m_focus_pixel = texture->color().pixel();
|
||||||
} else {
|
} else {
|
||||||
m_focus_pm =
|
m_focus_pm =
|
||||||
image_ctrl->renderImage(width, height, texture);
|
image_ctrl->renderImage(width, height, *texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp)
|
if (tmp)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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
|
//use GNU extensions
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
|
@ -414,11 +414,10 @@ void Slit::reconfigure() {
|
||||||
|
|
||||||
Pixmap tmp = frame.pixmap;
|
Pixmap tmp = frame.pixmap;
|
||||||
BImageControl *image_ctrl = screen()->getImageControl();
|
BImageControl *image_ctrl = screen()->getImageControl();
|
||||||
const FbTk::Texture *texture = &(screen()->getTheme()->getSlitTexture());
|
const FbTk::Texture &texture = screen()->getTheme()->getSlitTexture();
|
||||||
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||||
frame.pixmap = None;
|
frame.pixmap = None;
|
||||||
XSetWindowBackground(disp, frame.window,
|
XSetWindowBackground(disp, frame.window, texture.color().pixel());
|
||||||
texture->color().pixel());
|
|
||||||
} else {
|
} else {
|
||||||
frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
|
frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
|
||||||
texture);
|
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
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Tab.hh"
|
||||||
|
|
||||||
|
@ -191,13 +191,13 @@ void Tab::lower() {
|
||||||
void Tab::loadTheme() {
|
void Tab::loadTheme() {
|
||||||
BImageControl *image_ctrl = m_win->getScreen()->getImageControl();
|
BImageControl *image_ctrl = m_win->getScreen()->getImageControl();
|
||||||
Pixmap tmp = m_focus_pm;
|
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 ) {
|
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
||||||
FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_focus);
|
const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_focus;
|
||||||
if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||||
m_focus_pm = None;
|
m_focus_pm = None;
|
||||||
m_focus_pixel = pt->color().pixel();
|
m_focus_pixel = pt.color().pixel();
|
||||||
} else
|
} else
|
||||||
m_focus_pm =
|
m_focus_pm =
|
||||||
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
||||||
|
@ -210,7 +210,7 @@ void Tab::loadTheme() {
|
||||||
m_focus_pixel = texture->color().pixel();
|
m_focus_pixel = texture->color().pixel();
|
||||||
} else
|
} else
|
||||||
m_focus_pm =
|
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);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,10 +218,10 @@ void Tab::loadTheme() {
|
||||||
texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus);
|
texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus);
|
||||||
|
|
||||||
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
|
||||||
FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_unfocus);
|
const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_unfocus;
|
||||||
if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||||
m_unfocus_pm = None;
|
m_unfocus_pm = None;
|
||||||
m_unfocus_pixel = pt->color().pixel();
|
m_unfocus_pixel = pt.color().pixel();
|
||||||
} else
|
} else
|
||||||
m_unfocus_pm =
|
m_unfocus_pm =
|
||||||
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
image_ctrl->renderImage(m_size_w, m_size_h, pt);
|
||||||
|
@ -231,7 +231,7 @@ void Tab::loadTheme() {
|
||||||
m_unfocus_pixel = texture->color().pixel();
|
m_unfocus_pixel = texture->color().pixel();
|
||||||
} else
|
} else
|
||||||
m_unfocus_pm =
|
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);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// 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"
|
#include "Toolbar.hh"
|
||||||
|
|
||||||
|
@ -384,14 +384,14 @@ void Toolbar::reconfigure() {
|
||||||
frame.label_h);
|
frame.label_h);
|
||||||
|
|
||||||
Pixmap tmp = frame.base;
|
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)) {
|
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||||
frame.base = None;
|
frame.base = None;
|
||||||
XSetWindowBackground(display, frame.window,
|
XSetWindowBackground(display, frame.window,
|
||||||
texture->color().pixel());
|
texture->color().pixel());
|
||||||
} else {
|
} else {
|
||||||
frame.base =
|
frame.base =
|
||||||
image_ctrl->renderImage(frame.width, frame.height, texture);
|
image_ctrl->renderImage(frame.width, frame.height, *texture);
|
||||||
XSetWindowBackgroundPixmap(display, frame.window, frame.base);
|
XSetWindowBackgroundPixmap(display, frame.window, frame.base);
|
||||||
}
|
}
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
|
@ -404,7 +404,7 @@ void Toolbar::reconfigure() {
|
||||||
texture->color().pixel());
|
texture->color().pixel());
|
||||||
} else {
|
} else {
|
||||||
frame.label =
|
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);
|
XSetWindowBackgroundPixmap(display, frame.window_label, frame.label);
|
||||||
}
|
}
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
|
@ -417,7 +417,7 @@ void Toolbar::reconfigure() {
|
||||||
texture->color().pixel());
|
texture->color().pixel());
|
||||||
} else {
|
} else {
|
||||||
frame.wlabel =
|
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);
|
XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
|
||||||
}
|
}
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
|
@ -426,11 +426,10 @@ void Toolbar::reconfigure() {
|
||||||
texture = &(screen()->getToolbarStyle()->clock);
|
texture = &(screen()->getToolbarStyle()->clock);
|
||||||
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||||
frame.clk = None;
|
frame.clk = None;
|
||||||
XSetWindowBackground(display, frame.clock,
|
XSetWindowBackground(display, frame.clock, texture->color().pixel());
|
||||||
texture->color().pixel());
|
|
||||||
} else {
|
} else {
|
||||||
frame.clk =
|
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);
|
XSetWindowBackgroundPixmap(display, frame.clock, frame.clk);
|
||||||
}
|
}
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp) image_ctrl->removeImage(tmp);
|
||||||
|
@ -447,14 +446,15 @@ void Toolbar::reconfigure() {
|
||||||
XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
|
XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
|
||||||
} else {
|
} else {
|
||||||
frame.button =
|
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.psbutton, frame.button);
|
||||||
XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
|
XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
|
||||||
XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
|
XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
|
||||||
XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
|
XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
|
||||||
}
|
}
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp)
|
||||||
|
image_ctrl->removeImage(tmp);
|
||||||
|
|
||||||
tmp = frame.pbutton;
|
tmp = frame.pbutton;
|
||||||
texture = &(screen()->getToolbarStyle()->pressed);
|
texture = &(screen()->getToolbarStyle()->pressed);
|
||||||
|
@ -463,8 +463,9 @@ void Toolbar::reconfigure() {
|
||||||
frame.pbutton_pixel = texture->color().pixel();
|
frame.pbutton_pixel = texture->color().pixel();
|
||||||
} else
|
} else
|
||||||
frame.pbutton =
|
frame.pbutton =
|
||||||
image_ctrl->renderImage(frame.button_w, frame.button_w, texture);
|
image_ctrl->renderImage(frame.button_w, frame.button_w, *texture);
|
||||||
if (tmp) image_ctrl->removeImage(tmp);
|
if (tmp)
|
||||||
|
image_ctrl->removeImage(tmp);
|
||||||
|
|
||||||
XSetWindowBorder(display, frame.window,
|
XSetWindowBorder(display, frame.window,
|
||||||
screen()->getBorderColor()->pixel());
|
screen()->getBorderColor()->pixel());
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
// 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
|
// 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"
|
#include "bsetroot.hh"
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ void bsetroot::gradient(void) {
|
||||||
texture.colorTo().setPixel(BlackPixel(getXDisplay(), screen));
|
texture.colorTo().setPixel(BlackPixel(getXDisplay(), screen));
|
||||||
|
|
||||||
tmp = img_ctrl[screen]->renderImage(getScreenInfo(screen)->getWidth(),
|
tmp = img_ctrl[screen]->renderImage(getScreenInfo(screen)->getWidth(),
|
||||||
getScreenInfo(screen)->getHeight(), &texture);
|
getScreenInfo(screen)->getHeight(), texture);
|
||||||
|
|
||||||
pixmaps[screen] = XCreatePixmap(getXDisplay(),
|
pixmaps[screen] = XCreatePixmap(getXDisplay(),
|
||||||
getScreenInfo(screen)->getRootWindow(),
|
getScreenInfo(screen)->getRootWindow(),
|
||||||
|
@ -365,7 +365,7 @@ void bsetroot::gradient(void) {
|
||||||
|
|
||||||
setRootAtoms(pixmaps[screen], screen);
|
setRootAtoms(pixmaps[screen], screen);
|
||||||
|
|
||||||
XSetWindowBackgroundPixmap(getXDisplay(),
|
XSetWindowBackgroundPixmap(getXDisplay(),
|
||||||
getScreenInfo(screen)->getRootWindow(), pixmaps[screen]);
|
getScreenInfo(screen)->getRootWindow(), pixmaps[screen]);
|
||||||
|
|
||||||
XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
|
XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
|
||||||
|
|
Loading…
Reference in a new issue