difs.h revision 34f90d55
1/* 2 * Copyright (C) 1999 The XFree86 Project, Inc. All Rights Reserved. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * of this software and associated documentation files (the "Software"), to 6 * deal in the Software without restriction, including without limitation the 7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 * sell copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 * 21 * Except as contained in this notice, the name of the XFree86 Project shall 22 * not be used in advertising or otherwise to promote the sale, use or other 23 * dealings in this Software without prior written authorization from the 24 * XFree86 Project. 25 */ 26#ifndef _DIFS_H 27#define _DIFS_H 28 29#include "difsfn.h" 30#include "globals.h" 31#include <X11/fonts/fontstruct.h> 32 33typedef int (*InitialFunc)(ClientPtr); 34typedef int (*ProcFunc)(ClientPtr); 35typedef int (*SwappedProcFunc)(ClientPtr); 36typedef void (*EventSwapFunc)(fsError *, fsError *); 37typedef void (*ReplySwapFunc)(ClientPtr, int, void *); 38 39extern InitialFunc InitialVector[3]; 40extern ReplySwapFunc ReplySwapVector[NUM_PROC_VECTORS]; 41 42/* FIXME: this is derived from fontstruct.h; should integrate it */ 43 44/* difs/atom.c */ 45extern Atom MakeAtom ( const char *string, unsigned len, Bool makeit ); 46extern int ValidAtom ( Atom atom ); 47extern char * NameForAtom ( Atom atom ); 48extern void InitAtoms ( void ); 49 50/* difs/charinfo.c */ 51extern int GetExtents ( ClientPtr client, FontPtr pfont, Mask flags, unsigned long num_ranges, fsRange *range, unsigned long *num_extents, fsXCharInfo **data ); 52extern int GetBitmaps ( ClientPtr client, FontPtr pfont, fsBitmapFormat format, Mask flags, unsigned long num_ranges, fsRange *range, int *size, unsigned long *num_glyphs, fsOffset32 **offsets, pointer *data, int *freeData ); 53 54/* difs/initfonts.c */ 55extern void InitFonts ( void ); 56 57/* difs/fonts.c */ 58extern int FontToFSError ( int err ); 59extern int OpenFont ( ClientPtr client, Font fid, fsBitmapFormat format, fsBitmapFormatMask format_mask, int namelen, char *name ); 60extern int CloseClientFont ( ClientFontPtr cfp, FSID fid ); 61extern int SetFontCatalogue ( char *str, int *badpath ); 62extern int ListFonts ( ClientPtr client, int length, unsigned char *pattern, int maxNames ); 63#if 0 64extern int StartListFontsWithInfo ( ClientPtr client, int length, unsigned char *pattern, int maxNames ); 65#endif 66extern int LoadGlyphRanges ( ClientPtr client, FontPtr pfont, Bool range_flag, int num_ranges, int item_size, fsChar2b *data ); 67extern FontPtr find_old_font ( FSID id ); 68extern void DeleteClientFontStuff ( ClientPtr client ); 69 70/* difs/fontinfo.c */ 71extern int convert_props ( FontInfoPtr pinfo, fsPropInfo **props ); 72extern int QueryExtents ( ClientPtr client, ClientFontPtr cfp, int item_size, int nranges, Bool range_flag, pointer range_data ); 73extern int QueryBitmaps ( ClientPtr client, ClientFontPtr cfp, int item_size, fsBitmapFormat format, int nranges, Bool range_flag, pointer range_data ); 74 75/* difs/main.c */ 76extern int NotImplemented(void); 77 78#endif 79