closestr.h revision 9ace9065
1/*
2
3Copyright 1991, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included
12in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall
23not be used in advertising or otherwise to promote the sale, use or
24other dealings in this Software without prior written authorization
25from 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
43typedef 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
62typedef 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
71typedef 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
86typedef 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
100typedef struct _PTclosure {
101    ClientPtr		client;
102    DrawablePtr		pDraw;
103    GC			*pGC;
104    unsigned char	*pElt;
105    unsigned char	*endReq;
106    unsigned char	*data;
107    int			xorg;
108    int			yorg;
109    CARD8		reqType;
110    XID			did;
111    int			err;
112} PTclosureRec;
113
114/* ImageText */
115
116typedef struct _ITclosure {
117    ClientPtr		client;
118    DrawablePtr		pDraw;
119    GC			*pGC;
120    BYTE		nChars;
121    unsigned char	*data;
122    int			xorg;
123    int			yorg;
124    CARD8		reqType;
125    XID			did;
126} ITclosureRec;
127#endif				/* CLOSESTR_H */
128