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