1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun Copyright 1991, 1998 The Open Group 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun Permission to use, copy, modify, distribute, and sell this software and its 6*4882a593Smuzhiyun documentation for any purpose is hereby granted without fee, provided that 7*4882a593Smuzhiyun the above copyright notice appear in all copies and that both that 8*4882a593Smuzhiyun copyright notice and this permission notice appear in supporting 9*4882a593Smuzhiyun documentation. 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun The above copyright notice and this permission notice shall be included 12*4882a593Smuzhiyun in all copies or substantial portions of the Software. 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15*4882a593Smuzhiyun OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16*4882a593Smuzhiyun MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17*4882a593Smuzhiyun IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*4882a593Smuzhiyun OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*4882a593Smuzhiyun ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*4882a593Smuzhiyun OTHER DEALINGS IN THE SOFTWARE. 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun Except as contained in this notice, the name of The Open Group shall 23*4882a593Smuzhiyun not be used in advertising or otherwise to promote the sale, use or 24*4882a593Smuzhiyun other dealings in this Software without prior written authorization 25*4882a593Smuzhiyun from The Open Group. 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun */ 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun #ifndef CLOSESTR_H 30*4882a593Smuzhiyun #define CLOSESTR_H 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #include <X11/Xproto.h> 33*4882a593Smuzhiyun #include "closure.h" 34*4882a593Smuzhiyun #include "dix.h" 35*4882a593Smuzhiyun #include "misc.h" 36*4882a593Smuzhiyun #include "gcstruct.h" 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun /* closure structures */ 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun /* OpenFont */ 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun typedef struct _OFclosure { 43*4882a593Smuzhiyun ClientPtr client; 44*4882a593Smuzhiyun short current_fpe; 45*4882a593Smuzhiyun short num_fpes; 46*4882a593Smuzhiyun FontPathElementPtr *fpe_list; 47*4882a593Smuzhiyun Mask flags; 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun /* XXX -- get these from request buffer instead? */ 50*4882a593Smuzhiyun const char *origFontName; 51*4882a593Smuzhiyun int origFontNameLen; 52*4882a593Smuzhiyun XID fontid; 53*4882a593Smuzhiyun char *fontname; 54*4882a593Smuzhiyun int fnamelen; 55*4882a593Smuzhiyun FontPtr non_cachable_font; 56*4882a593Smuzhiyun } OFclosureRec; 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun /* ListFontsWithInfo */ 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun #define XLFDMAXFONTNAMELEN 256 61*4882a593Smuzhiyun typedef struct _LFWIstate { 62*4882a593Smuzhiyun char pattern[XLFDMAXFONTNAMELEN]; 63*4882a593Smuzhiyun int patlen; 64*4882a593Smuzhiyun int current_fpe; 65*4882a593Smuzhiyun int max_names; 66*4882a593Smuzhiyun Bool list_started; 67*4882a593Smuzhiyun void *private; 68*4882a593Smuzhiyun } LFWIstateRec, *LFWIstatePtr; 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun typedef struct _LFWIclosure { 71*4882a593Smuzhiyun ClientPtr client; 72*4882a593Smuzhiyun int num_fpes; 73*4882a593Smuzhiyun FontPathElementPtr *fpe_list; 74*4882a593Smuzhiyun xListFontsWithInfoReply *reply; 75*4882a593Smuzhiyun int length; 76*4882a593Smuzhiyun LFWIstateRec current; 77*4882a593Smuzhiyun LFWIstateRec saved; 78*4882a593Smuzhiyun int savedNumFonts; 79*4882a593Smuzhiyun Bool haveSaved; 80*4882a593Smuzhiyun char *savedName; 81*4882a593Smuzhiyun } LFWIclosureRec; 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun /* ListFonts */ 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun typedef struct _LFclosure { 86*4882a593Smuzhiyun ClientPtr client; 87*4882a593Smuzhiyun int num_fpes; 88*4882a593Smuzhiyun FontPathElementPtr *fpe_list; 89*4882a593Smuzhiyun FontNamesPtr names; 90*4882a593Smuzhiyun LFWIstateRec current; 91*4882a593Smuzhiyun LFWIstateRec saved; 92*4882a593Smuzhiyun Bool haveSaved; 93*4882a593Smuzhiyun char *savedName; 94*4882a593Smuzhiyun int savedNameLen; 95*4882a593Smuzhiyun } LFclosureRec; 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun /* PolyText */ 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun typedef struct _PTclosure { 100*4882a593Smuzhiyun ClientPtr client; 101*4882a593Smuzhiyun DrawablePtr pDraw; 102*4882a593Smuzhiyun GC *pGC; 103*4882a593Smuzhiyun unsigned char *pElt; 104*4882a593Smuzhiyun unsigned char *endReq; 105*4882a593Smuzhiyun unsigned char *data; 106*4882a593Smuzhiyun int xorg; 107*4882a593Smuzhiyun int yorg; 108*4882a593Smuzhiyun CARD8 reqType; 109*4882a593Smuzhiyun XID did; 110*4882a593Smuzhiyun int err; 111*4882a593Smuzhiyun } PTclosureRec; 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun /* ImageText */ 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun typedef struct _ITclosure { 116*4882a593Smuzhiyun ClientPtr client; 117*4882a593Smuzhiyun DrawablePtr pDraw; 118*4882a593Smuzhiyun GC *pGC; 119*4882a593Smuzhiyun BYTE nChars; 120*4882a593Smuzhiyun unsigned char *data; 121*4882a593Smuzhiyun int xorg; 122*4882a593Smuzhiyun int yorg; 123*4882a593Smuzhiyun CARD8 reqType; 124*4882a593Smuzhiyun XID did; 125*4882a593Smuzhiyun } ITclosureRec; 126*4882a593Smuzhiyun #endif /* CLOSESTR_H */ 127