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 |
|
---|
30 | #ifndef CLOSESTR_H
|
---|
31 | #define CLOSESTR_H
|
---|
32 |
|
---|
33 | #include <X11/Xproto.h>
|
---|
34 | #include "closure.h"
|
---|
35 | #include "dix.h"
|
---|
36 | #include "misc.h"
|
---|
37 | #include "gcstruct.h"
|
---|
38 |
|
---|
39 | /* closure structures */
|
---|
40 |
|
---|
41 | /* OpenFont */
|
---|
42 |
|
---|
43 | typedef struct _OFclosure {
|
---|
44 | ClientPtr client;
|
---|
45 | short current_fpe;
|
---|
46 | short num_fpes;
|
---|
47 | FontPathElementPtr *fpe_list;
|
---|
48 | Mask flags;
|
---|
49 | Bool slept;
|
---|
50 |
|
---|
51 | /* XXX -- get these from request buffer instead? */
|
---|
52 | char *origFontName;
|
---|
53 | int origFontNameLen;
|
---|
54 | XID fontid;
|
---|
55 | char *fontname;
|
---|
56 | int fnamelen;
|
---|
57 | FontPtr non_cachable_font;
|
---|
58 | } OFclosureRec;
|
---|
59 |
|
---|
60 | /* ListFontsWithInfo */
|
---|
61 |
|
---|
62 | #define XLFDMAXFONTNAMELEN 256
|
---|
63 | typedef struct _LFWIstate {
|
---|
64 | char pattern[XLFDMAXFONTNAMELEN];
|
---|
65 | int patlen;
|
---|
66 | int current_fpe;
|
---|
67 | int max_names;
|
---|
68 | Bool list_started;
|
---|
69 | pointer private;
|
---|
70 | } LFWIstateRec, *LFWIstatePtr;
|
---|
71 |
|
---|
72 | typedef struct _LFWIclosure {
|
---|
73 | ClientPtr client;
|
---|
74 | int num_fpes;
|
---|
75 | FontPathElementPtr *fpe_list;
|
---|
76 | xListFontsWithInfoReply *reply;
|
---|
77 | int length;
|
---|
78 | LFWIstateRec current;
|
---|
79 | LFWIstateRec saved;
|
---|
80 | int savedNumFonts;
|
---|
81 | Bool haveSaved;
|
---|
82 | Bool slept;
|
---|
83 | char *savedName;
|
---|
84 | } LFWIclosureRec;
|
---|
85 |
|
---|
86 | /* ListFonts */
|
---|
87 |
|
---|
88 | typedef struct _LFclosure {
|
---|
89 | ClientPtr client;
|
---|
90 | int num_fpes;
|
---|
91 | FontPathElementPtr *fpe_list;
|
---|
92 | FontNamesPtr names;
|
---|
93 | LFWIstateRec current;
|
---|
94 | LFWIstateRec saved;
|
---|
95 | Bool haveSaved;
|
---|
96 | Bool slept;
|
---|
97 | char *savedName;
|
---|
98 | int savedNameLen;
|
---|
99 | } LFclosureRec;
|
---|
100 |
|
---|
101 | /* PolyText */
|
---|
102 |
|
---|
103 | typedef
|
---|
104 | int (* PolyTextPtr)(
|
---|
105 | DrawablePtr /* pDraw */,
|
---|
106 | GCPtr /* pGC */,
|
---|
107 | int /* x */,
|
---|
108 | int /* y */,
|
---|
109 | int /* count */,
|
---|
110 | void * /* chars or shorts */
|
---|
111 | );
|
---|
112 |
|
---|
113 | typedef struct _PTclosure {
|
---|
114 | ClientPtr client;
|
---|
115 | DrawablePtr pDraw;
|
---|
116 | GC *pGC;
|
---|
117 | unsigned char *pElt;
|
---|
118 | unsigned char *endReq;
|
---|
119 | unsigned char *data;
|
---|
120 | int xorg;
|
---|
121 | int yorg;
|
---|
122 | CARD8 reqType;
|
---|
123 | PolyTextPtr polyText;
|
---|
124 | int itemSize;
|
---|
125 | XID did;
|
---|
126 | int err;
|
---|
127 | Bool slept;
|
---|
128 | } PTclosureRec;
|
---|
129 |
|
---|
130 | /* ImageText */
|
---|
131 |
|
---|
132 | typedef
|
---|
133 | void (* ImageTextPtr)(
|
---|
134 | DrawablePtr /* pDraw */,
|
---|
135 | GCPtr /* pGC */,
|
---|
136 | int /* x */,
|
---|
137 | int /* y */,
|
---|
138 | int /* count */,
|
---|
139 | void * /* chars or shorts */
|
---|
140 | );
|
---|
141 |
|
---|
142 | typedef struct _ITclosure {
|
---|
143 | ClientPtr client;
|
---|
144 | DrawablePtr pDraw;
|
---|
145 | GC *pGC;
|
---|
146 | BYTE nChars;
|
---|
147 | unsigned char *data;
|
---|
148 | int xorg;
|
---|
149 | int yorg;
|
---|
150 | CARD8 reqType;
|
---|
151 | ImageTextPtr imageText;
|
---|
152 | int itemSize;
|
---|
153 | XID did;
|
---|
154 | Bool slept;
|
---|
155 | } ITclosureRec;
|
---|
156 | #endif /* CLOSESTR_H */
|
---|