]> Dogcows Code - chaz/openbox/blobdiff - otk/texture.hh
remove userstring
[chaz/openbox] / otk / texture.hh
index 514a05846a301cde209b38322150ef9f2232cf87..84763da4e3420bbdf9a3e1fc04d05a554162ab0b 100644 (file)
@@ -4,11 +4,14 @@
 
 #include "color.hh"
 #include "util.hh"
-class BImageControl;
 
 #include <string>
 
-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
This page took 0.025963 seconds and 4 git commands to generate.