closestr.h revision bbe1b32b
1/* $Xorg: closestr.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ 2/* 3Copyright 1987, 1998 The Open Group 4 5Permission to use, copy, modify, distribute, and sell this software and its 6documentation for any purpose is hereby granted without fee, provided that 7the above copyright notice appear in all copies and that both that 8copyright notice and this permission notice appear in supporting 9documentation. 10 11The above copyright notice and this permission notice shall be included in 12all copies or substantial portions of the Software. 13 14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21Except as contained in this notice, the name of The Open Group shall not be 22used in advertising or otherwise to promote the sale, use or other dealings 23in this Software without prior written authorization from The Open Group. 24 * Copyright 1990, 1991 Network Computing Devices; 25 * Portions Copyright 1987 by Digital Equipment Corporation 26 * 27 * Permission to use, copy, modify, distribute, and sell this software and its 28 * documentation for any purpose is hereby granted without fee, provided that 29 * the above copyright notice appear in all copies and that both that 30 * copyright notice and this permission notice appear in supporting 31 * documentation, and that the names of Network Computing Devices, 32 * or Digital not be used in advertising or 33 * publicity pertaining to distribution of the software without specific, 34 * written prior permission. Network Computing Devices, or Digital 35 * make no representations about the 36 * suitability of this software for any purpose. It is provided "as is" 37 * without express or implied warranty. 38 * 39 * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH 40 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 41 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR DIGITAL BE 42 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 43 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 44 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 45 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 46 * 47 * $NCDXorg: @(#)closestr.h,v 4.1 1991/05/02 04:15:46 lemke Exp $ 48 * 49 */ 50 51#ifndef CLOSESTR_H 52#define CLOSESTR_H 53 54#include <X11/fonts/FSproto.h> 55#include "closure.h" 56#include "misc.h" 57#include <X11/fonts/font.h> 58 59/* closure structures */ 60 61/* OpenFont */ 62 63typedef struct _OFclosure { 64 ClientPtr client; 65 short current_fpe; 66 short num_fpes; 67 FontPathElementPtr *fpe_list; 68 Mask flags; 69 fsBitmapFormat format; 70 fsBitmapFormatMask format_mask; 71 Bool slept; 72 FSID fontid; 73 char *fontname; 74 int fnamelen; 75 char *orig_name; 76 int orig_len; 77 FontPtr non_cachable_font; 78} OFclosureRec; 79 80/* QueryExtents */ 81 82typedef struct _QEclosure { 83 ClientPtr client; 84 int nranges; 85 fsRange *range; 86 FontPtr pfont; 87 Mask flags; 88 Bool slept; 89} QEclosureRec; 90 91/* QueryBitmaps */ 92 93typedef struct _QBclosure { 94 ClientPtr client; 95 int nranges; 96 fsRange *range; 97 FontPtr pfont; 98 fsBitmapFormat format; 99 Mask flags; 100 Bool slept; 101} QBclosureRec; 102 103/* ListFontsWithInfo */ 104 105#define XLFDMAXFONTNAMELEN 256 106typedef struct _LFWIstate { 107 char pattern[XLFDMAXFONTNAMELEN]; /* max len of font name */ 108 int patlen; 109 int current_fpe; 110 int max_names; 111 Bool list_started; 112 pointer private; 113} LFWIstateRec, *LFWIstatePtr; 114 115 116typedef struct _LFWXIclosure { 117 ClientPtr client; 118 int num_fpes; 119 FontPathElementPtr *fpe_list; 120 fsListFontsWithXInfoReply *reply; 121 int length; 122 LFWIstateRec current; 123 LFWIstateRec saved; 124 int savedNumFonts; 125 Bool haveSaved; 126 Bool slept; 127 char *savedName; 128} LFWXIclosureRec; 129 130typedef struct _LFclosure { 131 ClientPtr client; 132 int num_fpes; 133 FontPathElementPtr *fpe_list; 134 FontNamesPtr names; 135 LFWIstateRec current; 136 LFWIstateRec saved; 137 Bool haveSaved; 138 Bool slept; 139 char *savedName; 140 int savedNameLen; 141} LFclosureRec; 142 143#endif /* CLOSESTR_H */ 144