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