105b261ecSmrg/*
205b261ecSmrg
305b261ecSmrgCopyright 1991, 1998  The Open Group
405b261ecSmrg
505b261ecSmrgPermission to use, copy, modify, distribute, and sell this software and its
605b261ecSmrgdocumentation for any purpose is hereby granted without fee, provided that
705b261ecSmrgthe above copyright notice appear in all copies and that both that
805b261ecSmrgcopyright notice and this permission notice appear in supporting
905b261ecSmrgdocumentation.
1005b261ecSmrg
1105b261ecSmrgThe above copyright notice and this permission notice shall be included
1205b261ecSmrgin all copies or substantial portions of the Software.
1305b261ecSmrg
1405b261ecSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1505b261ecSmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1605b261ecSmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1705b261ecSmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1805b261ecSmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1905b261ecSmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2005b261ecSmrgOTHER DEALINGS IN THE SOFTWARE.
2105b261ecSmrg
2205b261ecSmrgExcept as contained in this notice, the name of The Open Group shall
2305b261ecSmrgnot be used in advertising or otherwise to promote the sale, use or
2405b261ecSmrgother dealings in this Software without prior written authorization
2505b261ecSmrgfrom The Open Group.
2605b261ecSmrg
2705b261ecSmrg*/
2805b261ecSmrg
2905b261ecSmrg#ifndef CLOSESTR_H
3005b261ecSmrg#define CLOSESTR_H
3105b261ecSmrg
3205b261ecSmrg#include <X11/Xproto.h>
3305b261ecSmrg#include "closure.h"
3405b261ecSmrg#include "dix.h"
3505b261ecSmrg#include "misc.h"
3605b261ecSmrg#include "gcstruct.h"
3705b261ecSmrg
3805b261ecSmrg/* closure structures */
3905b261ecSmrg
4005b261ecSmrg/* OpenFont */
4105b261ecSmrg
4205b261ecSmrgtypedef struct _OFclosure {
4335c4bbdfSmrg    ClientPtr client;
4435c4bbdfSmrg    short current_fpe;
4535c4bbdfSmrg    short num_fpes;
4605b261ecSmrg    FontPathElementPtr *fpe_list;
4735c4bbdfSmrg    Mask flags;
4805b261ecSmrg
4905b261ecSmrg/* XXX -- get these from request buffer instead? */
5035c4bbdfSmrg    const char *origFontName;
5135c4bbdfSmrg    int origFontNameLen;
5235c4bbdfSmrg    XID fontid;
5335c4bbdfSmrg    char *fontname;
5435c4bbdfSmrg    int fnamelen;
5535c4bbdfSmrg    FontPtr non_cachable_font;
5635c4bbdfSmrg} OFclosureRec;
5705b261ecSmrg
5805b261ecSmrg/* ListFontsWithInfo */
5905b261ecSmrg
6005b261ecSmrg#define XLFDMAXFONTNAMELEN	256
6105b261ecSmrgtypedef struct _LFWIstate {
6235c4bbdfSmrg    char pattern[XLFDMAXFONTNAMELEN];
6335c4bbdfSmrg    int patlen;
6435c4bbdfSmrg    int current_fpe;
6535c4bbdfSmrg    int max_names;
6635c4bbdfSmrg    Bool list_started;
6735c4bbdfSmrg    void *private;
6805b261ecSmrg} LFWIstateRec, *LFWIstatePtr;
6905b261ecSmrg
7005b261ecSmrgtypedef struct _LFWIclosure {
7135c4bbdfSmrg    ClientPtr client;
7235c4bbdfSmrg    int num_fpes;
7335c4bbdfSmrg    FontPathElementPtr *fpe_list;
7405b261ecSmrg    xListFontsWithInfoReply *reply;
7535c4bbdfSmrg    int length;
7635c4bbdfSmrg    LFWIstateRec current;
7735c4bbdfSmrg    LFWIstateRec saved;
7835c4bbdfSmrg    int savedNumFonts;
7935c4bbdfSmrg    Bool haveSaved;
8035c4bbdfSmrg    char *savedName;
8105b261ecSmrg} LFWIclosureRec;
8205b261ecSmrg
8305b261ecSmrg/* ListFonts */
8405b261ecSmrg
8505b261ecSmrgtypedef struct _LFclosure {
8635c4bbdfSmrg    ClientPtr client;
8735c4bbdfSmrg    int num_fpes;
8805b261ecSmrg    FontPathElementPtr *fpe_list;
8905b261ecSmrg    FontNamesPtr names;
9005b261ecSmrg    LFWIstateRec current;
9105b261ecSmrg    LFWIstateRec saved;
9235c4bbdfSmrg    Bool haveSaved;
9335c4bbdfSmrg    char *savedName;
9435c4bbdfSmrg    int savedNameLen;
9535c4bbdfSmrg} LFclosureRec;
9605b261ecSmrg
9705b261ecSmrg/* PolyText */
9805b261ecSmrg
9905b261ecSmrgtypedef struct _PTclosure {
10035c4bbdfSmrg    ClientPtr client;
10135c4bbdfSmrg    DrawablePtr pDraw;
10235c4bbdfSmrg    GC *pGC;
10335c4bbdfSmrg    unsigned char *pElt;
10435c4bbdfSmrg    unsigned char *endReq;
10535c4bbdfSmrg    unsigned char *data;
10635c4bbdfSmrg    int xorg;
10735c4bbdfSmrg    int yorg;
10835c4bbdfSmrg    CARD8 reqType;
10935c4bbdfSmrg    XID did;
11035c4bbdfSmrg    int err;
11105b261ecSmrg} PTclosureRec;
11205b261ecSmrg
11305b261ecSmrg/* ImageText */
11405b261ecSmrg
11505b261ecSmrgtypedef struct _ITclosure {
11635c4bbdfSmrg    ClientPtr client;
11735c4bbdfSmrg    DrawablePtr pDraw;
11835c4bbdfSmrg    GC *pGC;
11935c4bbdfSmrg    BYTE nChars;
12035c4bbdfSmrg    unsigned char *data;
12135c4bbdfSmrg    int xorg;
12235c4bbdfSmrg    int yorg;
12335c4bbdfSmrg    CARD8 reqType;
12435c4bbdfSmrg    XID did;
12505b261ecSmrg} ITclosureRec;
12635c4bbdfSmrg#endif                          /* CLOSESTR_H */
127