2
* $XFree86: xc/programs/Xserver/render/glyphstr.h,v 1.3 2000/11/20 07:13:13 keithp Exp $
4
* Copyright © 2000 SuSE, Inc.
6
* Permission to use, copy, modify, distribute, and sell this software and its
7
* documentation for any purpose is hereby granted without fee, provided that
8
* the above copyright notice appear in all copies and that both that
9
* copyright notice and this permission notice appear in supporting
10
* documentation, and that the name of SuSE not be used in advertising or
11
* publicity pertaining to distribution of the software without specific,
12
* written prior permission. SuSE makes no representations about the
13
* suitability of this software for any purpose. It is provided "as is"
14
* without express or implied warranty.
16
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
18
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
* Author: Keith Packard, SuSE, Inc.
29
#include <X11/extensions/renderproto.h>
31
#include "screenint.h"
32
#include "regionstr.h"
33
#include "miscstruct.h"
35
#define GlyphFormat1 0
36
#define GlyphFormat4 1
37
#define GlyphFormat8 2
38
#define GlyphFormat16 3
39
#define GlyphFormat32 4
40
#define GlyphFormatNum 5
42
typedef struct _Glyph {
44
DevUnion *devPrivates;
45
CARD32 size; /* info + bitmap */
48
} GlyphRec, *GlyphPtr;
50
typedef struct _GlyphRef {
53
} GlyphRefRec, *GlyphRefPtr;
55
#define DeletedGlyph ((GlyphPtr) 1)
57
typedef struct _GlyphHashSet {
61
} GlyphHashSetRec, *GlyphHashSetPtr;
63
typedef struct _GlyphHash {
65
GlyphHashSetPtr hashSet;
67
} GlyphHashRec, *GlyphHashPtr;
69
typedef struct _GlyphSet {
76
} GlyphSetRec, *GlyphSetPtr;
78
#define GlyphSetGetPrivate(pGlyphSet,n) \
79
((n) > (pGlyphSet)->maxPrivate ? \
81
(pGlyphSet)->devPrivates[n])
83
#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \
84
((n) > (pGlyphSet)->maxPrivate ? \
85
_GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \
86
((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE))
88
typedef struct _GlyphList {
93
} GlyphListRec, *GlyphListPtr;
95
extern GlyphHashRec globalGlyphs[GlyphFormatNum];
98
FindGlyphHashSet (CARD32 filled);
101
AllocateGlyphSetPrivateIndex (void);
104
ResetGlyphSetPrivateIndex (void);
107
_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr);
110
ResetGlyphPrivates (void);
113
AllocateGlyphPrivateIndex (void);
116
AllocateGlyphPrivate (ScreenPtr pScreen,
121
GlyphInit (ScreenPtr pScreen);
124
GlyphFinishInit (ScreenPtr pScreen);
127
GlyphUninit (ScreenPtr pScreen);
130
FindGlyphHashSet (CARD32 filled);
133
FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
136
HashGlyph (GlyphPtr glyph);
139
FreeGlyph (GlyphPtr glyph, int format);
142
AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
145
DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
148
FindGlyph (GlyphSetPtr glyphSet, Glyph id);
151
AllocateGlyph (xGlyphInfo *gi, int format);
154
AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
157
ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
160
ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
163
AllocateGlyphSet (int fdepth, PictFormatPtr format);
166
FreeGlyphSet (pointer value,
171
#endif /* _GLYPHSTR_H_ */