X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Ftexture.hh;h=84763da4e3420bbdf9a3e1fc04d05a554162ab0b;hb=b45a68cc30121ad2c5cd3b795a6b5e8572425316;hp=514a05846a301cde209b38322150ef9f2232cf87;hpb=85c41a1aec90b8daefc425596ea34b6f9d0e643c;p=chaz%2Fopenbox diff --git a/otk/texture.hh b/otk/texture.hh index 514a0584..84763da4 100644 --- a/otk/texture.hh +++ b/otk/texture.hh @@ -4,11 +4,14 @@ #include "color.hh" #include "util.hh" -class BImageControl; #include -class BTexture { +namespace otk { + +class ImageControl; + +class Texture { public: enum Type { // No texture @@ -42,38 +45,36 @@ public: Interlaced = (1l<<18) }; - BTexture(const BaseDisplay * const _display = 0, - unsigned int _screen = ~(0u), BImageControl* _ctrl = 0); - BTexture(const std::string &_description, - const BaseDisplay * const _display = 0, - unsigned int _screen = ~(0u), BImageControl* _ctrl = 0); + Texture(unsigned int _screen = ~(0u), ImageControl* _ctrl = 0); + Texture(const std::string &_description, + unsigned int _screen = ~(0u), ImageControl* _ctrl = 0); - void setColor(const BColor &_color); - void setColorTo(const BColor &_colorTo) { ct = _colorTo; } - void setBorderColor(const BColor &_borderColor) { bc = _borderColor; } + void setColor(const Color &_color); + void setColorTo(const Color &_colorTo) { ct = _colorTo; } + void setBorderColor(const Color &_borderColor) { bc = _borderColor; } - const BColor &color(void) const { return c; } - const BColor &colorTo(void) const { return ct; } - const BColor &lightColor(void) const { return lc; } - const BColor &shadowColor(void) const { return sc; } - const BColor &borderColor(void) const { return bc; } + const Color &color(void) const { return c; } + const Color &colorTo(void) const { return ct; } + const Color &lightColor(void) const { return lc; } + const Color &shadowColor(void) const { return sc; } + const Color &borderColor(void) const { return bc; } unsigned long texture(void) const { return t; } void setTexture(const unsigned long _texture) { t = _texture; } void addTexture(const unsigned long _texture) { t |= _texture; } - BTexture &operator=(const BTexture &tt); - inline bool operator==(const BTexture &tt) +#ifndef SWIG + Texture &operator=(const Texture &tt); +#endif + inline bool operator==(const Texture &tt) { return (c == tt.c && ct == tt.ct && lc == tt.lc && sc == tt.sc && t == tt.t); } - inline bool operator!=(const BTexture &tt) + inline bool operator!=(const Texture &tt) { return (! operator==(tt)); } - const BaseDisplay *display(void) const { return dpy; } unsigned int screen(void) const { return scrn; } - void setDisplay(const BaseDisplay * const _display, - const unsigned int _screen); - void setImageControl(BImageControl* _ctrl) { ctrl = _ctrl; } + void setScreen(const unsigned int _screen); + void setImageControl(ImageControl* _ctrl) { ctrl = _ctrl; } const std::string &description(void) const { return descr; } void setDescription(const std::string &d); @@ -81,12 +82,13 @@ public: const Pixmap old = 0); private: - BColor c, ct, lc, sc, bc; + Color c, ct, lc, sc, bc; std::string descr; unsigned long t; - const BaseDisplay *dpy; - BImageControl *ctrl; + ImageControl *ctrl; unsigned int scrn; }; +} + #endif // TEXTURE_HH