5999861b6ca194ab0c3dec8079852c9d0be6027e
[framework/uifw/xorg/lib/libxfont.git] / src / fc / fserve.h
1 /*
2  * Copyright 1990 Network Computing Devices
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name of Network Computing Devices not be
9  * used in advertising or publicity pertaining to distribution of the
10  * software without specific, written prior permission.  Network Computing
11  * Devices makes no representations about the suitability of this software
12  * for any purpose.  It is provided "as is" without express or implied
13  * warranty.
14  *
15  * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
16  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
17  * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
18  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
20  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
21  * OR PERFORMANCE OF THIS SOFTWARE.
22  *
23  * Author:      Dave Lemke, Network Computing Devices, Inc
24  *
25  */
26
27 #ifndef _FSERVE_H_
28 #define _FSERVE_H_
29 /*
30  * font server data structures
31  */
32
33 /* types of block records */
34 #define FS_OPEN_FONT            1
35 #define FS_LOAD_GLYPHS          2
36 #define FS_LIST_FONTS           3
37 #define FS_LIST_WITH_INFO       4
38
39 /* states of OpenFont */
40 #define FS_OPEN_REPLY           0
41 #define FS_INFO_REPLY           1
42 #define FS_EXTENT_REPLY         2
43 #define FS_GLYPHS_REPLY         3
44 #define FS_DONE_REPLY           4
45 #define FS_DEPENDING            5
46
47 /* status of ListFontsWithInfo */
48 #define FS_LFWI_WAITING         0
49 #define FS_LFWI_REPLY           1
50 #define FS_LFWI_FINISHED        2
51
52 /* states of connection */
53 #define FS_CONN_CLOSED          0
54 #define FS_CONN_CONNECTING      1
55 #define FS_CONN_READ_HEADER     2
56 #define FS_CONN_READ_DATA       3
57
58 #define AccessDone      0x400
59
60 typedef struct _fs_font_data *FSFontDataPtr;
61 typedef struct _fs_blocked_font *FSBlockedFontPtr;
62 typedef struct _fs_blocked_glyphs *FSBlockedGlyphPtr;
63 typedef struct _fs_blocked_list *FSBlockedListPtr;
64 typedef struct _fs_blocked_list_info *FSBlockedListInfoPtr;
65 typedef struct _fs_block_data *FSBlockDataPtr;
66 typedef struct _fs_font_table *FSFontTablePtr;
67 typedef struct _fs_fpe_data *FSFpePtr;
68
69 typedef struct _fs_blocked_bitmaps *FSBlockedBitmapPtr;
70 typedef struct _fs_blocked_extents *FSBlockedExtentPtr;
71
72 extern void _fs_convert_char_info ( fsXCharInfo *src, xCharInfo *dst );
73 extern void _fs_free_props (FontInfoPtr pfi);
74 extern FontPtr fs_create_font (FontPathElementPtr   fpe,
75                                char                 *name,
76                                int                  namelen,
77                                fsBitmapFormat       format,
78                                fsBitmapFormatMask   fmask);
79
80 extern int fs_load_all_glyphs ( FontPtr pfont );
81
82 /*
83  * These should be declared elsewhere, but I'm concerned that moving them
84  * would cause problems building other pieces
85  */
86 extern FontPtr find_old_font (Font id);
87 extern int  set_font_authorizations (char **a, int *len, pointer client);
88 extern long   GetTimeInMillis (void);
89
90
91 #endif                          /* _FSERVE_H_ */