]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcint.h
Store font directory mtime in cache file.
[fontconfig.git] / src / fcint.h
index a05421955fd065da4fb93113893e92d2579865e5..73bf875c1f483be5290ce6ab9d53f9043bdd538a 100644 (file)
 /* slim_internal.h */
 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
 #define FcPrivate              __attribute__((__visibility__("hidden")))
+#define HAVE_GNUC_ATTRIBUTE 1
+#include "fcalias.h"
 #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
 #define FcPrivate              __hidden
 #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
@@ -320,8 +322,11 @@ struct _FcCache {
     intptr_t   dirs;               /* offset to subdirs */
     int                dirs_count;         /* number of subdir strings */
     intptr_t   set;                /* offset to font set */
+    int                mtime;              /* low bits of directory mtime */
 };
 
+#undef FcCacheDir
+#undef FcCacheSubdir
 #define FcCacheDir(c)  FcOffsetMember(c,dir,FcChar8)
 #define FcCacheDirs(c) FcOffsetMember(c,dirs,intptr_t)
 #define FcCacheSet(c)  FcOffsetMember(c,set,FcFontSet)
@@ -404,7 +409,7 @@ typedef struct _FcCaseFold {
 
 #define FC_CACHE_MAGIC_MMAP        0xFC02FC04
 #define FC_CACHE_MAGIC_ALLOC       0xFC02FC05
-#define FC_CACHE_CONTENT_VERSION    1
+#define FC_CACHE_CONTENT_VERSION    2
 
 struct _FcAtomic {
     FcChar8    *file;          /* original file name */
@@ -499,7 +504,7 @@ FcPrivate FcCache *
 FcDirCacheScan (const FcChar8 *dir, FcConfig *config);
 
 FcPrivate FcCache *
-FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, FcStrSet *dirs);
+FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcStrSet *dirs);
 
 FcPrivate FcBool
 FcDirCacheWrite (FcCache *cache, FcConfig *config);
@@ -513,6 +518,9 @@ FcCacheObjectDereference (void *object);
 FcPrivate void
 FcCacheFini (void);
     
+FcPrivate void
+FcDirCacheReference (FcCache *cache, int nref);
+
 /* fccfg.c */
 
 FcPrivate FcBool
@@ -577,7 +585,8 @@ FcPrivate FcFileTime
 FcConfigModifiedTime (FcConfig *config);
 
 FcPrivate FcBool
-FcConfigAddCache (FcConfig *config, FcCache *cache);
+FcConfigAddCache (FcConfig *config, FcCache *cache, 
+                 FcSetName set, FcStrSet *dirSet);
 
 /* fcserialize.c */
 FcPrivate intptr_t
@@ -857,6 +866,7 @@ FcListPatternMatchAny (const FcPattern *p,
 #define FC_EMBOLDEN_OBJECT     38
 #define FC_EMBEDDED_BITMAP_OBJECT      39
 #define FC_DECORATIVE_OBJECT   40
+#define FC_MAX_BASE_OBJECT     FC_DECORATIVE_OBJECT
 
 FcPrivate FcBool
 FcNameBool (const FcChar8 *v, FcBool *result);