master
ブランチ master
ShaderPlayground / deps / xlibre / include / X11 / fonts / font.h
4.2 KB、168行 生 Blame 履歴
1/***********************************************************
2Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted,
8provided that the above copyright notice appear in all copies and that
9both that copyright notice and this permission notice appear in
10supporting documentation, and that the name of Digital not be
11used in advertising or publicity pertaining to distribution of the
12software without specific, written prior permission.
13
14DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
22******************************************************************/
23
24#ifndef FONT_H
25#define FONT_H
26
27#include <X11/Xfuncproto.h>
28
29#ifndef BitmapFormatByteOrderMask
30#include "fsmasks.h"
31#endif
32
33/* data structures */
34#ifndef _XTYPEDEF_FONTPTR
35typedef struct _Font *FontPtr;
36#define _XTYPEDEF_FONTPTR
37#endif
38
39typedef struct _FontInfo *FontInfoPtr;
40typedef struct _FontProp *FontPropPtr;
41typedef struct _ExtentInfo *ExtentInfoPtr;
42typedef struct _FontPathElement *FontPathElementPtr;
43
44#ifndef _XTYPEDEF_CHARINFOPTR
45typedef struct _CharInfo *CharInfoPtr;
46#define _XTYPEDEF_CHARINFOPTR
47#endif
48
49typedef struct _FontNames *FontNamesPtr;
50typedef struct _FontResolution *FontResolutionPtr;
51
52#define NullCharInfo ((CharInfoPtr) 0)
53#define NullFont ((FontPtr) 0)
54#define NullFontInfo ((FontInfoPtr) 0)
55
56 /* draw direction */
57#define LeftToRight 0
58#define RightToLeft 1
59#define BottomToTop 2
60#define TopToBottom 3
61typedef int DrawDirection;
62
63#define NO_SUCH_CHAR -1
64
65
66#define FontAliasType 0x1000
67
68#define AllocError 80
69#define StillWorking 81
70#define FontNameAlias 82
71#define BadFontName 83
72#define Suspended 84
73#define Successful 85
74#define BadFontPath 86
75#define BadCharRange 87
76#define BadFontFormat 88
77#define FPEResetFailed 89 /* for when an FPE reset won't work */
78
79/* OpenFont flags */
80#define FontLoadInfo 0x0001
81#define FontLoadProps 0x0002
82#define FontLoadMetrics 0x0004
83#define FontLoadBitmaps 0x0008
84#define FontLoadAll 0x000f
85#define FontOpenSync 0x0010
86#define FontReopen 0x0020
87
88/* Query flags */
89#define LoadAll 0x1
90#define FinishRamge 0x2
91#define EightBitFont 0x4
92#define SixteenBitFont 0x8
93
94/* Glyph Caching Modes */
95#define CACHING_OFF 0
96#define CACHE_16_BIT_GLYPHS 1
97#define CACHE_ALL_GLYPHS 2
98#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS
99extern int glyphCachingMode;
100
101struct _Client;
102
103extern int StartListFontsWithInfo(
104 struct _Client * /*client*/,
105 int /*length*/,
106 unsigned char * /*pattern*/,
107 int /*max_names*/
108);
109
110extern FontNamesPtr MakeFontNamesRecord(
111 unsigned /* size */
112);
113
114extern void FreeFontNames(
115 FontNamesPtr /* pFN*/
116);
117
118extern int AddFontNamesName(
119 FontNamesPtr /* names */,
120 char * /* name */,
121 int /* length */
122);
123
124#if 0 /* unused */
125extern int FontToFSError();
126extern FontResolutionPtr GetClientResolution();
127#endif
128
129typedef struct _FontPatternCache *FontPatternCachePtr;
130
131extern FontPatternCachePtr MakeFontPatternCache (
132 void
133);
134
135extern void FreeFontPatternCache (
136 FontPatternCachePtr /* cache */
137);
138
139extern void EmptyFontPatternCache (
140 FontPatternCachePtr /* cache */
141);
142
143extern void CacheFontPattern (
144 FontPatternCachePtr /* cache */,
145 const char * /* pattern */,
146 int /* patlen */,
147 FontPtr /* pFont */
148);
149extern _X_EXPORT FontResolutionPtr GetClientResolutions(
150 int * /* num */
151);
152
153extern FontPtr FindCachedFontPattern (
154 FontPatternCachePtr /* cache */,
155 const char * /* pattern */,
156 int /* patlen */
157);
158
159extern void RemoveCachedFontPattern (
160 FontPatternCachePtr /* cache */,
161 FontPtr /* pFont */
162);
163
164typedef enum {
165 Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit
166} FontEncoding;
167
168#endif /* FONT_H */