-void BGCCacheContext::set(const BColor &_color,
- const XFontStruct * const _font,
- const int _function, const int _subwindow,
- int _linewidth) {
+void GCCacheContext::set(const Color &_color,
+ const XFontStruct * const _font,
+ const int _function, const int _subwindow,
+ int _linewidth) {
- XChangeGC(OBDisplay::display, gc, mask, &gcv);
+ XChangeGC(Display::display, gc, mask, &gcv);
- XChangeGC(OBDisplay::display, gc, GCFont, &gcv);
+ XChangeGC(Display::display, gc, GCFont, &gcv);
: context_count(128u), cache_size(16u), cache_buckets(8u * screen_count),
cache_total_size(cache_size * cache_buckets) {
: context_count(128u), cache_size(16u), cache_buckets(8u * screen_count),
cache_total_size(cache_size * cache_buckets) {
std::for_each(contexts, contexts + context_count, PointerAssassin());
std::for_each(cache, cache + cache_total_size, PointerAssassin());
delete [] cache;
std::for_each(contexts, contexts + context_count, PointerAssassin());
std::for_each(cache, cache + cache_total_size, PointerAssassin());
delete [] cache;
-BGCCacheContext *BGCCache::nextContext(unsigned int scr) {
- Window hd = OBDisplay::screenInfo(scr)->rootWindow();
+GCCacheContext *GCCache::nextContext(unsigned int scr) {
+ Window hd = Display::screenInfo(scr)->rootWindow();
- c->gc = XCreateGC(OBDisplay::display, hd, 0, 0);
+ c->gc = XCreateGC(Display::display, hd, 0, 0);
-BGCCacheItem *BGCCache::find(const BColor &_color,
- const XFontStruct * const _font,
- int _function, int _subwindow, int _linewidth) {
+GCCacheItem *GCCache::find(const Color &_color,
+ const XFontStruct * const _font,
+ int _function, int _subwindow, int _linewidth) {
const unsigned long pixel = _color.pixel();
const unsigned int screen = _color.screen();
const int key = _color.red() ^ _color.green() ^ _color.blue();
int k = (key % cache_size) * cache_buckets;
unsigned int i = 0; // loop variable
const unsigned long pixel = _color.pixel();
const unsigned int screen = _color.screen();
const int key = _color.red() ^ _color.green() ^ _color.blue();
int k = (key % cache_size) * cache_buckets;
unsigned int i = 0; // loop variable
- fprintf(stderr, "BGCCache: cache fault, count: %d, screen: %d, item screen: %d\n", c->count, screen, c->ctx->screen);
+ fprintf(stderr, "GCCache: cache fault, count: %d, screen: %d, item screen: %d\n", c->count, screen, c->ctx->screen);