X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Frendercolor.hh;h=4eeb8158a0d20c0bade832f73c5d6011ef9e3510;hb=3fe7bded58fb82fd2c1c2a5f9ad2e8f453fa0609;hp=6000646acd94c3bf6f703bf7f255f819109bcc4f;hpb=c487295c75094be3858b76b23fc9863ec9d46b59;p=chaz%2Fopenbox diff --git a/otk/rendercolor.hh b/otk/rendercolor.hh index 6000646a..4eeb8158 100644 --- a/otk/rendercolor.hh +++ b/otk/rendercolor.hh @@ -11,6 +11,7 @@ extern "C" { namespace otk { class RenderColor { +public: struct RGB { int r; int g; @@ -22,7 +23,8 @@ class RenderColor { g((color >> 8) & 0xff), b((color) & 0xff) {} }; - + +private: struct CacheItem { GC gc; int count; @@ -34,6 +36,7 @@ class RenderColor { unsigned char _red; unsigned char _green; unsigned char _blue; + unsigned long _pixel; GC _gc; @@ -52,6 +55,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; } };