summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fontcacheproto/.gitignore78
-rw-r--r--fontcacheproto/COPYING24
-rw-r--r--fontcacheproto/Makefile.am22
-rw-r--r--fontcacheproto/README30
-rwxr-xr-xfontcacheproto/autogen.sh12
-rw-r--r--fontcacheproto/configure.ac13
-rw-r--r--fontcacheproto/fontcache.h106
-rw-r--r--fontcacheproto/fontcacheP.h40
-rw-r--r--fontcacheproto/fontcacheproto.pc.in9
-rw-r--r--fontcacheproto/fontcachstr.h130
10 files changed, 464 insertions, 0 deletions
diff --git a/fontcacheproto/.gitignore b/fontcacheproto/.gitignore
new file mode 100644
index 0000000..51f6b55
--- /dev/null
+++ b/fontcacheproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for fontcacheproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/fontcacheproto/COPYING b/fontcacheproto/COPYING
new file mode 100644
index 0000000..3e473ad
--- /dev/null
+++ b/fontcacheproto/COPYING
@@ -0,0 +1,24 @@
+Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+All rights reserved.
+Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/fontcacheproto/Makefile.am b/fontcacheproto/Makefile.am
new file mode 100644
index 0000000..9092f8a
--- /dev/null
+++ b/fontcacheproto/Makefile.am
@@ -0,0 +1,22 @@
+fontcachedir = $(includedir)/X11/extensions
+fontcache_HEADERS = \
+ fontcache.h \
+ fontcacheP.h \
+ fontcachstr.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = fontcacheproto.pc
+
+EXTRA_DIST = fontcacheproto.pc.in
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/fontcacheproto/README b/fontcacheproto/README
new file mode 100644
index 0000000..7cce9a7
--- /dev/null
+++ b/fontcacheproto/README
@@ -0,0 +1,30 @@
+ FontCache Extension
+
+This extension defines a protocol to allow client control over the caching
+of server-side core fonts.
+
+Extension name: FontCache
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/fontcacheproto
+
+ http://cgit.freedesktop.org/xorg/proto/fontcacheproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/fontcacheproto/autogen.sh b/fontcacheproto/autogen.sh
new file mode 100755
index 0000000..904cd67
--- /dev/null
+++ b/fontcacheproto/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/fontcacheproto/configure.ac b/fontcacheproto/configure.ac
new file mode 100644
index 0000000..2c13bd2
--- /dev/null
+++ b/fontcacheproto/configure.ac
@@ -0,0 +1,13 @@
+AC_PREREQ([2.57])
+AC_INIT([FontcacheProto], [0.1.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_OUTPUT([Makefile
+ fontcacheproto.pc])
diff --git a/fontcacheproto/fontcache.h b/fontcacheproto/fontcache.h
new file mode 100644
index 0000000..b767db1
--- /dev/null
+++ b/fontcacheproto/fontcache.h
@@ -0,0 +1,106 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $
+ */
+/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD */
+
+#ifndef _EXT_FONTCACHE_H_
+#define _EXT_FONTCACHE_H_
+
+#define X_FontCacheQueryVersion 0
+#define X_FontCacheGetCacheSettings 1
+#define X_FontCacheChangeCacheSettings 2
+#define X_FontCacheGetCacheStatistics 3
+
+#define FontCacheNumberEvents 0
+
+#define FontCacheBadProtocol 0
+#define FontCacheCannotAllocMemory 1
+#define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1)
+
+typedef struct {
+ long himark;
+ long lowmark;
+ long balance;
+} FontCacheSettings, *FontCacheSettingsPtr;
+
+struct cacheinfo {
+ long hits;
+ long misshits;
+ long purged;
+ long usage;
+};
+
+typedef struct {
+ long purge_runs;
+ long purge_stat;
+ long balance;
+ struct cacheinfo f;
+ struct cacheinfo v;
+} FontCacheStatistics, *FontCacheStatisticsPtr;
+
+#ifndef _FONTCACHE_SERVER_
+
+#include <X11/Xlib.h>
+
+_XFUNCPROTOBEGIN
+
+Bool FontCacheQueryVersion(
+ Display* /* dpy */,
+ int* /* majorVersion */,
+ int* /* minorVersion */
+);
+
+Bool FontCacheQueryExtension(
+ Display* /* dpy */,
+ int* /* event_base */,
+ int* /* error_base */
+);
+
+Status FontCacheGetCacheSettings(
+ Display* /* dpy */,
+ FontCacheSettings* /* cache info */
+);
+
+Status FontCacheChangeCacheSettings(
+ Display* /* dpy */,
+ FontCacheSettings* /* cache info */
+);
+
+Status FontCacheGetCacheStatistics(
+ Display* /* dpy */,
+ FontCacheStatistics* /* cache statistics info */
+);
+
+_XFUNCPROTOEND
+
+#endif /* !_FONTCACHE_SERVER_ */
+
+#endif /* _EXT_FONTCACHE_H_ */
diff --git a/fontcacheproto/fontcacheP.h b/fontcacheproto/fontcacheP.h
new file mode 100644
index 0000000..75677f3
--- /dev/null
+++ b/fontcacheproto/fontcacheP.h
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $
+ */
+/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */
+
+#ifndef _FONTCACHEP_H_
+#define _FONTCACHEP_H_
+
+#include <X11/extensions/fontcache.h>
+
+int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */);
+void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */);
+void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */);
+
+#endif /* _FONTCACHEP_H_ */
diff --git a/fontcacheproto/fontcacheproto.pc.in b/fontcacheproto/fontcacheproto.pc.in
new file mode 100644
index 0000000..afb2127
--- /dev/null
+++ b/fontcacheproto/fontcacheproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FontcacheProto
+Description: Fontcache extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/fontcacheproto/fontcachstr.h b/fontcacheproto/fontcachstr.h
new file mode 100644
index 0000000..eab704e
--- /dev/null
+++ b/fontcacheproto/fontcachstr.h
@@ -0,0 +1,130 @@
+/*-
+ * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
+ * All rights reserved.
+ * Copyright (c) 1998-1999 X-TrueType Server Project, All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $
+ */
+/* $XFree86$ */
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD */
+
+#ifndef _FONTCACHESTR_H_
+#define _FONTCACHESTR_H_
+
+#include <X11/extensions/fontcache.h>
+
+#define FONTCACHENAME "FontCache"
+
+#define FONTCACHE_MAJOR_VERSION 0 /* current version numbers */
+#define FONTCACHE_MINOR_VERSION 1
+
+typedef struct _FontCacheQueryVersion {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheQueryVersion */
+ CARD16 length B16;
+} xFontCacheQueryVersionReq;
+#define sz_xFontCacheQueryVersionReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD16 majorVersion B16; /* major version of Font-Cache */
+ CARD16 minorVersion B16; /* minor version of Font-Cache */
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xFontCacheQueryVersionReply;
+#define sz_xFontCacheQueryVersionReply 32
+
+typedef struct _FontCacheGetCacheSettings {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheGetCacheSettings */
+ CARD16 length B16;
+} xFontCacheGetCacheSettingsReq;
+#define sz_xFontCacheGetCacheSettingsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 himark B32;
+ CARD32 lowmark B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 reserve1 B32;
+ CARD32 reserve2 B32;
+} xFontCacheGetCacheSettingsReply;
+#define sz_xFontCacheGetCacheSettingsReply 32
+
+typedef struct _FontCacheChangeCacheSettings {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheChangeCacheSettings */
+ CARD16 length B16;
+ CARD32 himark B32;
+ CARD32 lowmark B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 reserve1 B32;
+ CARD32 reserve2 B32;
+ CARD32 reserve3 B32;
+} xFontCacheChangeCacheSettingsReq;
+#define sz_xFontCacheChangeCacheSettingsReq 32
+
+typedef struct _FontCacheGetCacheStatistics {
+ CARD8 reqType; /* always FontCacheReqCode */
+ CARD8 fontcacheReqType; /* always X_FontCacheGetCacheStatistics */
+ CARD16 length B16;
+} xFontCacheGetCacheStatisticsReq;
+#define sz_xFontCacheGetCacheStatisticsReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 purge_runs B32;
+ CARD32 purge_stat B32;
+ CARD32 balance B32;
+ CARD32 reserve0 B32;
+ CARD32 f_hits B32;
+ CARD32 f_misshits B32;
+ CARD32 f_purged B32;
+ CARD32 f_usage B32;
+ CARD32 f_reserve0 B32;
+ CARD32 v_hits B32;
+ CARD32 v_misshits B32;
+ CARD32 v_purged B32;
+ CARD32 v_usage B32;
+ CARD32 v_reserve0 B32;
+} xFontCacheGetCacheStatisticsReply;
+#define sz_xFontCacheGetCacheStatisticsReply 64
+
+#endif /* _FONTCACHESTR_H_ */