]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcint.h
Fix fc-cat again. Sigh.
[fontconfig.git] / src / fcint.h
index adb3b16b5f47ef499c89ad628863c4e9e3e2df04..651ca6627a0e9632ae03e61312aceb03a89ae5fa 100644 (file)
@@ -405,6 +405,11 @@ struct _FcBlanks {
     FcChar32   *blanks;
 };
 
+typedef struct _FcCacheList {
+    struct _FcCacheList *next;
+    FcCache            *cache;
+} FcCacheList;
+
 struct _FcConfig {
     /*
      * File names loaded from the configuration -- saved here as the
@@ -412,7 +417,6 @@ struct _FcConfig {
      * and those directives may occur in any order
      */
     FcStrSet   *configDirs;        /* directories to scan for fonts */
-    FcChar8    *cache;             /* name of per-user cache file */
     /*
      * Set of allowed blank chars -- used to
      * trim fonts of bogus glyphs
@@ -455,6 +459,11 @@ struct _FcConfig {
      * match preferrentially
      */
     FcFontSet  *fonts[FcSetApplication + 1];
+    /*
+     * Font cache information is mapped from cache files
+     * the configuration is destroyed, the files need to be unmapped
+     */
+    FcCacheList        *caches;
     /*
      * Fontconfig can periodically rescan the system configuration
      * and font directories.  This rescanning occurs when font
@@ -491,15 +500,18 @@ FcBool
 FcDirCacheConsume (FILE *file, FcFontSet *set, FcStrSet *dirs,
                   const FcChar8 *dir, char *dirname);
     
-FcCache *
-FcDirCacheMap (int fd, off_t size);
-
 void
 FcDirCacheUnmap (FcCache *cache);
 
 FcBool
 FcDirCacheRead (FcFontSet * set, FcStrSet * dirs, const FcChar8 *dir, FcConfig *config);
  
+FcCache *
+FcDirCacheMap (const FcChar8 *dir, FcConfig *config);
+    
+FcBool
+FcDirCacheLoad (int fd, off_t size, void *closure);
+
 /* fccfg.c */
 
 FcBool
@@ -525,10 +537,6 @@ FcBool
 FcConfigAddConfigFile (FcConfig                *config,
                       const FcChar8    *f);
 
-FcBool
-FcConfigSetCache (FcConfig     *config,
-                 const FcChar8 *c);
-
 FcBool
 FcConfigAddBlank (FcConfig     *config,
                  FcChar32      blank);
@@ -570,6 +578,10 @@ FcConfigAcceptFont (FcConfig           *config,
 FcFileTime
 FcConfigModifiedTime (FcConfig *config);
 
+FcBool
+FcConfigAddCache (FcConfig *config, FcCache *cache);
+
+/* fcserialize.c */
 intptr_t
 FcAlignSize (intptr_t size);
     
@@ -858,10 +870,13 @@ FcObjectFromName (const char * name);
 const char *
 FcObjectName (FcObject object);
 
-#define FcObjectCompare(a, b)  ((int) a - (int) b)
+FcBool
+FcObjectInit (void);
 
 void
-FcObjectStaticNameFini (void);
+FcObjectFini (void);
+
+#define FcObjectCompare(a, b)  ((int) a - (int) b)
 
 /* fcpat.c */