]> git.sesse.net Git - rdpsrv/blob - Xserver/lib/font/include/fntfilst.h
Support RDP5 logon packets.
[rdpsrv] / Xserver / lib / font / include / fntfilst.h
1 /* $XConsortium: fntfilst.h,v 1.8 94/04/17 20:17:29 gildea Exp $ */
2 /* $XFree86: xc/lib/font/include/fntfilst.h,v 3.0 1995/11/16 11:03:45 dawes Exp $ */
3
4 /*
5
6 Copyright (c) 1991  X Consortium
7
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
21 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
25 Except as contained in this notice, the name of the X Consortium shall not be
26 used in advertising or otherwise to promote the sale, use or other dealings
27 in this Software without prior written authorization from the X Consortium.
28
29 */
30
31 /*
32  * Author:  Keith Packard, MIT X Consortium
33  */
34
35 #ifndef _FONTFILEST_H_
36 #define _FONTFILEST_H_
37
38 #include <X11/Xos.h>
39 #include "fontmisc.h"
40 #include "fontstruct.h"
41 #include "fntfil.h"
42 #include "fontxlfd.h"
43
44 typedef struct _FontName {
45     char        *name;
46     short       length;
47     short       ndashes;
48 } FontNameRec;
49
50 typedef struct _FontScaled {
51     FontScalableRec     vals;
52     FontEntryPtr        bitmap;
53     FontPtr             pFont;
54 } FontScaledRec;
55
56 typedef struct _FontScalableExtra {
57     FontScalableRec     defaults;
58     int                 numScaled;
59     int                 sizeScaled;
60     FontScaledPtr       scaled;
61     pointer             private;
62 } FontScalableExtraRec;
63
64 typedef struct _FontScalableEntry {
65     FontRendererPtr         renderer;
66     char                    *fileName;
67     FontScalableExtraPtr   extra;
68 } FontScalableEntryRec;
69
70 /*
71  * This "can't" work yet - the returned alias string must be permanent,
72  * but this layer would need to generate the appropriate name from the
73  * resolved scalable + the XLFD values passed in.  XXX
74  */
75
76 typedef struct _FontScaleAliasEntry {
77     char                *resolved;
78 } FontScaleAliasEntryRec;
79
80 typedef struct _FontBitmapEntry {
81     FontRendererPtr     renderer;
82     char                *fileName;
83     FontPtr             pFont;
84 } FontBitmapEntryRec;
85
86 typedef struct _FontAliasEntry {
87     char        *resolved;
88 } FontAliasEntryRec;
89
90 typedef struct _FontBCEntry {
91     FontScalableRec         vals;
92     FontEntryPtr            entry;
93 } FontBCEntryRec;
94
95 typedef struct _FontEntry {
96     FontNameRec name;
97     int         type;
98     union _FontEntryParts {
99         FontScalableEntryRec    scalable;
100         FontBitmapEntryRec      bitmap;
101         FontAliasEntryRec       alias;
102         FontBCEntryRec          bc;
103     } u;
104 } FontEntryRec;
105
106 typedef struct _FontTable {
107     int             used;
108     int             size;
109     FontEntryPtr    entries;
110     Bool            sorted;
111 } FontTableRec;
112
113 typedef struct _FontDirectory {
114     char            *directory;
115     unsigned long   dir_mtime;
116     unsigned long   alias_mtime;
117     FontTableRec    scalable;
118     FontTableRec    nonScalable;
119     char            *attributes;
120 } FontDirectoryRec;
121
122 /* Capability bits: for definition of capabilities bitmap in the
123    FontRendererRec to indicate support of XLFD enhancements */
124
125 #define CAP_MATRIX              0x1
126 #define CAP_CHARSUBSETTING      0x2
127
128 typedef struct _FontRenderer {
129     char    *fileSuffix;
130     int     fileSuffixLen;
131     int     (*OpenBitmap)(/* fpe, pFont, flags, entry, fileName, format, fmask */);
132     int     (*OpenScalable)(/* fpe, pFont, flags, entry, fileName, vals, format, fmask */);
133     int     (*GetInfoBitmap)(/* fpe, pFontInfo, entry, fileName */);
134     int     (*GetInfoScalable)(/* fpe, pFontInfo, entry, fileName, vals */);
135     int     number;
136     int     capabilities;       /* Bitmap components defined above */
137 } FontRendererRec;
138
139 typedef struct _FontRenders {
140     int             number;
141     FontRendererPtr *renderers;
142 } FontRenderersRec, *FontRenderersPtr;
143
144 typedef struct _BitmapInstance {
145     FontScalableRec     vals;
146     FontBitmapEntryPtr  bitmap;
147 } BitmapInstanceRec, *BitmapInstancePtr;
148
149 typedef struct _BitmapScalablePrivate {
150     int                 numInstances;
151     BitmapInstancePtr   instances;
152 } BitmapScalablePrivateRec, *BitmapScalablePrivatePtr;
153
154 typedef struct _BitmapSources {
155     FontPathElementPtr  *fpe;
156     int                 size;
157     int                 count;
158 } BitmapSourcesRec, *BitmapSourcesPtr;
159
160 extern BitmapSourcesRec FontFileBitmapSources;
161
162 /* Defines for FontFileFindNamesInScalableDir() behavior */
163 #define NORMAL_ALIAS_BEHAVIOR           0
164 #define LIST_ALIASES_AND_TARGET_NAMES   (1<<0)
165 #define IGNORE_SCALABLE_ALIASES         (1<<1)
166
167 #endif /* _FONTFILEST_H_ */