diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-22 20:14:28 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-22 20:14:28 +0000 |
| commit | c487295c75094be3858b76b23fc9863ec9d46b59 (patch) | |
| tree | 684a47a9069634c3138ddab578c0dca30043fbad /otk/rendercolor.hh | |
| parent | c8702ceb70886786fad53bddacfdf8b9ffc9c3f1 (diff) | |
part of a hardcoded style done
Diffstat (limited to 'otk/rendercolor.hh')
| -rw-r--r-- | otk/rendercolor.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/otk/rendercolor.hh b/otk/rendercolor.hh index fbfe2aef..6000646a 100644 --- a/otk/rendercolor.hh +++ b/otk/rendercolor.hh @@ -11,6 +11,18 @@ extern "C" { namespace otk { class RenderColor { + struct RGB { + int r; + int g; + int b; + RGB(int red, int green, int blue) : r(red), g(green), b(blue) {} + // color is in ARGB format + RGB(unsigned long color) + : r((color >> 16) & 0xff), + g((color >> 8) & 0xff), + b((color) & 0xff) {} + }; + struct CacheItem { GC gc; int count; @@ -25,12 +37,15 @@ class RenderColor { GC _gc; + void create(); + public: static void initialize(); static void destroy(); RenderColor(int screen, unsigned char red, unsigned char green, unsigned char blue); + RenderColor(int screen, RGB rgb); virtual ~RenderColor(); inline int screen() const { return _screen; } |
