74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/*-
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * All rights reserved.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * reserved.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Redistribution and use in source and binary forms, with or without
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * modification, are permitted provided that the following conditions
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * are met:
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * 1. Redistributions of source code must retain the above copyright
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * notice, this list of conditions and the following disclaimer.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * 2. Redistributions in binary form must reproduce the above copyright
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * notice, this list of conditions and the following disclaimer in the
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * documentation and/or other materials provided with the distribution.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * SUCH DAMAGE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync *
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* THIS IS NOT AN X CONSORTIUM STANDARD */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _EXT_FONTCACHE_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _EXT_FONTCACHE_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_FontCacheQueryVersion 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_FontCacheGetCacheSettings 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_FontCacheChangeCacheSettings 2
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_FontCacheGetCacheStatistics 3
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define FontCacheNumberEvents 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define FontCacheBadProtocol 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define FontCacheCannotAllocMemory 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long himark;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long lowmark;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long balance;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} FontCacheSettings, *FontCacheSettingsPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncstruct cacheinfo {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long hits;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long misshits;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long purged;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long usage;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync};
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long purge_runs;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long purge_stat;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync long balance;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync struct cacheinfo f;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync struct cacheinfo v;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} FontCacheStatistics, *FontCacheStatisticsPtr;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _FONTCACHE_SERVER_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/Xlib.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOBEGIN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncBool FontCacheQueryVersion(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* dpy */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* majorVersion */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* minorVersion */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncBool FontCacheQueryExtension(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* dpy */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* event_base */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* error_base */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncStatus FontCacheGetCacheSettings(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* dpy */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FontCacheSettings* /* cache info */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncStatus FontCacheChangeCacheSettings(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* dpy */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FontCacheSettings* /* cache info */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncStatus FontCacheGetCacheStatistics(
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* dpy */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync FontCacheStatistics* /* cache statistics info */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOEND
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* !_FONTCACHE_SERVER_ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _EXT_FONTCACHE_H_ */