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