]> Dogcows Code - chaz/openbox/blobdiff - otk/rendercolor.hh
new scripts for new script structure
[chaz/openbox] / otk / rendercolor.hh
index 6000646acd94c3bf6f703bf7f255f819109bcc4f..c5835385ddcb8465f7cfaec14c59784090a16ee6 100644 (file)
@@ -11,6 +11,7 @@ extern "C" {
 namespace otk {
 
 class RenderColor {
+public:
   struct RGB {
     int r;
     int g;
@@ -22,11 +23,13 @@ class RenderColor {
         g((color >> 8) & 0xff),
         b((color) & 0xff) {}
   };
-  
+
+private:
   struct CacheItem {
     GC gc;
+    unsigned long pixel;
     int count;
-    CacheItem(GC g) : gc(g), count(0) {}
+    CacheItem(GC g, unsigned long p) : gc(g), pixel(p), count(0) {}
   };
   static std::map<unsigned long, CacheItem*> *_cache;
 
@@ -34,6 +37,7 @@ class RenderColor {
   unsigned char _red;
   unsigned char _green;
   unsigned char _blue;
+  unsigned long _pixel;
 
   GC _gc;
 
@@ -52,6 +56,7 @@ public:
   inline unsigned char red() const { return _red; }
   inline unsigned char green() const { return _green; }
   inline unsigned char blue() const { return _blue; }
+  inline unsigned long pixel() const { return _pixel; }
   inline GC gc() const { return _gc; }
 };
 
This page took 0.021101 seconds and 4 git commands to generate.