]> git.wh0rd.org - fontconfig.git/blobdiff - fontconfig/fontconfig.h
Add new FcAtomic datatype for config file locking
[fontconfig.git] / fontconfig / fontconfig.h
index c7105e0d1c28f5c93fc516c2a350347b3d522d3f..f25f57c6a3b5f593c26f0b7999c0c581ce4e4267 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $XFree86: $
+ * $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.5 2002/03/01 01:00:54 keithp Exp $
  *
  * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
  *
@@ -168,7 +168,7 @@ typedef struct _FcObjectType {
 } FcObjectType;
 
 typedef struct _FcConstant {
-    const char  *name;
+    const FcChar8  *name;
     const char *object;
     int                value;
 } FcConstant;
@@ -212,6 +212,8 @@ typedef enum _FcSetName {
     FcSetApplication = 1
 } FcSetName;
 
+typedef struct _FcAtomic FcAtomic;
+
 #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
 #define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */
 #define _FCFUNCPROTOEND }
@@ -242,8 +244,8 @@ FcBool
 FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
 
 /* fccfg.c */
-char *
-FcConfigFilename (const char *url);
+FcChar8 *
+FcConfigFilename (const FcChar8 *url);
     
 FcConfig *
 FcConfigCreate (void);
@@ -260,13 +262,13 @@ FcConfigGetCurrent (void);
 FcBool
 FcConfigBuildFonts (FcConfig *config);
 
-char **
+FcChar8 **
 FcConfigGetDirs (FcConfig   *config);
 
-char **
+FcChar8 **
 FcConfigGetConfigFiles (FcConfig    *config);
 
-char *
+FcChar8 *
 FcConfigGetCache (FcConfig  *config);
 
 FcBlanks *
@@ -278,11 +280,11 @@ FcConfigGetFonts (FcConfig        *config,
 
 FcBool
 FcConfigAppFontAddFile (FcConfig    *config,
-                       const char  *file);
+                       const FcChar8  *file);
 
 FcBool
 FcConfigAppFontAddDir (FcConfig            *config,
-                      const char   *dir);
+                      const FcChar8   *dir);
 
 void
 FcConfigAppFontClear (FcConfig     *config);
@@ -329,34 +331,44 @@ FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b);
 FcChar32
 FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b);
 
-#ifndef FONTCONFIG_NO_FREETYPE
-#include <freetype/freetype.h>
-FT_UInt
-FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
-#endif
+FcChar32
+FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result);
 
 /* fcdbg.c */
+void
+FcValuePrint (FcValue v);
+
 void
 FcPatternPrint (FcPattern *p);
 
+void
+FcFontSetPrint (FcFontSet *s);
+
 /* fcdefault.c */
 void
 FcDefaultSubstitute (FcPattern *pattern);
 
 /* fcdir.c */
 FcBool
-FcDirScan (FcFontSet   *set,
-          FcFileCache  *cache,
-          FcBlanks     *blanks,
-          const char   *dir,
-          FcBool       force);
+FcFileScan (FcFontSet      *set,
+           FcFileCache     *cache,
+           FcBlanks        *blanks,
+           const FcChar8   *file,
+           FcBool          force);
+
+FcBool
+FcDirScan (FcFontSet       *set,
+          FcFileCache      *cache,
+          FcBlanks         *blanks,
+          const FcChar8    *dir,
+          FcBool           force);
 
 FcBool
-FcDirSave (FcFontSet *set, const char *dir);
+FcDirSave (FcFontSet *set, const FcChar8 *dir);
 
 /* fcfreetype.c */
 FcPattern *
-FcFreeTypeQuery (const char *file, int id, FcBlanks *blanks, int *count);
+FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count);
 
 /* fcfs.c */
 
@@ -395,12 +407,52 @@ FcObjectSetVaBuild (const char *first, va_list va);
 FcObjectSet *
 FcObjectSetBuild (const char *first, ...);
 
+FcFontSet *
+FcFontSetList (FcConfig            *config,
+              FcFontSet    **sets,
+              int          nsets,
+              FcPattern    *p,
+              FcObjectSet  *os);
+
 FcFontSet *
 FcFontList (FcConfig   *config,
            FcPattern   *p,
            FcObjectSet *os);
 
+/* fcatomic.c */
+
+FcAtomic *
+FcAtomicCreate (const FcChar8   *file);
+
+FcBool
+FcAtomicLock (FcAtomic *atomic);
+
+FcChar8 *
+FcAtomicNewFile (FcAtomic *atomic);
+
+FcChar8 *
+FcAtomicOrigFile (FcAtomic *atomic);
+
+FcBool
+FcAtomicReplaceOrig (FcAtomic *atomic);
+
+void
+FcAtomicDeleteNew (FcAtomic *atomic);
+
+void
+FcAtomicUnlock (FcAtomic *atomic);
+
+void
+FcAtomicDestroy (FcAtomic *atomic);
+
 /* fcmatch.c */
+FcPattern *
+FcFontSetMatch (FcConfig    *config,
+               FcFontSet   **sets,
+               int         nsets,
+               FcPattern   *p,
+               FcResult    *result);
+
 FcPattern *
 FcFontMatch (FcConfig  *config,
             FcPattern  *p, 
@@ -443,13 +495,13 @@ FcBool
 FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
     
 const FcConstant *
-FcNameGetConstant (char *string);
+FcNameGetConstant (FcChar8 *string);
 
 FcBool
-FcNameConstant (char *string, int *result);
+FcNameConstant (FcChar8 *string, int *result);
 
 FcPattern *
-FcNameParse (const char *name);
+FcNameParse (const FcChar8 *name);
 
 FcChar8 *
 FcNameUnparse (FcPattern *pat);
@@ -486,7 +538,7 @@ FcBool
 FcPatternAddDouble (FcPattern *p, const char *object, double d);
 
 FcBool
-FcPatternAddString (FcPattern *p, const char *object, const char *s);
+FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s);
 
 FcBool
 FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s);
@@ -504,7 +556,7 @@ FcResult
 FcPatternGetDouble (FcPattern *p, const char *object, int n, double *d);
 
 FcResult
-FcPatternGetString (FcPattern *p, const char *object, int n, char **const s);
+FcPatternGetString (FcPattern *p, const char *object, int n, FcChar8 ** s);
 
 FcResult
 FcPatternGetMatrix (FcPattern *p, const char *object, int n, FcMatrix **s);
@@ -523,13 +575,13 @@ FcPatternBuild (FcPattern *orig, ...);
 
 /* fcstr.c */
 
-char *
-FcStrCopy (const char *s);
+FcChar8 *
+FcStrCopy (const FcChar8 *s);
 
 #define FcToLower(c)   (('A' <= (c) && (c) <= 'Z') ? (c) - 'A' + 'a' : (c))
 
 int
-FcStrCmpIgnoreCase (const char *s1, const char *s2);
+FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
 
 int
 FcUtf8ToUcs4 (FcChar8   *src_orig,
@@ -544,7 +596,7 @@ FcUtf8Len (FcChar8  *string,
 
 /* fcxml.c */
 FcBool
-FcConfigParseAndLoad (FcConfig *config, const char *file, FcBool complain);
+FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain);
 
 _FCFUNCPROTOEND