VirtualBox

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

Last change on this file was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 4.1 KB
Line 
1/*
2 * $XFree86: xc/programs/Xserver/render/glyphstr.h,v 1.3 2000/11/20 07:13:13 keithp Exp $
3 *
4 * Copyright © 2000 SuSE, Inc.
5 *
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.
15 *
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.
22 *
23 * Author: Keith Packard, SuSE, Inc.
24 */
25
26#ifndef _GLYPHSTR_H_
27#define _GLYPHSTR_H_
28
29#include <X11/extensions/renderproto.h>
30#include "picture.h"
31#include "screenint.h"
32#include "regionstr.h"
33#include "miscstruct.h"
34
35#define GlyphFormat1 0
36#define GlyphFormat4 1
37#define GlyphFormat8 2
38#define GlyphFormat16 3
39#define GlyphFormat32 4
40#define GlyphFormatNum 5
41
42typedef struct _Glyph {
43 CARD32 refcnt;
44 DevUnion *devPrivates;
45 CARD32 size; /* info + bitmap */
46 xGlyphInfo info;
47 /* bits follow */
48} GlyphRec, *GlyphPtr;
49
50typedef struct _GlyphRef {
51 CARD32 signature;
52 GlyphPtr glyph;
53} GlyphRefRec, *GlyphRefPtr;
54
55#define DeletedGlyph ((GlyphPtr) 1)
56
57typedef struct _GlyphHashSet {
58 CARD32 entries;
59 CARD32 size;
60 CARD32 rehash;
61} GlyphHashSetRec, *GlyphHashSetPtr;
62
63typedef struct _GlyphHash {
64 GlyphRefPtr table;
65 GlyphHashSetPtr hashSet;
66 CARD32 tableEntries;
67} GlyphHashRec, *GlyphHashPtr;
68
69typedef struct _GlyphSet {
70 CARD32 refcnt;
71 PictFormatPtr format;
72 int fdepth;
73 GlyphHashRec hash;
74 int maxPrivate;
75 pointer *devPrivates;
76} GlyphSetRec, *GlyphSetPtr;
77
78#define GlyphSetGetPrivate(pGlyphSet,n) \
79 ((n) > (pGlyphSet)->maxPrivate ? \
80 (pointer) 0 : \
81 (pGlyphSet)->devPrivates[n])
82
83#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \
84 ((n) > (pGlyphSet)->maxPrivate ? \
85 _GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \
86 ((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE))
87
88typedef struct _GlyphList {
89 INT16 xOff;
90 INT16 yOff;
91 CARD8 len;
92 PictFormatPtr format;
93} GlyphListRec, *GlyphListPtr;
94
95extern GlyphHashRec globalGlyphs[GlyphFormatNum];
96
97GlyphHashSetPtr
98FindGlyphHashSet (CARD32 filled);
99
100int
101AllocateGlyphSetPrivateIndex (void);
102
103void
104ResetGlyphSetPrivateIndex (void);
105
106Bool
107_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr);
108
109void
110ResetGlyphPrivates (void);
111
112int
113AllocateGlyphPrivateIndex (void);
114
115Bool
116AllocateGlyphPrivate (ScreenPtr pScreen,
117 int index2,
118 unsigned amount);
119
120Bool
121GlyphInit (ScreenPtr pScreen);
122
123Bool
124GlyphFinishInit (ScreenPtr pScreen);
125
126void
127GlyphUninit (ScreenPtr pScreen);
128
129GlyphHashSetPtr
130FindGlyphHashSet (CARD32 filled);
131
132GlyphRefPtr
133FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
134
135CARD32
136HashGlyph (GlyphPtr glyph);
137
138void
139FreeGlyph (GlyphPtr glyph, int format);
140
141void
142AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
143
144Bool
145DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
146
147GlyphPtr
148FindGlyph (GlyphSetPtr glyphSet, Glyph id);
149
150GlyphPtr
151AllocateGlyph (xGlyphInfo *gi, int format);
152
153Bool
154AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
155
156Bool
157ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
158
159Bool
160ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
161
162GlyphSetPtr
163AllocateGlyphSet (int fdepth, PictFormatPtr format);
164
165int
166FreeGlyphSet (pointer value,
167 XID gid);
168
169
170
171#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