Imported Upstream version 1.15.1
[deb_xorg-server.git] / include / closestr.h
1 /*
2
3 Copyright 1991, 1998 The Open Group
4
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10
11 The above copyright notice and this permission notice shall be included
12 in all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 OTHER DEALINGS IN THE SOFTWARE.
21
22 Except as contained in this notice, the name of The Open Group shall
23 not be used in advertising or otherwise to promote the sale, use or
24 other dealings in this Software without prior written authorization
25 from The Open Group.
26
27 */
28
29 #ifndef CLOSESTR_H
30 #define CLOSESTR_H
31
32 #include <X11/Xproto.h>
33 #include "closure.h"
34 #include "dix.h"
35 #include "misc.h"
36 #include "gcstruct.h"
37
38 /* closure structures */
39
40 /* OpenFont */
41
42 typedef struct _OFclosure {
43 ClientPtr client;
44 short current_fpe;
45 short num_fpes;
46 FontPathElementPtr *fpe_list;
47 Mask flags;
48
49 /* XXX -- get these from request buffer instead? */
50 char *origFontName;
51 int origFontNameLen;
52 XID fontid;
53 char *fontname;
54 int fnamelen;
55 FontPtr non_cachable_font;
56 } OFclosureRec;
57
58 /* ListFontsWithInfo */
59
60 #define XLFDMAXFONTNAMELEN 256
61 typedef struct _LFWIstate {
62 char pattern[XLFDMAXFONTNAMELEN];
63 int patlen;
64 int current_fpe;
65 int max_names;
66 Bool list_started;
67 pointer private;
68 } LFWIstateRec, *LFWIstatePtr;
69
70 typedef struct _LFWIclosure {
71 ClientPtr client;
72 int num_fpes;
73 FontPathElementPtr *fpe_list;
74 xListFontsWithInfoReply *reply;
75 int length;
76 LFWIstateRec current;
77 LFWIstateRec saved;
78 int savedNumFonts;
79 Bool haveSaved;
80 char *savedName;
81 } LFWIclosureRec;
82
83 /* ListFonts */
84
85 typedef struct _LFclosure {
86 ClientPtr client;
87 int num_fpes;
88 FontPathElementPtr *fpe_list;
89 FontNamesPtr names;
90 LFWIstateRec current;
91 LFWIstateRec saved;
92 Bool haveSaved;
93 char *savedName;
94 int savedNameLen;
95 } LFclosureRec;
96
97 /* PolyText */
98
99 typedef struct _PTclosure {
100 ClientPtr client;
101 DrawablePtr pDraw;
102 GC *pGC;
103 unsigned char *pElt;
104 unsigned char *endReq;
105 unsigned char *data;
106 int xorg;
107 int yorg;
108 CARD8 reqType;
109 XID did;
110 int err;
111 } PTclosureRec;
112
113 /* ImageText */
114
115 typedef struct _ITclosure {
116 ClientPtr client;
117 DrawablePtr pDraw;
118 GC *pGC;
119 BYTE nChars;
120 unsigned char *data;
121 int xorg;
122 int yorg;
123 CARD8 reqType;
124 XID did;
125 } ITclosureRec;
126 #endif /* CLOSESTR_H */