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