]> git.wh0rd.org - fontconfig.git/blobdiff - fontconfig/fontconfig.h
Add functionality to allow fontconfig data structure serialization.
[fontconfig.git] / fontconfig / fontconfig.h
index 0b9dccf8d14cab14e85243cff4323141a4ac2708..1bc726216fb3f5369a9ba10a93cb599bcef8064d 100644 (file)
@@ -39,8 +39,8 @@ typedef int           FcBool;
  */
 
 #define FC_MAJOR       2
-#define FC_MINOR       2
-#define FC_REVISION    98
+#define FC_MINOR       3
+#define FC_REVISION    2
 
 #define FC_VERSION     ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
 
@@ -85,7 +85,7 @@ typedef int           FcBool;
 #define FC_DPI             "dpi"               /* double */
 #define FC_RGBA                    "rgba"              /* Int */
 #define FC_MINSPACE        "minspace"          /* Bool use minimum line spacing */
-#define FC_SOURCE          "source"            /* String (X11, freetype) */
+#define FC_SOURCE          "source"            /* String (deprecated) */
 #define FC_CHARSET         "charset"           /* CharSet */
 #define FC_LANG                    "lang"              /* String RFC 3066 langs */
 #define FC_FONTVERSION     "fontversion"       /* Int from 'head' table */
@@ -196,22 +196,59 @@ typedef enum _FcResult {
     FcResultOutOfMemory
 } FcResult;
 
+typedef enum _FcStorage {
+    FcStorageStatic, FcStorageDynamic
+} FcStorage;
+
 typedef struct _FcPattern   FcPattern;
 
 typedef struct _FcLangSet   FcLangSet;
 
+typedef struct _FcMatrixPtr {
+    FcStorage               storage;
+    union {
+        int                stat;
+        FcMatrix           *dyn;
+    } u;
+} FcMatrixPtr;
+
+typedef struct _FcCharSetPtr {
+    FcStorage               storage;
+    union {
+        int                stat;
+        FcCharSet          *dyn;
+    } u;
+} FcCharSetPtr;
+
+typedef struct _FcLangSetPtr {
+    FcStorage               storage;
+    union {
+        int                stat;
+        FcLangSet          *dyn;
+    } u;
+} FcLangSetPtr;
+
+typedef struct _FcObjectPtr {
+    FcStorage              storage;
+    union {
+       int                 stat;
+       const FcChar8 *     dyn;
+    } u;
+    FcChar32               hash;
+} FcObjectPtr;
+
 typedef struct _FcValue {
     FcType     type;
     union {
-       const FcChar8   *s;
+       FcObjectPtr     si;
        int             i;
        FcBool          b;
        double          d;
-       const FcMatrix  *m;
-       const FcCharSet *c;
+       FcMatrixPtr     mi;
+       FcCharSetPtr    ci;
        void            *f;
        const FcPattern *p;
-       const FcLangSet *l;
+       FcLangSetPtr    li;
     } u;
 } FcValue;
 
@@ -224,7 +261,7 @@ typedef struct _FcFontSet {
 typedef struct _FcObjectSet {
     int                nobject;
     int                sobject;
-    const char **objects;
+    FcObjectPtr        *objects;
 } FcObjectSet;
     
 typedef enum _FcMatchKind {
@@ -618,6 +655,9 @@ FcMatrixScale (FcMatrix *m, double sx, double sy);
 void
 FcMatrixShear (FcMatrix *m, double sh, double sv);
 
+FcMatrix *
+FcMatrixPtrU (FcMatrixPtr mi);
+
 /* fcname.c */
 
 FcBool