self->function = gcv.function = function;
self->subwindow = gcv.subwindow_mode = subwindow;
self->linewidth = gcv.line_width = linewidth;
self->function = gcv.function = function;
self->subwindow = gcv.subwindow_mode = subwindow;
self->linewidth = gcv.line_width = linewidth;
gccache->cache_total_size = gccache->cache_size * gccache->cache_buckets;
gccache->contexts = malloc(sizeof(OtkGCCacheContext*) *
gccache->cache_total_size = gccache->cache_size * gccache->cache_buckets;
gccache->contexts = malloc(sizeof(OtkGCCacheContext*) *
OtkGCCacheItem *OtkGCCache_Find(OtkColor *color, XFontStruct *font,
int function, int subwindow, int linewidth)
{
OtkGCCacheItem *OtkGCCache_Find(OtkColor *color, XFontStruct *font,
int function, int subwindow, int linewidth)
{
const int screen = color->screen;
const int key = color->red ^ color->green ^ color->blue;
int k = (key % gccache->cache_size) * gccache->cache_buckets;
const int screen = color->screen;
const int key = color->red ^ color->green ^ color->blue;
int k = (key % gccache->cache_size) * gccache->cache_buckets;
OtkGCCacheContext_Set(c->ctx, color, font, function, subwindow, linewidth);
c->ctx->used = True;
c->count = 1;
OtkGCCacheContext_Set(c->ctx, color, font, function, subwindow, linewidth);
c->ctx->used = True;
c->count = 1;