1/*
2Copyright 1987, 1998  The Open Group
3
4Permission to use, copy, modify, distribute, and sell this software and its
5documentation for any purpose is hereby granted without fee, provided that
6the above copyright notice appear in all copies and that both that
7copyright notice and this permission notice appear in supporting
8documentation.
9
10The above copyright notice and this permission notice shall be included in
11all copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
16OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20Except as contained in this notice, the name of The Open Group shall not be
21used in advertising or otherwise to promote the sale, use or other dealings
22in this Software without prior written authorization from The Open Group.
23 * Copyright 1990, 1991 Network Computing Devices;
24 * Portions Copyright 1987 by Digital Equipment Corporation
25 *
26 * Permission to use, copy, modify, distribute, and sell this software and its
27 * documentation for any purpose is hereby granted without fee, provided that
28 * the above copyright notice appear in all copies and that both that
29 * copyright notice and this permission notice appear in supporting
30 * documentation, and that the names of Network Computing Devices,
31 * or Digital not be used in advertising or
32 * publicity pertaining to distribution of the software without specific,
33 * written prior permission.  Network Computing Devices, or Digital
34 * make no representations about the
35 * suitability of this software for any purpose.  It is provided "as is"
36 * without express or implied warranty.
37 *
38 * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
39 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR DIGITAL BE
41 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
42 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
43 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
44 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
45 *
46 */
47
48#ifndef CLOSESTR_H
49#define CLOSESTR_H
50
51#include	<X11/fonts/FSproto.h>
52#include	"closure.h"
53#include	"misc.h"
54#include	<X11/fonts/font.h>
55
56/* closure structures */
57
58/* OpenFont */
59
60typedef struct _OFclosure {
61    ClientPtr   client;
62    short       current_fpe;
63    short       num_fpes;
64    FontPathElementPtr *fpe_list;
65    Mask        flags;
66    fsBitmapFormat format;
67    fsBitmapFormatMask format_mask;
68    Bool        slept;
69    FSID        fontid;
70    char       *fontname;
71    int         fnamelen;
72    char       *orig_name;
73    int         orig_len;
74    FontPtr	non_cachable_font;
75}           OFclosureRec;
76
77/* QueryExtents */
78
79typedef struct _QEclosure {
80    ClientPtr   client;
81    int         nranges;
82    fsRange    *range;
83    FontPtr     pfont;
84    Mask        flags;
85    Bool        slept;
86}           QEclosureRec;
87
88/* QueryBitmaps */
89
90typedef struct _QBclosure {
91    ClientPtr   client;
92    int         nranges;
93    fsRange    *range;
94    FontPtr     pfont;
95    fsBitmapFormat format;
96    Mask        flags;
97    Bool        slept;
98}           QBclosureRec;
99
100/* ListFontsWithInfo */
101
102#define XLFDMAXFONTNAMELEN	256
103typedef struct _LFWIstate {
104    char        pattern[XLFDMAXFONTNAMELEN];  /* max len of font name */
105    int         patlen;
106    int         current_fpe;
107    int         max_names;
108    Bool        list_started;
109    pointer     private;
110}           LFWIstateRec, *LFWIstatePtr;
111
112
113typedef struct _LFWXIclosure {
114    ClientPtr   client;
115    int         num_fpes;
116    FontPathElementPtr *fpe_list;
117    fsListFontsWithXInfoReply *reply;
118    int         length;
119    LFWIstateRec current;
120    LFWIstateRec saved;
121    int         savedNumFonts;
122    Bool        haveSaved;
123    Bool        slept;
124    char       *savedName;
125}           LFWXIclosureRec;
126
127typedef struct _LFclosure {
128    ClientPtr   client;
129    int         num_fpes;
130    FontPathElementPtr *fpe_list;
131    FontNamesPtr names;
132    LFWIstateRec current;
133    LFWIstateRec saved;
134    Bool        haveSaved;
135    Bool        slept;
136    char	*savedName;
137    int		savedNameLen;
138}	LFclosureRec;
139
140#endif				/* CLOSESTR_H */
141