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