difs.h revision ce6676db
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 ( 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 void UseFPE ( FontPathElementPtr fpe );
60extern void FreeFPE ( FontPathElementPtr fpe );
61extern void QueueFontWakeup ( FontPathElementPtr fpe );
62extern void RemoveFontWakeup ( FontPathElementPtr fpe );
63extern void FontWakeup ( pointer data, int count, unsigned long *LastSelectMask );
64extern int OpenFont ( ClientPtr client, Font fid, fsBitmapFormat format, fsBitmapFormatMask format_mask, int namelen, char *name );
65extern int CloseClientFont ( ClientFontPtr cfp, FSID fid );
66extern int SetFontCatalogue ( char *str, int *badpath );
67extern int ListFonts ( ClientPtr client, int length, unsigned char *pattern, int maxNames );
68#if 0
69extern int StartListFontsWithInfo ( ClientPtr client, int length, unsigned char *pattern, int maxNames );
70#endif
71extern int LoadGlyphRanges ( ClientPtr client, FontPtr pfont, Bool range_flag, int num_ranges, int item_size, fsChar2b *data );
72extern void FreeFonts ( void );
73extern FontPtr find_old_font ( FSID id );
74extern void DeleteClientFontStuff ( ClientPtr client );
75
76/* difs/fontinfo.c */
77extern void CopyCharInfo ( CharInfoPtr ci, fsXCharInfo *dst );
78extern int convert_props ( FontInfoPtr pinfo, fsPropInfo **props );
79extern int QueryExtents ( ClientPtr client, ClientFontPtr cfp, int item_size, int nranges, Bool range_flag, pointer range_data );
80extern int QueryBitmaps ( ClientPtr client, ClientFontPtr cfp, int item_size, fsBitmapFormat format, int nranges, Bool range_flag, pointer range_data );
81
82/* difs/main.c */
83extern int NotImplemented(void);
84
85#endif
86