]> git.wh0rd.org - fontconfig.git/blame - src/fcint.h
Forward port cworth's patch to branch.
[fontconfig.git] / src / fcint.h
CommitLineData
24330d27 1/*
793e946c 2 * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
24330d27 3 *
46b51147 4 * Copyright © 2000 Keith Packard
24330d27
KP
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
24
25#ifndef _FCINT_H_
26#define _FCINT_H_
27
28#include <stdlib.h>
29#include <stdio.h>
30#include <string.h>
31#include <ctype.h>
32#include <errno.h>
33#include <unistd.h>
34#include <sys/types.h>
35#include <sys/stat.h>
179c3995 36#include <time.h>
24330d27
KP
37#include <fontconfig/fontconfig.h>
38#include <fontconfig/fcprivate.h>
be094850 39#include <fontconfig/fcfreetype.h>
24330d27
KP
40#ifdef HAVE_CONFIG_H
41#include <config.h>
42#endif
43
cd2ec1a9 44/* unused */
24330d27
KP
45typedef struct _FcSymbolic {
46 const char *name;
47 int value;
48} FcSymbolic;
49
50#ifndef FC_CONFIG_PATH
51#define FC_CONFIG_PATH "fonts.conf"
52#endif
53
179c3995
KP
54#define FC_FONT_FILE_INVALID ((FcChar8 *) ".")
55#define FC_FONT_FILE_DIR ((FcChar8 *) ".dir")
56
daeed6e0
TL
57#ifdef _WIN32
58#define FC_SEARCH_PATH_SEPARATOR ';'
59#else
60#define FC_SEARCH_PATH_SEPARATOR ':'
61#endif
62
24330d27
KP
63#define FC_DBG_MATCH 1
64#define FC_DBG_MATCHV 2
65#define FC_DBG_EDIT 4
66#define FC_DBG_FONTSET 8
67#define FC_DBG_CACHE 16
68#define FC_DBG_CACHEV 32
69#define FC_DBG_PARSE 64
70#define FC_DBG_SCAN 128
4c003605 71#define FC_DBG_SCANV 256
24330d27 72#define FC_DBG_MEMORY 512
2d9c79c0 73#define FC_DBG_CONFIG 1024
24330d27
KP
74
75#define FC_MEM_CHARSET 0
d8d73958 76#define FC_MEM_CHARLEAF 1
24330d27
KP
77#define FC_MEM_FONTSET 2
78#define FC_MEM_FONTPTR 3
79#define FC_MEM_OBJECTSET 4
80#define FC_MEM_OBJECTPTR 5
81#define FC_MEM_MATRIX 6
82#define FC_MEM_PATTERN 7
83#define FC_MEM_PATELT 8
84#define FC_MEM_VALLIST 9
85#define FC_MEM_SUBSTATE 10
86#define FC_MEM_STRING 11
87#define FC_MEM_LISTBUCK 12
d8d73958
KP
88#define FC_MEM_STRSET 13
89#define FC_MEM_STRLIST 14
90#define FC_MEM_CONFIG 15
91#define FC_MEM_LANGSET 16
9dac3c59
KP
92#define FC_MEM_ATOMIC 17
93#define FC_MEM_BLANKS 18
94#define FC_MEM_CACHE 19
95#define FC_MEM_STRBUF 20
96#define FC_MEM_SUBST 21
97#define FC_MEM_OBJECTTYPE 22
98#define FC_MEM_CONSTANT 23
99#define FC_MEM_TEST 24
100#define FC_MEM_EXPR 25
101#define FC_MEM_VSTACK 26
102#define FC_MEM_ATTR 27
103#define FC_MEM_PSTACK 28
1c52c0f0 104#define FC_MEM_STATICSTR 29
d8d73958 105
1c52c0f0 106#define FC_MEM_NUM 30
24330d27 107
4c003605 108typedef enum _FcValueBinding {
dda7794f 109 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
4c003605
KP
110} FcValueBinding;
111
cd2ec1a9
PL
112typedef struct _FcStrSetPtr {
113 FcStorage storage;
114 union {
115 int stat;
116 struct _FcStrSet *dyn;
117 } u;
118} FcStrSetPtr;
119
120typedef struct _FcValueListPtr {
121 FcStorage storage;
122 union {
123 int stat;
124 struct _FcValueList *dyn;
125 } u;
126} FcValueListPtr;
127
24330d27 128typedef struct _FcValueList {
cd2ec1a9
PL
129 FcValueListPtr next;
130
24330d27 131 FcValue value;
e709ddfa 132 FcValueBinding binding;
24330d27
KP
133} FcValueList;
134
cd2ec1a9
PL
135typedef struct _FcPatternEltPtr {
136 FcStorage storage;
137 union {
138 int stat;
139 struct _FcPatternElt *dyn;
140 } u;
141} FcPatternEltPtr;
142
24330d27 143typedef struct _FcPatternElt {
cd2ec1a9
PL
144 FcObjectPtr object;
145 FcValueListPtr values;
24330d27
KP
146} FcPatternElt;
147
148struct _FcPattern {
149 int num;
150 int size;
cd2ec1a9 151 FcPatternEltPtr elts;
e709ddfa 152 int ref;
24330d27
KP
153};
154
155typedef enum _FcOp {
156 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet,
157 FcOpNil,
158 FcOpField, FcOpConst,
159 FcOpAssign, FcOpAssignReplace,
160 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
161 FcOpQuest,
74a623e0
KP
162 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
163 FcOpContains, FcOpListing, FcOpNotContains,
24330d27
KP
164 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
165 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
3f7653c2
KP
166 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
167 FcOpInvalid
24330d27
KP
168} FcOp;
169
170typedef struct _FcExpr {
171 FcOp op;
172 union {
173 int ival;
174 double dval;
ccb3e93b 175 FcChar8 *sval;
24330d27
KP
176 FcMatrix *mval;
177 FcBool bval;
178 FcCharSet *cval;
179 char *field;
ccb3e93b 180 FcChar8 *constant;
24330d27
KP
181 struct {
182 struct _FcExpr *left, *right;
183 } tree;
184 } u;
185} FcExpr;
186
187typedef enum _FcQual {
6f6563ed 188 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
24330d27
KP
189} FcQual;
190
938bc633
KP
191#define FcMatchDefault ((FcMatchKind) -1)
192
24330d27
KP
193typedef struct _FcTest {
194 struct _FcTest *next;
938bc633 195 FcMatchKind kind;
24330d27
KP
196 FcQual qual;
197 const char *field;
198 FcOp op;
199 FcExpr *expr;
200} FcTest;
201
202typedef struct _FcEdit {
203 struct _FcEdit *next;
204 const char *field;
205 FcOp op;
206 FcExpr *expr;
6fff2cda 207 FcValueBinding binding;
24330d27
KP
208} FcEdit;
209
210typedef struct _FcSubst {
211 struct _FcSubst *next;
212 FcTest *test;
213 FcEdit *edit;
214} FcSubst;
215
20ac65ab 216typedef struct _FcCharLeaf {
24330d27 217 FcChar32 map[256/32];
20ac65ab 218} FcCharLeaf;
24330d27 219
d8d73958 220#define FC_REF_CONSTANT -1
82f4243f 221
24330d27 222struct _FcCharSet {
24330d27 223 int ref; /* reference count */
20ac65ab 224 int num; /* size of leaves and numbers arrays */
cd2ec1a9
PL
225 FcStorage storage;
226 union {
227 struct {
228 FcCharLeaf **leaves;
229 FcChar16 *numbers;
230 } dyn;
231 struct {
232 int leafidx_offset;
233 int numbers_offset;
234 } stat;
235 } u;
24330d27
KP
236};
237
179c3995
KP
238struct _FcStrSet {
239 int ref; /* reference count */
240 int num;
241 int size;
cd2ec1a9
PL
242 FcStorage storage;
243 union {
244 FcChar8 **strs;
245 int stridx_offset;
246 } u;
179c3995
KP
247};
248
249struct _FcStrList {
250 FcStrSet *set;
251 int n;
252};
253
c2e7c611 254typedef struct _FcStrBuf {
24330d27
KP
255 FcChar8 *buf;
256 FcBool allocated;
257 FcBool failed;
258 int len;
259 int size;
c2e7c611 260} FcStrBuf;
24330d27 261
7769c321
KP
262/*
263 * To map adobe glyph names to unicode values, a precomputed hash
264 * table is used
265 */
266
267typedef struct _FcGlyphName {
268 FcChar32 ucs; /* unicode value */
269 FcChar8 name[1]; /* name extends beyond struct */
270} FcGlyphName;
271
192296d8
KP
272/*
273 * To perform case-insensitive string comparisons, a table
274 * is used which holds three different kinds of folding data.
275 *
276 * The first is a range of upper case values mapping to a range
277 * of their lower case equivalents. Within each range, the offset
278 * between upper and lower case is constant.
279 *
280 * The second is a range of upper case values which are interleaved
281 * with their lower case equivalents.
282 *
283 * The third is a set of raw unicode values mapping to a list
284 * of unicode values for comparison purposes. This allows conversion
285 * of ß to "ss" so that SS, ss and ß all match. A separate array
286 * holds the list of unicode values for each entry.
287 *
288 * These are packed into a single table. Using a binary search,
289 * the appropriate entry can be located.
290 */
291
292#define FC_CASE_FOLD_RANGE 0
293#define FC_CASE_FOLD_EVEN_ODD 1
294#define FC_CASE_FOLD_FULL 2
295
296typedef struct _FcCaseFold {
297 FcChar32 upper;
298 FcChar16 method : 2;
299 FcChar16 count : 14;
300 short offset; /* lower - upper for RANGE, table id for FULL */
301} FcCaseFold;
302
2d9c79c0
KP
303#define FC_MAX_FILE_LEN 4096
304
327a7fd4 305/*
f21f40f3 306 * The per-user ~/.fonts.cache-<version> file is loaded into
327a7fd4
KP
307 * this data structure. Each directory gets a substructure
308 * which is validated by comparing the directory timestamp with
309 * that saved in the cache. When valid, the entire directory cache
310 * can be immediately loaded without reading the directory. Otherwise,
311 * the files are checked individually; updated files are loaded into the
312 * cache which is then rewritten to the users home directory
313 */
314
315#define FC_GLOBAL_CACHE_DIR_HASH_SIZE 37
316#define FC_GLOBAL_CACHE_FILE_HASH_SIZE 67
317
318typedef struct _FcGlobalCacheInfo {
319 unsigned int hash;
320 FcChar8 *file;
321 time_t time;
322 FcBool referenced;
323} FcGlobalCacheInfo;
324
325typedef struct _FcGlobalCacheFile {
326 struct _FcGlobalCacheFile *next;
327 FcGlobalCacheInfo info;
328 int id;
329 FcChar8 *name;
330} FcGlobalCacheFile;
331
e712133c
KP
332typedef struct _FcGlobalCacheDir FcGlobalCacheDir;
333
327a7fd4
KP
334typedef struct _FcGlobalCacheSubdir {
335 struct _FcGlobalCacheSubdir *next;
e712133c 336 FcGlobalCacheDir *ent;
327a7fd4
KP
337} FcGlobalCacheSubdir;
338
e712133c 339struct _FcGlobalCacheDir {
327a7fd4
KP
340 struct _FcGlobalCacheDir *next;
341 FcGlobalCacheInfo info;
342 int len;
343 FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE];
344 FcGlobalCacheSubdir *subdirs;
e712133c 345};
327a7fd4
KP
346
347typedef struct _FcGlobalCache {
348 FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE];
349 FcBool updated;
350 FcBool broken;
351 int entries;
352 int referenced;
353} FcGlobalCache;
24330d27 354
134f6011
KP
355struct _FcAtomic {
356 FcChar8 *file; /* original file name */
357 FcChar8 *new; /* temp file name -- write data here */
358 FcChar8 *lck; /* lockfile name (used for locking) */
359 FcChar8 *tmp; /* tmpfile name (used for locking) */
360};
361
24330d27
KP
362struct _FcBlanks {
363 int nblank;
364 int sblank;
365 FcChar32 *blanks;
366};
367
368struct _FcConfig {
369 /*
370 * File names loaded from the configuration -- saved here as the
371 * cache file must be consulted before the directories are scanned,
372 * and those directives may occur in any order
373 */
179c3995 374 FcStrSet *configDirs; /* directories to scan for fonts */
ccb3e93b 375 FcChar8 *cache; /* name of per-user cache file */
24330d27
KP
376 /*
377 * Set of allowed blank chars -- used to
378 * trim fonts of bogus glyphs
379 */
380 FcBlanks *blanks;
179c3995
KP
381 /*
382 * List of directories containing fonts,
383 * built by recursively scanning the set
384 * of configured directories
385 */
386 FcStrSet *fontDirs;
24330d27
KP
387 /*
388 * Names of all of the configuration files used
389 * to create this configuration
390 */
179c3995 391 FcStrSet *configFiles; /* config files loaded */
24330d27
KP
392 /*
393 * Substitution instructions for patterns and fonts;
394 * maxObjects is used to allocate appropriate intermediate storage
395 * while performing a whole set of substitutions
396 */
397 FcSubst *substPattern; /* substitutions for patterns */
398 FcSubst *substFont; /* substitutions for fonts */
399 int maxObjects; /* maximum number of tests in all substs */
d47c9d6e
KP
400 /*
401 * List of patterns used to control font file selection
402 */
403 FcStrSet *acceptGlobs;
404 FcStrSet *rejectGlobs;
4f27c1c0
KP
405 FcFontSet *acceptPatterns;
406 FcFontSet *rejectPatterns;
24330d27
KP
407 /*
408 * The set of fonts loaded from the listed directories; the
409 * order within the set does not determine the font selection,
410 * except in the case of identical matches in which case earlier fonts
411 * match preferrentially
412 */
413 FcFontSet *fonts[FcSetApplication + 1];
179c3995
KP
414 /*
415 * Fontconfig can periodically rescan the system configuration
416 * and font directories. This rescanning occurs when font
417 * listing requests are made, but no more often than rescanInterval
418 * seconds apart.
419 */
420 time_t rescanTime; /* last time information was scanned */
421 int rescanInterval; /* interval between scans */
24330d27
KP
422};
423
6e9fc5de
KP
424extern FcConfig *_fcConfig;
425
69937bd9
KP
426typedef struct _FcCharMap FcCharMap;
427
24330d27
KP
428/* fcblanks.c */
429
430/* fccache.c */
431
327a7fd4
KP
432FcGlobalCache *
433FcGlobalCacheCreate (void);
24330d27 434
327a7fd4
KP
435void
436FcGlobalCacheDestroy (FcGlobalCache *cache);
437
438FcBool
a8386abc 439FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info);
24330d27
KP
440
441void
327a7fd4
KP
442FcGlobalCacheReferenced (FcGlobalCache *cache,
443 FcGlobalCacheInfo *info);
444
c4ab52dc
KP
445void
446FcGlobalCacheReferenceSubdir (FcGlobalCache *cache,
447 const FcChar8 *dir);
448
327a7fd4
KP
449FcGlobalCacheDir *
450FcGlobalCacheDirGet (FcGlobalCache *cache,
451 const FcChar8 *dir,
452 int len,
453 FcBool create_missing);
24330d27 454
179c3995 455FcBool
327a7fd4
KP
456FcGlobalCacheScanDir (FcFontSet *set,
457 FcStrSet *dirs,
458 FcGlobalCache *cache,
d47c9d6e
KP
459 const FcChar8 *dir,
460 FcConfig *config);
327a7fd4
KP
461
462FcGlobalCacheFile *
463FcGlobalCacheFileGet (FcGlobalCache *cache,
464 const FcChar8 *file,
465 int id,
466 int *count);
467
179c3995 468
24330d27 469void
327a7fd4
KP
470FcGlobalCacheLoad (FcGlobalCache *cache,
471 const FcChar8 *cache_file);
24330d27
KP
472
473FcBool
327a7fd4
KP
474FcGlobalCacheUpdate (FcGlobalCache *cache,
475 const FcChar8 *file,
476 int id,
477 const FcChar8 *name);
24330d27
KP
478
479FcBool
327a7fd4
KP
480FcGlobalCacheSave (FcGlobalCache *cache,
481 const FcChar8 *cache_file);
24330d27 482
24330d27 483FcBool
d47c9d6e
KP
484FcDirCacheReadDir (FcFontSet *set,
485 FcStrSet *dirs,
486 const FcChar8 *dir,
487 FcConfig *config);
327a7fd4
KP
488
489FcBool
490FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
24330d27
KP
491
492/* fccfg.c */
493
179c3995
KP
494FcBool
495FcConfigAddConfigDir (FcConfig *config,
496 const FcChar8 *d);
497
498FcBool
499FcConfigAddFontDir (FcConfig *config,
500 const FcChar8 *d);
501
24330d27 502FcBool
ccb3e93b
KP
503FcConfigAddDir (FcConfig *config,
504 const FcChar8 *d);
24330d27
KP
505
506FcBool
ccb3e93b
KP
507FcConfigAddConfigFile (FcConfig *config,
508 const FcChar8 *f);
24330d27
KP
509
510FcBool
511FcConfigSetCache (FcConfig *config,
ccb3e93b 512 const FcChar8 *c);
24330d27
KP
513
514FcBool
515FcConfigAddBlank (FcConfig *config,
516 FcChar32 blank);
517
518FcBool
519FcConfigAddEdit (FcConfig *config,
520 FcTest *test,
521 FcEdit *edit,
522 FcMatchKind kind);
523
524void
525FcConfigSetFonts (FcConfig *config,
526 FcFontSet *fonts,
527 FcSetName set);
528
529FcBool
530FcConfigCompareValue (const FcValue m,
531 FcOp op,
532 const FcValue v);
533
d47c9d6e
KP
534FcBool
535FcConfigGlobAdd (FcConfig *config,
536 const FcChar8 *glob,
537 FcBool accept);
538
539FcBool
540FcConfigAcceptFilename (FcConfig *config,
541 const FcChar8 *filename);
542
4f27c1c0
KP
543FcBool
544FcConfigPatternsAdd (FcConfig *config,
545 FcPattern *pattern,
546 FcBool accept);
547
548FcBool
549FcConfigAcceptFont (FcConfig *config,
550 const FcPattern *font);
551
24330d27 552/* fccharset.c */
4c003605
KP
553FcCharSet *
554FcCharSetFreeze (FcCharSet *cs);
555
34cd0514
CW
556void
557FcCharSetThawAll (void);
558
24330d27 559FcBool
c2e7c611 560FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
24330d27
KP
561
562FcCharSet *
563FcNameParseCharSet (FcChar8 *string);
564
c647f6f1
KP
565FcCharLeaf *
566FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
69937bd9 567
cd2ec1a9
PL
568void
569FcCharSetPtrDestroy (FcCharSetPtr fcs);
570
571void
572FcCharSetClearStatic(void);
573
574FcBool
575FcCharSetPrepareSerialize(FcCharSet *c);
576
577FcCharSetPtr
578FcCharSetSerialize(FcCharSet *c);
579
580FcCharSetPtr
581FcCharSetPtrCreateDynamic(FcCharSet *c);
582
583FcCharLeaf *
584FcCharSetGetLeaf(const FcCharSet *c, int i);
585
586FcChar16 *
587FcCharSetGetNumbers(const FcCharSet *c);
588
24330d27 589/* fcdbg.c */
24330d27 590void
cd2ec1a9 591FcValueListPrint (const FcValueListPtr l);
24330d27 592
793e946c
KP
593void
594FcLangSetPrint (const FcLangSet *ls);
595
24330d27
KP
596void
597FcOpPrint (FcOp op);
598
599void
938bc633 600FcTestPrint (const FcTest *test);
24330d27
KP
601
602void
938bc633 603FcExprPrint (const FcExpr *expr);
24330d27
KP
604
605void
938bc633 606FcEditPrint (const FcEdit *edit);
24330d27
KP
607
608void
938bc633 609FcSubstPrint (const FcSubst *subst);
24330d27 610
24330d27
KP
611int
612FcDebug (void);
613
cd2ec1a9
PL
614FcCharSet *
615FcCharSetPtrU (FcCharSetPtr mi);
616
24330d27 617/* fcdir.c */
24330d27 618
2d9c79c0
KP
619FcBool
620FcFileIsDir (const FcChar8 *file);
621
d47c9d6e
KP
622FcBool
623FcFileScanConfig (FcFontSet *set,
624 FcStrSet *dirs,
625 FcFileCache *cache,
626 FcBlanks *blanks,
627 const FcChar8 *file,
628 FcBool force,
629 FcConfig *config);
630
631FcBool
632FcDirScanConfig (FcFontSet *set,
633 FcStrSet *dirs,
634 FcFileCache *cache,
635 FcBlanks *blanks,
636 const FcChar8 *dir,
637 FcBool force,
638 FcConfig *config);
639
24330d27
KP
640/* fcfont.c */
641int
642FcFontDebug (void);
643
82f4243f 644/* fcfreetype.c */
e50b9ae7
KP
645FcBool
646FcFreeTypeIsExclusiveLang (const FcChar8 *lang);
647
82f4243f
KP
648FcBool
649FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
650
c647f6f1
KP
651FcChar32
652FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
653
654FcChar32
655FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
656
657const FcCharMap *
658FcFreeTypeGetPrivateMap (FT_Encoding encoding);
659
24330d27 660/* fcfs.c */
cd2ec1a9
PL
661
662void
663FcFontSetClearStatic (void);
664
665FcBool
666FcFontSetPrepareSerialize (FcFontSet * s);
667
668FcBool
669FcFontSetSerialize (FcFontSet * s);
670
24330d27
KP
671/* fcgram.y */
672int
673FcConfigparse (void);
674
675int
676FcConfigwrap (void);
677
678void
679FcConfigerror (char *fmt, ...);
680
681char *
682FcConfigSaveField (const char *field);
683
24330d27
KP
684void
685FcTestDestroy (FcTest *test);
686
687FcExpr *
688FcExprCreateInteger (int i);
689
690FcExpr *
691FcExprCreateDouble (double d);
692
693FcExpr *
ccb3e93b 694FcExprCreateString (const FcChar8 *s);
24330d27
KP
695
696FcExpr *
697FcExprCreateMatrix (const FcMatrix *m);
698
699FcExpr *
700FcExprCreateBool (FcBool b);
701
702FcExpr *
703FcExprCreateNil (void);
704
705FcExpr *
706FcExprCreateField (const char *field);
707
708FcExpr *
ccb3e93b 709FcExprCreateConst (const FcChar8 *constant);
24330d27
KP
710
711FcExpr *
712FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right);
713
714void
715FcExprDestroy (FcExpr *e);
716
24330d27
KP
717void
718FcEditDestroy (FcEdit *e);
719
720/* fcinit.c */
721
722void
723FcMemReport (void);
724
725void
726FcMemAlloc (int kind, int size);
727
728void
729FcMemFree (int kind, int size);
730
82f4243f 731/* fclang.c */
d8d73958
KP
732FcLangSet *
733FcFreeTypeLangSet (const FcCharSet *charset,
e50b9ae7 734 const FcChar8 *exclusiveLang);
82f4243f
KP
735
736FcLangResult
737FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
738
739const FcCharSet *
740FcCharSetForLang (const FcChar8 *lang);
741
d8d73958
KP
742FcLangSet *
743FcLangSetPromote (const FcChar8 *lang);
744
745FcLangSet *
746FcNameParseLangSet (const FcChar8 *string);
747
748FcBool
749FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
750
cd2ec1a9
PL
751void
752FcLangSetClearStatic (void);
753
754FcBool
755FcLangSetPrepareSerialize (FcLangSet *l);
756
757FcLangSetPtr
758FcLangSetSerialize (FcLangSet *l);
759
760FcLangSet *
761FcLangSetPtrU (FcLangSetPtr li);
762
763FcLangSetPtr
764FcLangSetPtrCreateDynamic (FcLangSet *l);
765
766void
767FcLangSetPtrDestroy (FcLangSetPtr li);
768
24330d27
KP
769/* fclist.c */
770
4f27c1c0
KP
771FcBool
772FcListPatternMatchAny (const FcPattern *p,
773 const FcPattern *font);
774
24330d27
KP
775/* fcmatch.c */
776
cd2ec1a9
PL
777/* fcmmap.c */
778
779void
780FcCacheClearStatic(void);
781
782FcBool
783FcCachePrepareSerialize(FcConfig * config);
784
785FcBool
786FcCacheSerialize (FcConfig * config);
787
788
24330d27 789/* fcname.c */
24330d27
KP
790
791FcBool
ca60d2b5 792FcNameBool (const FcChar8 *v, FcBool *result);
24330d27 793
24330d27
KP
794/* fcpat.c */
795void
cd2ec1a9
PL
796FcValueListDestroy (FcValueListPtr l);
797
24330d27 798FcPatternElt *
e9be9cd1
KP
799FcPatternFindElt (const FcPattern *p, const char *object);
800
801FcPatternElt *
802FcPatternInsertElt (FcPattern *p, const char *object);
24330d27 803
82f4243f
KP
804FcBool
805FcPatternAddWithBinding (FcPattern *p,
806 const char *object,
807 FcValue value,
808 FcValueBinding binding,
809 FcBool append);
810
d8d73958
KP
811FcPattern *
812FcPatternFreeze (FcPattern *p);
813
34cd0514 814void
e1b9d091 815FcPatternFini (void);
34cd0514 816
4f27c1c0
KP
817FcBool
818FcPatternAppend (FcPattern *p, FcPattern *s);
819
cd2ec1a9
PL
820void
821FcObjectClearStatic(void);
822
823FcObjectPtr
4f27c1c0
KP
824FcObjectStaticName (const char *name);
825
cd2ec1a9
PL
826FcBool
827FcObjectPrepareSerialize (FcObjectPtr si);
828
829const char *
830FcObjectPtrU (FcObjectPtr p);
831
832int
833FcObjectPtrCompare (FcObjectPtr a, FcObjectPtr b);
834
835FcObjectPtr
836FcObjectPtrCreateDynamic (const char * s);
837
838void
839FcObjectPtrDestroy (FcObjectPtr p);
840
841FcBool
842FcPatternPrepareSerialize (FcPattern *p);
843
844void
845FcValueListClearStatic (void);
846
847void
848FcPatternClearStatic (void);
849
850FcValueList *
851FcValueListPtrU(FcValueListPtr p);
852
853FcPatternElt *
854FcPatternEltU (FcPatternEltPtr pei);
855
856FcValueListPtr
857FcValueListPtrCreateDynamic(FcValueList * p);
858
859FcBool
860FcValueListPrepareSerialize (FcValueList *p);
861
862FcValueListPtr
863FcValueListSerialize(FcValueList *pi);
864
865FcPattern *
866FcPatternSerialize (FcPattern * p);
867
24330d27
KP
868/* fcrender.c */
869
870/* fcmatrix.c */
327a7fd4 871
cd2ec1a9 872extern const FcMatrixPtr FcIdentityMatrix;
327a7fd4 873
24330d27
KP
874void
875FcMatrixFree (FcMatrix *mat);
876
cd2ec1a9
PL
877void
878FcMatrixPtrDestroy (FcMatrixPtr mi);
879
880FcBool
881FcMatrixPrepareSerialize(FcMatrix *m);
882
883FcMatrixPtr
884FcMatrixSerialize(FcMatrix *m);
885
886FcMatrix *
887FcMatrixPtrU (FcMatrixPtr mi);
888
889FcMatrixPtr
890FcMatrixPtrCreateDynamic (FcMatrix *m);
891
892void
893FcMatrixClearStatic (void);
894
24330d27 895/* fcstr.c */
cd2ec1a9
PL
896FcStrSet *
897FcStrSetPtrU (const FcStrSetPtr set);
898
899FcStrSetPtr
900FcStrSetPtrCreateDynamic (const FcStrSet * set);
901
902void
903FcStrSetClearStatic (void);
904
905FcBool
906FcStrSetPrepareSerialize (const FcStrSet *set);
907
908void
909FcStrSetSort (FcStrSet * set);
910
911FcChar8 *
912FcStrSetGet (const FcStrSet *set, int i);
913
ccb3e93b
KP
914FcChar8 *
915FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
24330d27
KP
916
917void
ccb3e93b 918FcStrFree (FcChar8 *s);
24330d27 919
c2e7c611
KP
920void
921FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
922
923void
924FcStrBufDestroy (FcStrBuf *buf);
925
926FcChar8 *
927FcStrBufDone (FcStrBuf *buf);
928
929FcBool
930FcStrBufChar (FcStrBuf *buf, FcChar8 c);
931
932FcBool
933FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
934
935FcBool
936FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
937
cd2ec1a9
PL
938FcStrSetPtr
939FcStrSetSerialize (FcStrSet *set);
940
82f4243f
KP
941int
942FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
943
11fec41c
KP
944const FcChar8 *
945FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
946
947const FcChar8 *
948FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
949
ff3f1f98
KP
950FcBool
951FcStrUsesHome (const FcChar8 *s);
952
daeed6e0
TL
953FcChar8 *
954FcStrLastSlash (const FcChar8 *path);
955
192296d8
KP
956FcChar32
957FcStrHashIgnoreCase (const FcChar8 *s);
958
24330d27 959#endif /* _FC_INT_H_ */