fccache.fncs revision a32e9e42
1/*
2 * Copyright © 2007 Keith Packard
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of the author(s) not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission.  The authors make no
11 * representations about the suitability of this software for any purpose.  It
12 * is provided "as is" without express or implied warranty.
13 *
14 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 */
22 
23@RET@           const FcChar8 *
24@FUNC@          FcCacheDir
25@TYPE1@		const FcCache *			@ARG1@		cache
26@PURPOSE@	Return directory of <parameter>cache</parameter>
27@DESC@
28This function returns the directory from which the cache was constructed.
29@@
30
31@RET@		FcFontSet *
32@FUNC@		FcCacheCopySet
33@TYPE1@		const FcCache *			@ARG1@		cache
34@PURPOSE@	Returns a copy of the fontset from <parameter>cache</parameter>
35@DESC@
36The returned fontset contains each of the font patterns from
37<parameter>cache</parameter>. This fontset may be modified, but the patterns
38from the cache are read-only.
39@@
40
41@RET@		const FcChar8 *
42@FUNC@		FcCacheSubdir
43@TYPE1@		const FcCache *			@ARG1@		cache
44@TYPE2@		int				@ARG2@		i
45@PURPOSE@	Return the <parameter>i</parameter>'th subdirectory.
46@DESC@
47The set of subdirectories stored in a cache file are indexed by this
48function, <parameter>i</parameter> should range from 0 to
49<parameter>n</parameter>-1, where <parameter>n</parameter> is the return
50value from FcCacheNumSubdir.
51@@
52
53@RET@		int
54@FUNC@		FcCacheNumSubdir
55@TYPE1@		const FcCache *			@ARG1@		cache
56@PURPOSE@	Return the number of subdirectories in <parameter>cache</parameter>.
57@DESC@
58This returns the total number of subdirectories in the cache.
59@@
60
61@RET@		int
62@FUNC@		FcCacheNumFont
63@TYPE1@		const FcCache *			@ARG1@		cache
64@PURPOSE@	Returns the number of fonts in <parameter>cache</parameter>.
65@DESC@
66This returns the number of fonts which would be included in the return from
67FcCacheCopySet.
68@@
69
70@RET@		FcBool
71@FUNC@		FcDirCacheClean
72@TYPE1@		const FcChar8 *			@ARG1@		cache_dir
73@TYPE2@		FcBool				@ARG2@		verbose
74@PURPOSE@	Clean up a cache directory
75@DESC@
76This tries to clean up the cache directory of <parameter>cache_dir</parameter>.
77This returns FcTrue if the operation is successfully complete. otherwise FcFalse.
78@SINCE@		2.9.91
79@@
80
81@RET@		void
82@FUNC@		FcCacheCreateTagFile
83@TYPE1@		const FcConfig *		@ARG1@		config
84@PURPOSE@	Create CACHEDIR.TAG at cache directory.
85@DESC@
86This tries to create CACHEDIR.TAG file at the cache directory registered
87to <parameter>config</parameter>.
88@SINCE@		2.9.91
89@@
90
91@RET@		FcBool
92@FUNC@		FcDirCacheCreateUUID
93@TYPE1@		FcChar8 *			@ARG1@		dir
94@TYPE2@		FcBool				@ARG2@		force
95@TYPE3@		FcConfig *			@ARG3@		config
96@PURPOSE@	Create .uuid file at a directory
97@DESC@
98This is to create .uuid file containing an UUID at a font directory of
99<parameter>dir</parameter>.
100The UUID will be used to identify the font directory and is used to determine
101the cache filename if available.
102@SINCE@		2.12.92
103@@
104
105@RET@		FcBool
106@FUNC@		FcDirCacheDeleteUUID
107@TYPE1@		const FcChar8 *			@ARG1@		dir
108@TYPE2@		FcConfig *			@ARG2@		config
109@PURPOSE@	Delete .uuid file
110@DESC@
111This is to delete .uuid file containing an UUID at a font directory of
112<parameter>dir</parameter>.
113@SINCE@		2.13.1
114@@
115