]> git.wh0rd.org - fontconfig.git/blobdiff - fontconfig/fontconfig.h
fc-cache: add a --root option
[fontconfig.git] / fontconfig / fontconfig.h
index 24a50708342d4142e18d922bef5d6a71ee024dfe..f83cd3823979fed6f6df336e8174521de2749e78 100644 (file)
@@ -7,9 +7,9 @@
  * documentation for any purpose is hereby granted without fee, provided that
  * the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
+ * documentation, and that the name of the author(s) not be used in
  * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
+ * specific, written prior permission.  The authors make no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
@@ -27,7 +27,6 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <stdarg.h>
 
 #if defined(__GNUC__) && (__GNUC__ >= 4)
@@ -52,8 +51,8 @@ typedef int           FcBool;
  */
 
 #define FC_MAJOR       2
-#define FC_MINOR       7
-#define FC_REVISION    2
+#define FC_MINOR       8
+#define FC_REVISION    0
 
 #define FC_VERSION     ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
 
@@ -67,7 +66,7 @@ typedef int           FcBool;
  * it means multiple copies of the font information.
  */
 
-#define FC_CACHE_VERSION    "2"
+#define FC_CACHE_VERSION    "3"
 
 #define FcTrue         1
 #define FcFalse                0
@@ -308,6 +307,9 @@ FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
 
 /* fccache.c */
 
+FcPublic int
+FcStat (FcConfig *config, const FcChar8 *file, struct stat *statb);
+
 FcPublic const FcChar8 *
 FcCacheDir(const FcCache *c);
 
@@ -338,6 +340,9 @@ FcConfigEnableHome (FcBool enable);
 
 FcPublic FcChar8 *
 FcConfigFilename (const FcChar8 *url);
+
+FcPublic FcChar8 *
+FcConfigFilename2 (FcConfig *config, const FcChar8 *url);
     
 FcPublic FcConfig *
 FcConfigCreate (void);
@@ -410,6 +415,17 @@ FcConfigSubstitute (FcConfig       *config,
                    FcPattern   *p,
                    FcMatchKind kind);
 
+FcPublic void
+FcConfigSetRoot (FcConfig      *config,
+                const FcChar8  *path);
+
+FcPublic const FcChar8 *
+FcConfigGetRoot (FcConfig      *config);
+
+FcPublic FcChar8 *
+FcConfigGetRootPlus (FcConfig          *config,
+                    const FcChar8      *path);
+
 /* fccharset.c */
 FcPublic FcCharSet*
 FcCharSetCreate (void);
@@ -424,6 +440,9 @@ FcCharSetDestroy (FcCharSet *fcs);
 FcPublic FcBool
 FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4);
 
+FcPublic FcBool
+FcCharSetDelChar (FcCharSet *fcs, FcChar32 ucs4);
+
 FcPublic FcCharSet*
 FcCharSetCopy (FcCharSet *src);
 
@@ -495,6 +514,9 @@ FcDefaultSubstitute (FcPattern *pattern);
 FcPublic FcBool
 FcFileIsDir (const FcChar8 *file);
 
+FcPublic FcBool
+FcFileIsDir2 (FcConfig *config, const FcChar8 *file);
+
 FcPublic FcBool
 FcFileScan (FcFontSet      *set,
            FcStrSet        *dirs,
@@ -523,6 +545,9 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config);
 FcPublic FcCache *
 FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat);
 
+FcPublic FcCache *
+FcDirCacheLoadFile2 (const FcChar8 *cache_file, FcConfig *config, struct stat *file_stat);
+
 FcPublic void
 FcDirCacheUnload (FcCache *cache);
 
@@ -530,6 +555,9 @@ FcDirCacheUnload (FcCache *cache);
 FcPublic FcPattern *
 FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
 
+FcPublic FcPattern *
+FcFreeTypeQuery2 (FcConfig *config, const FcChar8 *file, int id, FcBlanks *blanks, int *count);
+
 /* fcfs.c */
 
 FcPublic FcFontSet *
@@ -582,6 +610,9 @@ FcLangSetCopy (const FcLangSet *ls);
 FcPublic FcBool
 FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang);
 
+FcPublic FcBool
+FcLangSetDel (FcLangSet *ls, const FcChar8 *lang);
+
 FcPublic FcLangResult
 FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang);
 
@@ -600,6 +631,12 @@ FcLangSetHash (const FcLangSet *ls);
 FcPublic FcStrSet *
 FcLangSetGetLangs (const FcLangSet *ls);
 
+FcPublic FcLangSet *
+FcLangSetUnion (const FcLangSet *a, const FcLangSet *b);
+
+FcPublic FcLangSet *
+FcLangSetSubtract (const FcLangSet *a, const FcLangSet *b);
+
 /* fclist.c */
 FcPublic FcObjectSet *
 FcObjectSetCreate (void);
@@ -636,6 +673,9 @@ FcAtomicCreate (const FcChar8   *file);
 FcPublic FcBool
 FcAtomicLock (FcAtomic *atomic);
 
+FcPublic FcBool
+FcAtomicLock2 (FcConfig *config, FcAtomic *atomic);
+
 FcPublic FcChar8 *
 FcAtomicNewFile (FcAtomic *atomic);
 
@@ -728,10 +768,10 @@ FcPublic FcBool
 FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
     
 FcPublic const FcConstant *
-FcNameGetConstant (FcChar8 *string);
+FcNameGetConstant (const FcChar8 *string);
 
 FcPublic FcBool
-FcNameConstant (FcChar8 *string, int *result);
+FcNameConstant (const FcChar8 *string, int *result);
 
 FcPublic FcPattern *
 FcNameParse (const FcChar8 *name);
@@ -849,6 +889,9 @@ FcStrCopyFilename (const FcChar8 *s);
     
 FcPublic FcChar8 *
 FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
+
+FcPublic FcChar8 *
+FcStrPathPlus (const FcChar8 *s1, ...);
     
 FcPublic void
 FcStrFree (FcChar8 *s);