VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/glyphstr.h@ 32915

Last change on this file since 32915 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 4.0 KB
Line 
1/*
2 *
3 * Copyright © 2000 SuSE, Inc.
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of SuSE not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission. SuSE makes no representations about the
12 * suitability of this software for any purpose. It is provided "as is"
13 * without express or implied warranty.
14 *
15 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 *
22 * Author: Keith Packard, SuSE, Inc.
23 */
24
25#ifndef _GLYPHSTR_H_
26#define _GLYPHSTR_H_
27
28#include <X11/extensions/renderproto.h>
29#include "picture.h"
30#include "screenint.h"
31#include "regionstr.h"
32#include "miscstruct.h"
33
34#define GlyphFormat1 0
35#define GlyphFormat4 1
36#define GlyphFormat8 2
37#define GlyphFormat16 3
38#define GlyphFormat32 4
39#define GlyphFormatNum 5
40
41typedef struct _Glyph {
42 CARD32 refcnt;
43 DevUnion *devPrivates;
44 CARD32 size; /* info + bitmap */
45 xGlyphInfo info;
46 /* bits follow */
47} GlyphRec, *GlyphPtr;
48
49typedef struct _GlyphRef {
50 CARD32 signature;
51 GlyphPtr glyph;
52} GlyphRefRec, *GlyphRefPtr;
53
54#define DeletedGlyph ((GlyphPtr) 1)
55
56typedef struct _GlyphHashSet {
57 CARD32 entries;
58 CARD32 size;
59 CARD32 rehash;
60} GlyphHashSetRec, *GlyphHashSetPtr;
61
62typedef struct _GlyphHash {
63 GlyphRefPtr table;
64 GlyphHashSetPtr hashSet;
65 CARD32 tableEntries;
66} GlyphHashRec, *GlyphHashPtr;
67
68typedef struct _GlyphSet {
69 CARD32 refcnt;
70 PictFormatPtr format;
71 int fdepth;
72 GlyphHashRec hash;
73 int maxPrivate;
74 pointer *devPrivates;
75} GlyphSetRec, *GlyphSetPtr;
76
77#define GlyphSetGetPrivate(pGlyphSet,n) \
78 ((n) > (pGlyphSet)->maxPrivate ? \
79 (pointer) 0 : \
80 (pGlyphSet)->devPrivates[n])
81
82#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \
83 ((n) > (pGlyphSet)->maxPrivate ? \
84 _GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \
85 ((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE))
86
87typedef struct _GlyphList {
88 INT16 xOff;
89 INT16 yOff;
90 CARD8 len;
91 PictFormatPtr format;
92} GlyphListRec, *GlyphListPtr;
93
94extern GlyphHashRec globalGlyphs[GlyphFormatNum];
95
96GlyphHashSetPtr
97FindGlyphHashSet (CARD32 filled);
98
99int
100AllocateGlyphSetPrivateIndex (void);
101
102void
103ResetGlyphSetPrivateIndex (void);
104
105Bool
106_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr);
107
108void
109ResetGlyphPrivates (void);
110
111int
112AllocateGlyphPrivateIndex (void);
113
114Bool
115AllocateGlyphPrivate (ScreenPtr pScreen,
116 int index2,
117 unsigned amount);
118
119Bool
120GlyphInit (ScreenPtr pScreen);
121
122Bool
123GlyphFinishInit (ScreenPtr pScreen);
124
125void
126GlyphUninit (ScreenPtr pScreen);
127
128GlyphHashSetPtr
129FindGlyphHashSet (CARD32 filled);
130
131GlyphRefPtr
132FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
133
134CARD32
135HashGlyph (GlyphPtr glyph);
136
137void
138FreeGlyph (GlyphPtr glyph, int format);
139
140void
141AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
142
143Bool
144DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
145
146GlyphPtr
147FindGlyph (GlyphSetPtr glyphSet, Glyph id);
148
149GlyphPtr
150AllocateGlyph (xGlyphInfo *gi, int format);
151
152Bool
153AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
154
155Bool
156ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
157
158Bool
159ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
160
161GlyphSetPtr
162AllocateGlyphSet (int fdepth, PictFormatPtr format);
163
164int
165FreeGlyphSet (pointer value,
166 XID gid);
167
168
169
170#endif /* _GLYPHSTR_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette