/* The xcache structure allows caching of arbitrary information. We use it to save color and font information so that the X server doesn't need to be queried more than once for the same question. */ #ifndef XCACHE_H_INCLUDED #define XCACHE_H_INCLUDED #ifdef USE_XCACHE #include #include #include #include #ifdef USE_XLOG #include #include #include #define TIMELOG(extra) do { \ timerlog(__FILE__, __LINE__, extra); \ } while (0); void timerlog(char *s, unsigned int c, char *extra); #else #define TIMELOG(extra) do { ; } while(0); #endif /* USE_XLOG */ #ifndef XCACHE_C /* So that the real calls don't get messed up */ #define XAllocColor xcache_AllocColor /* #define XListFonts xcache_ListFonts */ /* #define XListQueryFonts xcache_ListQueryFonts NOT DONE YET! */ /* #define XGetFontProperty xcache_GetFontProperty NOT DONE YET! */ #define XQueryColor xcache_QueryColor #define XQueryColors xcache_QueryColors #define XFreeColors xcache_FreeColors #endif /* ! XCACHE_C */ Status xcache_AllocColor(Display *display, Colormap colormap, XColor *screen_in_out); char **xcache_ListFonts(Display *display, char *pattern, int maxnames, int *actual_count_return); /* XFontStruct *xcache_LoadQueryFont(Display *display, char *name); */ /* Bool xcache_GetFontProperty(XFontStruct *f, Atom atom, unsigned long *ret_val); */ void xcache_QueryColor(Display *display, Colormap colormap, XColor *xc); void xcache_QueryColors(Display *display, Colormap colormap, XColor *xc, int ncolors); void xcache_FreeColors(Display *display, Colormap colormap, unsigned long pixels[], int npixels, unsigned long planes); #endif /* USE_XCACHE */ #endif /* XCACHE_H_INCLUDED */