difs.h revision 8f34cbf9
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#include <X11/fonts/fontmisc.h>
33
34typedef int (*InitialFunc)(ClientPtr);
35typedef int (*ProcFunc)(ClientPtr);
36typedef int (*SwappedProcFunc)(ClientPtr);
37typedef void (*EventSwapFunc)(fsError *, fsError *);
38typedef void (*ReplySwapFunc)(ClientPtr, int, void *);
39
40extern InitialFunc InitialVector[3];
41extern ReplySwapFunc ReplySwapVector[NUM_PROC_VECTORS];
42extern EventSwapFunc EventSwapVector[NUM_EVENT_VECTORS];
43
44/* FIXME: this is derived from fontstruct.h; should integrate it */
45
46/* difs/atom.c */
47extern void InitAtoms ( void );
48
49/* difs/charinfo.c */
50extern int GetExtents ( ClientPtr client, FontPtr pfont, Mask flags, unsigned long num_ranges, fsRange *range, unsigned long *num_extents, fsXCharInfo **data );
51extern 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 );
52
53/* difs/initfonts.c */
54extern void InitFonts ( void );
55
56/* difs/fonts.c */
57extern int FontToFSError ( int err );
58extern int OpenFont ( ClientPtr client, Font fid, fsBitmapFormat format, fsBitmapFormatMask format_mask, int namelen, char *name );
59extern int CloseClientFont ( ClientFontPtr cfp, FSID fid );
60extern int SetFontCatalogue ( char *str, int *badpath );
61extern int ListFonts ( ClientPtr client, int length, unsigned char *pattern, int maxNames );
62#if 0
63extern int StartListFontsWithInfo ( ClientPtr client, int length, unsigned char *pattern, int maxNames );
64#endif
65extern int LoadGlyphRanges ( ClientPtr client, FontPtr pfont, Bool range_flag, int num_ranges, int item_size, fsChar2b *data );
66extern FontPtr find_old_font ( FSID id );
67extern void DeleteClientFontStuff ( ClientPtr client );
68
69/* difs/fontinfo.c */
70extern int convert_props ( FontInfoPtr pinfo, fsPropInfo **props );
71extern int QueryExtents ( ClientPtr client, ClientFontPtr cfp, int item_size, int nranges, Bool range_flag, pointer range_data );
72extern int QueryBitmaps ( ClientPtr client, ClientFontPtr cfp, int item_size, fsBitmapFormat format, int nranges, Bool range_flag, pointer range_data );
73
74/* difs/main.c */
75extern int NotImplemented(void);
76
77#endif
78