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