65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncCopyright 1991, 1998 The Open Group
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
65fea56f17cd614bc8908264df980a62e1931468vboxsyncthe above copyright notice appear in all copies and that both that
65fea56f17cd614bc8908264df980a62e1931468vboxsynccopyright notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsyncdocumentation.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncThe above copyright notice and this permission notice shall be included
65fea56f17cd614bc8908264df980a62e1931468vboxsyncin all copies or substantial portions of the Software.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
65fea56f17cd614bc8908264df980a62e1931468vboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65fea56f17cd614bc8908264df980a62e1931468vboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
65fea56f17cd614bc8908264df980a62e1931468vboxsyncIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
65fea56f17cd614bc8908264df980a62e1931468vboxsyncARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsyncOTHER DEALINGS IN THE SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncExcept as contained in this notice, the name of The Open Group shall
65fea56f17cd614bc8908264df980a62e1931468vboxsyncnot be used in advertising or otherwise to promote the sale, use or
65fea56f17cd614bc8908264df980a62e1931468vboxsyncother dealings in this Software without prior written authorization
65fea56f17cd614bc8908264df980a62e1931468vboxsyncfrom The Open Group.
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync*/
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef CLOSESTR_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define CLOSESTR_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/Xproto.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "closure.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "dix.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "misc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "gcstruct.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* closure structures */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* OpenFont */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _OFclosure {
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr client;
65fea56f17cd614bc8908264df980a62e1931468vboxsync short current_fpe;
65fea56f17cd614bc8908264df980a62e1931468vboxsync short num_fpes;
65fea56f17cd614bc8908264df980a62e1931468vboxsync FontPathElementPtr *fpe_list;
65fea56f17cd614bc8908264df980a62e1931468vboxsync Mask flags;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* XXX -- get these from request buffer instead? */
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *origFontName;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int origFontNameLen;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID fontid;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *fontname;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int fnamelen;
65fea56f17cd614bc8908264df980a62e1931468vboxsync FontPtr non_cachable_font;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} OFclosureRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* ListFontsWithInfo */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define XLFDMAXFONTNAMELEN 256
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _LFWIstate {
65fea56f17cd614bc8908264df980a62e1931468vboxsync char pattern[XLFDMAXFONTNAMELEN];
65fea56f17cd614bc8908264df980a62e1931468vboxsync int patlen;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int current_fpe;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int max_names;
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool list_started;
65fea56f17cd614bc8908264df980a62e1931468vboxsync pointer private;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} LFWIstateRec, *LFWIstatePtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _LFWIclosure {
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr client;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int num_fpes;
65fea56f17cd614bc8908264df980a62e1931468vboxsync FontPathElementPtr *fpe_list;
65fea56f17cd614bc8908264df980a62e1931468vboxsync xListFontsWithInfoReply *reply;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int length;
65fea56f17cd614bc8908264df980a62e1931468vboxsync LFWIstateRec current;
65fea56f17cd614bc8908264df980a62e1931468vboxsync LFWIstateRec saved;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int savedNumFonts;
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool haveSaved;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *savedName;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} LFWIclosureRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* ListFonts */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _LFclosure {
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr client;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int num_fpes;
65fea56f17cd614bc8908264df980a62e1931468vboxsync FontPathElementPtr *fpe_list;
65fea56f17cd614bc8908264df980a62e1931468vboxsync FontNamesPtr names;
65fea56f17cd614bc8908264df980a62e1931468vboxsync LFWIstateRec current;
65fea56f17cd614bc8908264df980a62e1931468vboxsync LFWIstateRec saved;
65fea56f17cd614bc8908264df980a62e1931468vboxsync Bool haveSaved;
65fea56f17cd614bc8908264df980a62e1931468vboxsync char *savedName;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int savedNameLen;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} LFclosureRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* PolyText */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _PTclosure {
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr client;
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDraw;
65fea56f17cd614bc8908264df980a62e1931468vboxsync GC *pGC;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char *pElt;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char *endReq;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char *data;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int yorg;
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD8 reqType;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID did;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int err;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} PTclosureRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync/* ImageText */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _ITclosure {
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr client;
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDraw;
65fea56f17cd614bc8908264df980a62e1931468vboxsync GC *pGC;
65fea56f17cd614bc8908264df980a62e1931468vboxsync BYTE nChars;
65fea56f17cd614bc8908264df980a62e1931468vboxsync unsigned char *data;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int xorg;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int yorg;
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD8 reqType;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID did;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} ITclosureRec;
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* CLOSESTR_H */