]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/include/dixfont.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / programs / Xserver / include / dixfont.h
1 /* $XConsortium: dixfont.h /main/21 1996/09/28 17:14:16 rws $ */
2 /* $XFree86: xc/programs/Xserver/include/dixfont.h,v 3.1 1996/12/23 07:09:25 dawes Exp $ */
3 /***********************************************************
4 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
5
6                         All Rights Reserved
7
8 Permission to use, copy, modify, and distribute this software and its
9 documentation for any purpose and without fee is hereby granted,
10 provided that the above copyright notice appear in all copies and that
11 both that copyright notice and this permission notice appear in
12 supporting documentation, and that the name of Digital not be
13 used in advertising or publicity pertaining to distribution of the
14 software without specific, written prior permission.
15
16 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 SOFTWARE.
23
24 ******************************************************************/
25
26 #ifndef DIXFONT_H
27 #define DIXFONT_H 1
28
29 #include <dix.h>
30 #include <font.h>
31 #include <closure.h>
32
33 #define NullDIXFontProp ((DIXFontPropPtr)0)
34
35 typedef struct _DIXFontProp *DIXFontPropPtr;
36
37 extern int FontToXError(
38 #if NeedFunctionPrototypes
39     int /*err*/
40 #endif
41 );
42
43 extern Bool SetDefaultFont(
44 #if NeedFunctionPrototypes
45     char * /*defaultfontname*/
46 #endif
47 );
48
49 extern void QueueFontWakeup(
50 #if NeedFunctionPrototypes
51     FontPathElementPtr /*fpe*/
52 #endif
53 );
54
55 extern void RemoveFontWakeup(
56 #if NeedFunctionPrototypes
57     FontPathElementPtr /*fpe*/
58 #endif
59 );
60
61 extern void FontWakeup(
62 #if NeedFunctionPrototypes
63     pointer /*data*/,
64     int /*count*/,
65     pointer /*LastSelectMask*/
66 #endif
67 );
68
69 extern int OpenFont(
70 #if NeedFunctionPrototypes
71     ClientPtr /*client*/,
72     XID /*fid*/,
73     Mask /*flags*/,
74     unsigned /*lenfname*/,
75     char * /*pfontname*/
76 #endif
77 );
78
79 extern int CloseFont(
80 #if NeedFunctionPrototypes
81     pointer /*pfont*/,
82     XID /*fid*/
83 #endif
84 );
85
86 typedef struct _xQueryFontReply *xQueryFontReplyPtr;
87
88 extern void QueryFont(
89 #if NeedFunctionPrototypes
90     FontPtr /*pFont*/,
91     xQueryFontReplyPtr /*pReply*/,
92     int /*nProtoCCIStructs*/
93 #endif
94 );
95
96 extern int ListFonts(
97 #if NeedFunctionPrototypes
98     ClientPtr /*client*/,
99     unsigned char * /*pattern*/,
100     unsigned int /*length*/,
101     unsigned int /*max_names*/
102 #endif
103 );
104
105 int
106 doListFontsWithInfo(
107 #if NeedFunctionPrototypes
108     ClientPtr /*client*/,
109     LFWIclosurePtr /*c*/
110 #endif
111 );
112
113 extern int doPolyText(
114 #if NeedFunctionPrototypes
115     ClientPtr /*client*/,
116     PTclosurePtr /*c*/
117 #endif
118 );
119
120 extern int PolyText(
121 #if NeedFunctionPrototypes
122     ClientPtr /*client*/,
123     DrawablePtr /*pDraw*/,
124     GCPtr /*pGC*/,
125     unsigned char * /*pElt*/,
126     unsigned char * /*endReq*/,
127     int /*xorg*/,
128     int /*yorg*/,
129     int /*reqType*/,
130     XID /*did*/
131 #endif
132 );
133
134 extern int doImageText(
135 #if NeedFunctionPrototypes
136     ClientPtr /*client*/,
137     ITclosurePtr /*c*/
138 #endif
139 );
140
141 extern int ImageText(
142 #if NeedFunctionPrototypes
143     ClientPtr /*client*/,
144     DrawablePtr /*pDraw*/,
145     GCPtr /*pGC*/,
146     int /*nChars*/,
147     unsigned char * /*data*/,
148     int /*xorg*/,
149     int /*yorg*/,
150     int /*reqType*/,
151     XID /*did*/
152 #endif
153 );
154
155 extern int SetFontPath(
156 #if NeedFunctionPrototypes
157     ClientPtr /*client*/,
158     int /*npaths*/,
159     unsigned char * /*paths*/,
160     int * /*error*/
161 #endif
162 );
163
164 extern int SetDefaultFontPath(
165 #if NeedFunctionPrototypes
166     char * /*path*/
167 #endif
168 );
169
170 extern unsigned char *GetFontPath(
171 #if NeedFunctionPrototypes
172     int * /*count*/,
173     int * /*length*/
174 #endif
175 );
176
177 extern int LoadGlyphs(
178 #if NeedFunctionPrototypes
179     ClientPtr /*client*/,
180     FontPtr /*pfont*/,
181     unsigned /*nchars*/,
182     int /*item_size*/,
183     unsigned char * /*data*/
184 #endif
185 );
186
187 extern void DeleteClientFontStuff(
188 #if NeedFunctionPrototypes
189     ClientPtr /*client*/
190 #endif
191 );
192
193 extern void InitFonts(
194 #if NeedFunctionPrototypes
195     void
196 #endif
197 );
198
199 extern int GetDefaultPointSize(
200 #if NeedFunctionPrototypes
201     void
202 #endif
203 );
204
205 extern FontResolutionPtr GetClientResolutions(
206 #if NeedFunctionPrototypes
207     int * /*num*/
208 #endif
209 );
210
211 /* This is related to 'struct _FPEFunctions' in fonts/include/fontstruct.h
212  */
213 extern int RegisterFPEFunctions(
214 #if NeedFunctionPrototypes
215     int (* /*name_func*/)(
216 #if NeedNestedPrototypes
217                 char* /* name */
218 #endif
219                 ),
220     int (* /*init_func*/)(
221 #if NeedNestedPrototypes
222                 FontPathElementPtr /* fpe */
223 #endif
224                 ),
225     int (* /*free_func*/)(
226 #if NeedNestedPrototypes
227                 FontPathElementPtr /* fpe */
228 #endif
229                 ),
230     int (* /*reset_func*/)(
231 #if NeedNestedPrototypes
232                 FontPathElementPtr /* fpe */
233 #endif
234                 ),
235     int (* /*open_func*/)(
236 #if NeedNestedPrototypes
237                 pointer /* client */,
238                 FontPathElementPtr /* fpe */,
239                 int /* flags */,
240                 char* /* name */,
241                 int /* namelen */,
242                 fsBitmapFormat /* format */,
243                 fsBitmapFormatMask /* fmask */,
244                 unsigned long /* id (type XID or FSID) */,
245                 FontPtr* /* pFont */,
246                 char** /* aliasName */,
247                 FontPtr /* non_cachable_font */
248 #endif
249                 ),
250     int (* /*close_func*/)(
251 #if NeedNestedPrototypes
252                 FontPathElementPtr /* fpe */,
253                 FontPtr /* pFont */
254 #endif
255                 ),
256     int (* /*list_func*/)(
257 #if NeedNestedPrototypes
258                 pointer /* client */,
259                 FontPathElementPtr /* fpe */,
260                 char* /* pat */,
261                 int /* len */,
262                 int /* max */,
263                 FontNamesPtr /* names */
264 #endif
265                 ),
266     int (* /*start_lfwi_func*/)(
267 #if NeedNestedPrototypes
268                 pointer /* client */,
269                 FontPathElementPtr /* fpe */,
270                 char* /* pat */,
271                 int /* patlen */,
272                 int /* maxnames */,
273                 pointer* /* privatep */
274 #endif
275                 ),
276     int (* /*next_lfwi_func*/)(
277 #if NeedNestedPrototypes
278                 pointer /* client */,
279                 FontPathElementPtr /* fpe */,
280                 char** /* name */,
281                 int* /* namelen */,
282                 FontInfoPtr* /* info */,
283                 int* /* numFonts */,
284                 pointer /* private */
285 #endif
286                 ),
287     int (* /*wakeup_func*/)(
288 #if NeedNestedPrototypes
289                 FontPathElementPtr /* fpe */,
290                 unsigned long* /* LastSelectMask */
291 #endif
292                 ),
293     int (* /*client_died*/)(
294 #if NeedNestedPrototypes
295                 pointer /* client */,
296                 FontPathElementPtr /* fpe */
297 #endif
298                 ),
299     int (* /*load_glyphs*/)(
300 #if NeedNestedPrototypes
301                 pointer /* client */,
302                 FontPtr /* pfont */,
303                 Bool /* range_flag */,
304                 unsigned int /* nchars */,
305                 int /* item_size */,
306                 unsigned char* /* data */
307 #endif
308                 ),
309     int (* /*start_list_alias_func*/)(
310 #if NeedNestedPrototypes
311                 pointer /* client */,
312                 FontPathElementPtr /* fpe */,
313                 char* /* pat */,
314                 int /* len */,
315                 int /* max */,
316                 pointer* /* privatep */
317 #endif
318                 ),
319     int (* /*next_list_alias_func*/)(
320 #if NeedNestedPrototypes
321                 pointer /* client */,
322                 FontPathElementPtr /* fpe */,
323                 char** /* namep */,
324                 int* /* namelenp */,
325                 char** /* resolvedp */,
326                 int* /* resolvedlenp */,
327                 pointer /* private */
328 #endif
329                 ),
330     void (* /* set_path_func*/)(
331 #if NeedFunctionPrototypes
332                 void
333 #endif
334                 )
335 #endif
336 );
337
338 extern void FreeFonts(
339 #if NeedFunctionPrototypes
340     void
341 #endif
342 );
343
344 extern FontPtr find_old_font(
345 #if NeedFunctionPrototypes
346     XID /*id*/
347 #endif
348 );
349
350 extern Font GetNewFontClientID(
351 #if NeedFunctionPrototypes
352     void
353 #endif
354 );
355
356 extern int StoreFontClientFont(
357 #if NeedFunctionPrototypes
358     FontPtr /*pfont*/,
359     Font /*id*/
360 #endif
361 );
362
363 extern void DeleteFontClientID(
364 #if NeedFunctionPrototypes
365     Font /*id*/
366 #endif
367 );
368
369 extern int client_auth_generation(
370 #if NeedFunctionPrototypes
371     ClientPtr /*client*/
372 #endif
373 );
374
375 extern int init_fs_handlers(
376 #if NeedFunctionPrototypes
377     FontPathElementPtr /*fpe*/,
378     BlockHandlerProcPtr /*block_handler*/
379 #endif
380 );
381
382 extern void remove_fs_handlers(
383 #if NeedFunctionPrototypes
384     FontPathElementPtr /*fpe*/,
385     BlockHandlerProcPtr /*block_handler*/,
386     Bool /*all*/
387 #endif
388 );
389
390 extern void GetGlyphs(
391 #if NeedFunctionPrototypes
392     FontPtr     /*font*/,
393     unsigned long /*count*/,
394     unsigned char * /*chars*/,
395     FontEncoding /*fontEncoding*/,
396     unsigned long * /*glyphcount*/,
397     CharInfoPtr * /*glyphs*/
398 #endif
399 );
400
401 extern void QueryGlyphExtents(
402 #if NeedFunctionPrototypes
403     FontPtr     /*pFont*/,
404     CharInfoPtr * /*charinfo*/,
405     unsigned long /*count*/,
406     ExtentInfoPtr /*info*/
407 #endif
408 );
409
410 extern Bool QueryTextExtents(
411 #if NeedFunctionPrototypes
412     FontPtr     /*pFont*/,
413     unsigned long /*count*/,
414     unsigned char * /*chars*/,
415     ExtentInfoPtr /*info*/
416 #endif
417 );
418
419 extern Bool ParseGlyphCachingMode(
420 #if NeedFunctionPrototypes
421     char * /*str*/
422 #endif
423 );
424
425 extern void InitGlyphCaching(
426 #if NeedFunctionPrototypes
427     void
428 #endif
429 );
430
431 extern void SetGlyphCachingMode(
432 #if NeedFunctionPrototypes
433     int /*newmode*/
434 #endif
435 );
436
437 void
438 ResetFontPrivateIndex(
439 #if NeedFunctionPrototypes
440     void
441 #endif
442 );
443
444 #endif                          /* DIXFONT_H */