#include <X11/Xlib.h>
}
-#include "basedisplay.hh"
+#include "display.hh"
#include "color.hh"
+namespace otk {
+
class BGCCacheItem;
class BGCCacheContext {
~BGCCacheContext(void);
private:
- BGCCacheContext(const BaseDisplay * const _display)
- : display(_display), gc(0), pixel(0ul), fontid(0ul),
+ BGCCacheContext()
+ : gc(0), pixel(0ul), fontid(0ul),
function(0), subwindow(0), used(false), screen(~(0u)), linewidth(0) {}
- const BaseDisplay *display;
GC gc;
unsigned long pixel;
unsigned long fontid;
class BGCCache {
public:
- BGCCache(const BaseDisplay * const _display, unsigned int screen_count);
+ BGCCache(unsigned int screen_count);
~BGCCache(void);
// cleans up the cache
// this is closely modelled after the Qt GC cache, but with some of the
// complexity stripped out
- const BaseDisplay *display;
-
const unsigned int context_count;
const unsigned int cache_size;
const unsigned int cache_buckets;
int _linewidth = 0, int _function = GXcopy,
int _subwindow = ClipByChildren)
: color(_color), font(_font), linewidth(_linewidth), function(_function),
- subwindow(_subwindow), cache(_color.display()->gcCache()), item(0) { }
+ subwindow(_subwindow), cache(OBDisplay::gcCache()), item(0) { }
inline ~BPen(void) { if (item) cache->release(item); }
mutable BGCCacheItem *item;
};
+}
#endif // GCCACHE_HH