Imported Upstream version 1.15.1
[deb_xorg-server.git] / include / dixfont.h
1 /***********************************************************
2 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
3
4 All Rights Reserved
5
6 Permission to use, copy, modify, and distribute this software and its
7 documentation for any purpose and without fee is hereby granted,
8 provided that the above copyright notice appear in all copies and that
9 both that copyright notice and this permission notice appear in
10 supporting documentation, and that the name of Digital not be
11 used in advertising or publicity pertaining to distribution of the
12 software without specific, written prior permission.
13
14 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
15 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
16 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
17 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
19 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20 SOFTWARE.
21
22 ******************************************************************/
23
24 #ifndef DIXFONT_H
25 #define DIXFONT_H 1
26
27 #include "dix.h"
28 #include <X11/fonts/font.h>
29 #include "closure.h"
30 #include <X11/fonts/fontstruct.h>
31 #include <X11/fonts/fontproto.h>
32
33 #define NullDIXFontProp ((DIXFontPropPtr)0)
34
35 typedef struct _DIXFontProp *DIXFontPropPtr;
36
37 extern _X_EXPORT Bool SetDefaultFont(char * /*defaultfontname */ );
38
39 extern _X_EXPORT void QueueFontWakeup(FontPathElementPtr /*fpe */ );
40
41 extern _X_EXPORT void RemoveFontWakeup(FontPathElementPtr /*fpe */ );
42
43 extern _X_EXPORT void FontWakeup(pointer /*data */ ,
44 int /*count */ ,
45 pointer /*LastSelectMask */ );
46
47 extern _X_EXPORT int OpenFont(ClientPtr /*client */ ,
48 XID /*fid */ ,
49 Mask /*flags */ ,
50 unsigned /*lenfname */ ,
51 char * /*pfontname */ );
52
53 extern _X_EXPORT int CloseFont(pointer /*pfont */ ,
54 XID /*fid */ );
55
56 typedef struct _xQueryFontReply *xQueryFontReplyPtr;
57
58 extern _X_EXPORT void QueryFont(FontPtr /*pFont */ ,
59 xQueryFontReplyPtr /*pReply */ ,
60 int /*nProtoCCIStructs */ );
61
62 extern _X_EXPORT int ListFonts(ClientPtr /*client */ ,
63 unsigned char * /*pattern */ ,
64 unsigned int /*length */ ,
65 unsigned int /*max_names */ );
66
67 extern _X_EXPORT int
68 doListFontsWithInfo(ClientPtr /*client */ ,
69 LFWIclosurePtr /*c */ );
70
71 extern _X_EXPORT int doPolyText(ClientPtr /*client */ ,
72 PTclosurePtr /*c */
73 );
74
75 extern _X_EXPORT int PolyText(ClientPtr /*client */ ,
76 DrawablePtr /*pDraw */ ,
77 GCPtr /*pGC */ ,
78 unsigned char * /*pElt */ ,
79 unsigned char * /*endReq */ ,
80 int /*xorg */ ,
81 int /*yorg */ ,
82 int /*reqType */ ,
83 XID /*did */ );
84
85 extern _X_EXPORT int doImageText(ClientPtr /*client */ ,
86 ITclosurePtr /*c */ );
87
88 extern _X_EXPORT int ImageText(ClientPtr /*client */ ,
89 DrawablePtr /*pDraw */ ,
90 GCPtr /*pGC */ ,
91 int /*nChars */ ,
92 unsigned char * /*data */ ,
93 int /*xorg */ ,
94 int /*yorg */ ,
95 int /*reqType */ ,
96 XID /*did */ );
97
98 extern _X_EXPORT int SetFontPath(ClientPtr /*client */ ,
99 int /*npaths */ ,
100 unsigned char * /*paths */ );
101
102 extern _X_EXPORT int SetDefaultFontPath(char * /*path */ );
103
104 extern _X_EXPORT int GetFontPath(ClientPtr client,
105 int *count,
106 int *length, unsigned char **result);
107
108 extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ );
109
110 /* Quartz support on Mac OS X pulls in the QuickDraw
111 framework whose InitFonts function conflicts here. */
112 #ifdef __APPLE__
113 #define InitFonts Darwin_X_InitFonts
114 #endif
115 extern _X_EXPORT void InitFonts(void);
116
117 extern _X_EXPORT void FreeFonts(void);
118
119 extern _X_EXPORT FontPtr find_old_font(XID /*id */ );
120
121 #define GetGlyphs dixGetGlyphs
122 extern _X_EXPORT void dixGetGlyphs(FontPtr /*font */ ,
123 unsigned long /*count */ ,
124 unsigned char * /*chars */ ,
125 FontEncoding /*fontEncoding */ ,
126 unsigned long * /*glyphcount */ ,
127 CharInfoPtr * /*glyphs */ );
128
129 extern _X_EXPORT void QueryGlyphExtents(FontPtr /*pFont */ ,
130 CharInfoPtr * /*charinfo */ ,
131 unsigned long /*count */ ,
132 ExtentInfoPtr /*info */ );
133
134 extern _X_EXPORT Bool QueryTextExtents(FontPtr /*pFont */ ,
135 unsigned long /*count */ ,
136 unsigned char * /*chars */ ,
137 ExtentInfoPtr /*info */ );
138
139 extern _X_EXPORT Bool ParseGlyphCachingMode(char * /*str */ );
140
141 extern _X_EXPORT void InitGlyphCaching(void);
142
143 extern _X_EXPORT void SetGlyphCachingMode(int /*newmode */ );
144
145 extern _X_EXPORT void register_fpe_functions(void);
146
147 #endif /* DIXFONT_H */