VirtualBox

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

最後變更 在這個檔案從77662是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 4.0 KB
 
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
94GlyphHashSetPtr
95FindGlyphHashSet (CARD32 filled);
96
97int
98AllocateGlyphSetPrivateIndex (void);
99
100void
101ResetGlyphSetPrivateIndex (void);
102
103Bool
104_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr);
105
106void
107ResetGlyphPrivates (void);
108
109int
110AllocateGlyphPrivateIndex (void);
111
112Bool
113AllocateGlyphPrivate (ScreenPtr pScreen,
114 int index2,
115 unsigned amount);
116
117Bool
118GlyphInit (ScreenPtr pScreen);
119
120Bool
121GlyphFinishInit (ScreenPtr pScreen);
122
123void
124GlyphUninit (ScreenPtr pScreen);
125
126GlyphHashSetPtr
127FindGlyphHashSet (CARD32 filled);
128
129GlyphRefPtr
130FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
131
132CARD32
133HashGlyph (GlyphPtr glyph);
134
135void
136FreeGlyph (GlyphPtr glyph, int format);
137
138void
139AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
140
141Bool
142DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
143
144GlyphPtr
145FindGlyph (GlyphSetPtr glyphSet, Glyph id);
146
147GlyphPtr
148AllocateGlyph (xGlyphInfo *gi, int format);
149
150Bool
151AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
152
153Bool
154ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
155
156Bool
157ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
158
159GlyphSetPtr
160AllocateGlyphSet (int fdepth, PictFormatPtr format);
161
162int
163FreeGlyphSet (pointer value,
164 XID gid);
165
166
167
168#endif /* _GLYPHSTR_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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