]>
Dogcows Code - chaz/openbox/blob - otk/rendercolor.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rendercolor_hh
3 #define __rendercolor_hh
17 RGB(int red
, int green
, int blue
) : r(red
), g(green
), b(blue
) {}
18 // color is in ARGB format
19 RGB(unsigned long color
)
20 : r((color
>> 16) & 0xff),
21 g((color
>> 8) & 0xff),
31 CacheItem(GC g
, unsigned long p
) : gc(g
), pixel(p
), count(0) {}
33 static std::map
<unsigned long, CacheItem
*> *_cache
;
40 mutable unsigned long _pixel
;
43 mutable bool _allocated
;
44 mutable bool _created
;
49 static void initialize();
50 static void destroy();
52 RenderColor(int screen
, unsigned char red
,
53 unsigned char green
, unsigned char blue
);
54 RenderColor(int screen
, RGB rgb
);
55 virtual ~RenderColor();
57 inline int screen() const { return _screen
; }
58 inline unsigned char red() const { return _red
; }
59 inline unsigned char green() const { return _green
; }
60 inline unsigned char blue() const { return _blue
; }
61 unsigned long pixel() const;
67 #endif // __rendercolor_hh
This page took 0.039132 seconds and 5 git commands to generate.