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(const char * /*defaultfontname */ );
38 
39 extern _X_EXPORT int OpenFont(ClientPtr /*client */ ,
40                               XID /*fid */ ,
41                               Mask /*flags */ ,
42                               unsigned /*lenfname */ ,
43                               const char * /*pfontname */ );
44 
45 extern _X_EXPORT int CloseFont(void *pfont,
46                                XID fid);
47 
48 typedef struct _xQueryFontReply *xQueryFontReplyPtr;
49 
50 extern _X_EXPORT void QueryFont(FontPtr /*pFont */ ,
51                                 xQueryFontReplyPtr /*pReply */ ,
52                                 int /*nProtoCCIStructs */ );
53 
54 extern _X_EXPORT int ListFonts(ClientPtr /*client */ ,
55                                unsigned char * /*pattern */ ,
56                                unsigned int /*length */ ,
57                                unsigned int /*max_names */ );
58 
59 extern _X_EXPORT int PolyText(ClientPtr /*client */ ,
60                               DrawablePtr /*pDraw */ ,
61                               GCPtr /*pGC */ ,
62                               unsigned char * /*pElt */ ,
63                               unsigned char * /*endReq */ ,
64                               int /*xorg */ ,
65                               int /*yorg */ ,
66                               int /*reqType */ ,
67                               XID /*did */ );
68 
69 extern _X_EXPORT int ImageText(ClientPtr /*client */ ,
70                                DrawablePtr /*pDraw */ ,
71                                GCPtr /*pGC */ ,
72                                int /*nChars */ ,
73                                unsigned char * /*data */ ,
74                                int /*xorg */ ,
75                                int /*yorg */ ,
76                                int /*reqType */ ,
77                                XID /*did */ );
78 
79 extern _X_EXPORT int SetFontPath(ClientPtr /*client */ ,
80                                  int /*npaths */ ,
81                                  unsigned char * /*paths */ );
82 
83 extern _X_EXPORT int SetDefaultFontPath(const char * /*path */ );
84 
85 extern _X_EXPORT int GetFontPath(ClientPtr client,
86                                  int *count,
87                                  int *length, unsigned char **result);
88 
89 extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ );
90 
91 /* Quartz support on Mac OS X pulls in the QuickDraw
92    framework whose InitFonts function conflicts here. */
93 #ifdef __APPLE__
94 #define InitFonts Darwin_X_InitFonts
95 #endif
96 extern _X_EXPORT void InitFonts(void);
97 
98 extern _X_EXPORT void FreeFonts(void);
99 
100 extern _X_EXPORT void GetGlyphs(FontPtr /*font */ ,
101                                 unsigned long /*count */ ,
102                                 unsigned char * /*chars */ ,
103                                 FontEncoding /*fontEncoding */ ,
104                                 unsigned long * /*glyphcount */ ,
105                                 CharInfoPtr * /*glyphs */ );
106 
107 #endif                          /* DIXFONT_H */
108