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