fccache.fncs revision a32e9e42
12c393a42Smrg/*
22c393a42Smrg * Copyright © 2007 Keith Packard
32c393a42Smrg *
42c393a42Smrg * Permission to use, copy, modify, distribute, and sell this software and its
52c393a42Smrg * documentation for any purpose is hereby granted without fee, provided that
62c393a42Smrg * the above copyright notice appear in all copies and that both that
72c393a42Smrg * copyright notice and this permission notice appear in supporting
8ca08ab68Smrg * documentation, and that the name of the author(s) not be used in
92c393a42Smrg * advertising or publicity pertaining to distribution of the software without
10ca08ab68Smrg * specific, written prior permission.  The authors make no
112c393a42Smrg * representations about the suitability of this software for any purpose.  It
122c393a42Smrg * is provided "as is" without express or implied warranty.
132c393a42Smrg *
14a6844aabSmrg * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
152c393a42Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16a6844aabSmrg * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
172c393a42Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
182c393a42Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
192c393a42Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
202c393a42Smrg * PERFORMANCE OF THIS SOFTWARE.
212c393a42Smrg */
222c393a42Smrg 
232c393a42Smrg@RET@           const FcChar8 *
242c393a42Smrg@FUNC@          FcCacheDir
252c393a42Smrg@TYPE1@		const FcCache *			@ARG1@		cache
262c393a42Smrg@PURPOSE@	Return directory of <parameter>cache</parameter>
272c393a42Smrg@DESC@
282c393a42SmrgThis function returns the directory from which the cache was constructed.
292c393a42Smrg@@
302c393a42Smrg
312c393a42Smrg@RET@		FcFontSet *
322c393a42Smrg@FUNC@		FcCacheCopySet
332c393a42Smrg@TYPE1@		const FcCache *			@ARG1@		cache
342c393a42Smrg@PURPOSE@	Returns a copy of the fontset from <parameter>cache</parameter>
352c393a42Smrg@DESC@
362c393a42SmrgThe returned fontset contains each of the font patterns from
372c393a42Smrg<parameter>cache</parameter>. This fontset may be modified, but the patterns
382c393a42Smrgfrom the cache are read-only.
392c393a42Smrg@@
402c393a42Smrg
412c393a42Smrg@RET@		const FcChar8 *
422c393a42Smrg@FUNC@		FcCacheSubdir
432c393a42Smrg@TYPE1@		const FcCache *			@ARG1@		cache
442c393a42Smrg@TYPE2@		int				@ARG2@		i
452c393a42Smrg@PURPOSE@	Return the <parameter>i</parameter>'th subdirectory.
462c393a42Smrg@DESC@
472c393a42SmrgThe set of subdirectories stored in a cache file are indexed by this
482c393a42Smrgfunction, <parameter>i</parameter> should range from 0 to
492c393a42Smrg<parameter>n</parameter>-1, where <parameter>n</parameter> is the return
502c393a42Smrgvalue from FcCacheNumSubdir.
512c393a42Smrg@@
522c393a42Smrg
532c393a42Smrg@RET@		int
542c393a42Smrg@FUNC@		FcCacheNumSubdir
552c393a42Smrg@TYPE1@		const FcCache *			@ARG1@		cache
562c393a42Smrg@PURPOSE@	Return the number of subdirectories in <parameter>cache</parameter>.
572c393a42Smrg@DESC@
582c393a42SmrgThis returns the total number of subdirectories in the cache.
592c393a42Smrg@@
602c393a42Smrg
612c393a42Smrg@RET@		int
622c393a42Smrg@FUNC@		FcCacheNumFont
632c393a42Smrg@TYPE1@		const FcCache *			@ARG1@		cache
642c393a42Smrg@PURPOSE@	Returns the number of fonts in <parameter>cache</parameter>.
652c393a42Smrg@DESC@
662c393a42SmrgThis returns the number of fonts which would be included in the return from
672c393a42SmrgFcCacheCopySet.
682c393a42Smrg@@
69ca08ab68Smrg
70ca08ab68Smrg@RET@		FcBool
71ca08ab68Smrg@FUNC@		FcDirCacheClean
72ca08ab68Smrg@TYPE1@		const FcChar8 *			@ARG1@		cache_dir
73ca08ab68Smrg@TYPE2@		FcBool				@ARG2@		verbose
74a32e9e42Smrg@PURPOSE@	Clean up a cache directory
75a32e9e42Smrg@DESC@
76ca08ab68SmrgThis tries to clean up the cache directory of <parameter>cache_dir</parameter>.
77ca08ab68SmrgThis returns FcTrue if the operation is successfully complete. otherwise FcFalse.
78b09479dcSmrg@SINCE@		2.9.91
79ca08ab68Smrg@@
80ca08ab68Smrg
81ca08ab68Smrg@RET@		void
82ca08ab68Smrg@FUNC@		FcCacheCreateTagFile
83ca08ab68Smrg@TYPE1@		const FcConfig *		@ARG1@		config
84ca08ab68Smrg@PURPOSE@	Create CACHEDIR.TAG at cache directory.
85ca08ab68Smrg@DESC@
86ca08ab68SmrgThis tries to create CACHEDIR.TAG file at the cache directory registered
87ca08ab68Smrgto <parameter>config</parameter>.
88b09479dcSmrg@SINCE@		2.9.91
89ca08ab68Smrg@@
90a32e9e42Smrg
91a32e9e42Smrg@RET@		FcBool
92a32e9e42Smrg@FUNC@		FcDirCacheCreateUUID
93a32e9e42Smrg@TYPE1@		FcChar8 *			@ARG1@		dir
94a32e9e42Smrg@TYPE2@		FcBool				@ARG2@		force
95a32e9e42Smrg@TYPE3@		FcConfig *			@ARG3@		config
96a32e9e42Smrg@PURPOSE@	Create .uuid file at a directory
97a32e9e42Smrg@DESC@
98a32e9e42SmrgThis is to create .uuid file containing an UUID at a font directory of
99a32e9e42Smrg<parameter>dir</parameter>.
100a32e9e42SmrgThe UUID will be used to identify the font directory and is used to determine
101a32e9e42Smrgthe cache filename if available.
102a32e9e42Smrg@SINCE@		2.12.92
103a32e9e42Smrg@@
104a32e9e42Smrg
105a32e9e42Smrg@RET@		FcBool
106a32e9e42Smrg@FUNC@		FcDirCacheDeleteUUID
107a32e9e42Smrg@TYPE1@		const FcChar8 *			@ARG1@		dir
108a32e9e42Smrg@TYPE2@		FcConfig *			@ARG2@		config
109a32e9e42Smrg@PURPOSE@	Delete .uuid file
110a32e9e42Smrg@DESC@
111a32e9e42SmrgThis is to delete .uuid file containing an UUID at a font directory of
112a32e9e42Smrg<parameter>dir</parameter>.
113a32e9e42Smrg@SINCE@		2.13.1
114a32e9e42Smrg@@
115