closestr.h revision 05b261ec
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 3005b261ecSmrg#ifndef CLOSESTR_H 3105b261ecSmrg#define CLOSESTR_H 3205b261ecSmrg 3305b261ecSmrg#define NEED_REPLIES 3405b261ecSmrg#include <X11/Xproto.h> 3505b261ecSmrg#include "closure.h" 3605b261ecSmrg#include "dix.h" 3705b261ecSmrg#include "misc.h" 3805b261ecSmrg#include "gcstruct.h" 3905b261ecSmrg 4005b261ecSmrg/* closure structures */ 4105b261ecSmrg 4205b261ecSmrg/* OpenFont */ 4305b261ecSmrg 4405b261ecSmrgtypedef struct _OFclosure { 4505b261ecSmrg ClientPtr client; 4605b261ecSmrg short current_fpe; 4705b261ecSmrg short num_fpes; 4805b261ecSmrg FontPathElementPtr *fpe_list; 4905b261ecSmrg Mask flags; 5005b261ecSmrg Bool slept; 5105b261ecSmrg 5205b261ecSmrg/* XXX -- get these from request buffer instead? */ 5305b261ecSmrg char *origFontName; 5405b261ecSmrg int origFontNameLen; 5505b261ecSmrg XID fontid; 5605b261ecSmrg char *fontname; 5705b261ecSmrg int fnamelen; 5805b261ecSmrg FontPtr non_cachable_font; 5905b261ecSmrg} OFclosureRec; 6005b261ecSmrg 6105b261ecSmrg/* ListFontsWithInfo */ 6205b261ecSmrg 6305b261ecSmrg#define XLFDMAXFONTNAMELEN 256 6405b261ecSmrgtypedef struct _LFWIstate { 6505b261ecSmrg char pattern[XLFDMAXFONTNAMELEN]; 6605b261ecSmrg int patlen; 6705b261ecSmrg int current_fpe; 6805b261ecSmrg int max_names; 6905b261ecSmrg Bool list_started; 7005b261ecSmrg pointer private; 7105b261ecSmrg} LFWIstateRec, *LFWIstatePtr; 7205b261ecSmrg 7305b261ecSmrgtypedef struct _LFWIclosure { 7405b261ecSmrg ClientPtr client; 7505b261ecSmrg int num_fpes; 7605b261ecSmrg FontPathElementPtr *fpe_list; 7705b261ecSmrg xListFontsWithInfoReply *reply; 7805b261ecSmrg int length; 7905b261ecSmrg LFWIstateRec current; 8005b261ecSmrg LFWIstateRec saved; 8105b261ecSmrg int savedNumFonts; 8205b261ecSmrg Bool haveSaved; 8305b261ecSmrg Bool slept; 8405b261ecSmrg char *savedName; 8505b261ecSmrg} LFWIclosureRec; 8605b261ecSmrg 8705b261ecSmrg/* ListFonts */ 8805b261ecSmrg 8905b261ecSmrgtypedef struct _LFclosure { 9005b261ecSmrg ClientPtr client; 9105b261ecSmrg int num_fpes; 9205b261ecSmrg FontPathElementPtr *fpe_list; 9305b261ecSmrg FontNamesPtr names; 9405b261ecSmrg LFWIstateRec current; 9505b261ecSmrg LFWIstateRec saved; 9605b261ecSmrg Bool haveSaved; 9705b261ecSmrg Bool slept; 9805b261ecSmrg char *savedName; 9905b261ecSmrg int savedNameLen; 10005b261ecSmrg} LFclosureRec; 10105b261ecSmrg 10205b261ecSmrg/* PolyText */ 10305b261ecSmrg 10405b261ecSmrgtypedef 10505b261ecSmrg int (* PolyTextPtr)( 10605b261ecSmrg DrawablePtr /* pDraw */, 10705b261ecSmrg GCPtr /* pGC */, 10805b261ecSmrg int /* x */, 10905b261ecSmrg int /* y */, 11005b261ecSmrg int /* count */, 11105b261ecSmrg void * /* chars or shorts */ 11205b261ecSmrg ); 11305b261ecSmrg 11405b261ecSmrgtypedef struct _PTclosure { 11505b261ecSmrg ClientPtr client; 11605b261ecSmrg DrawablePtr pDraw; 11705b261ecSmrg GC *pGC; 11805b261ecSmrg unsigned char *pElt; 11905b261ecSmrg unsigned char *endReq; 12005b261ecSmrg unsigned char *data; 12105b261ecSmrg int xorg; 12205b261ecSmrg int yorg; 12305b261ecSmrg CARD8 reqType; 12405b261ecSmrg PolyTextPtr polyText; 12505b261ecSmrg int itemSize; 12605b261ecSmrg XID did; 12705b261ecSmrg int err; 12805b261ecSmrg Bool slept; 12905b261ecSmrg} PTclosureRec; 13005b261ecSmrg 13105b261ecSmrg/* ImageText */ 13205b261ecSmrg 13305b261ecSmrgtypedef 13405b261ecSmrg void (* ImageTextPtr)( 13505b261ecSmrg DrawablePtr /* pDraw */, 13605b261ecSmrg GCPtr /* pGC */, 13705b261ecSmrg int /* x */, 13805b261ecSmrg int /* y */, 13905b261ecSmrg int /* count */, 14005b261ecSmrg void * /* chars or shorts */ 14105b261ecSmrg ); 14205b261ecSmrg 14305b261ecSmrgtypedef struct _ITclosure { 14405b261ecSmrg ClientPtr client; 14505b261ecSmrg DrawablePtr pDraw; 14605b261ecSmrg GC *pGC; 14705b261ecSmrg BYTE nChars; 14805b261ecSmrg unsigned char *data; 14905b261ecSmrg int xorg; 15005b261ecSmrg int yorg; 15105b261ecSmrg CARD8 reqType; 15205b261ecSmrg ImageTextPtr imageText; 15305b261ecSmrg int itemSize; 15405b261ecSmrg XID did; 15505b261ecSmrg Bool slept; 15605b261ecSmrg} ITclosureRec; 15705b261ecSmrg#endif /* CLOSESTR_H */ 158