VirtualBox

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

最後變更 在這個檔案是 28062,由 vboxsync 提交於 15 年 前

Additions/x11/x11include: header files for building X.Org server 1.8 drivers

  • 屬性 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#include "privates.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 PrivateRec *devPrivates;
45 unsigned char sha1[20];
46 CARD32 size; /* info + bitmap */
47 xGlyphInfo info;
48 /* per-screen pixmaps follow */
49} GlyphRec, *GlyphPtr;
50
51#define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1))
52
53typedef struct _GlyphRef {
54 CARD32 signature;
55 GlyphPtr glyph;
56} GlyphRefRec, *GlyphRefPtr;
57
58#define DeletedGlyph ((GlyphPtr) 1)
59
60typedef struct _GlyphHashSet {
61 CARD32 entries;
62 CARD32 size;
63 CARD32 rehash;
64} GlyphHashSetRec, *GlyphHashSetPtr;
65
66typedef struct _GlyphHash {
67 GlyphRefPtr table;
68 GlyphHashSetPtr hashSet;
69 CARD32 tableEntries;
70} GlyphHashRec, *GlyphHashPtr;
71
72typedef struct _GlyphSet {
73 CARD32 refcnt;
74 PictFormatPtr format;
75 int fdepth;
76 GlyphHashRec hash;
77 int maxPrivate;
78 PrivateRec *devPrivates;
79} GlyphSetRec, *GlyphSetPtr;
80
81#define GlyphSetGetPrivate(pGlyphSet,k) \
82 dixLookupPrivate(&(pGlyphSet)->devPrivates, k)
83
84#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \
85 dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr)
86
87typedef struct _GlyphList {
88 INT16 xOff;
89 INT16 yOff;
90 CARD8 len;
91 PictFormatPtr format;
92} GlyphListRec, *GlyphListPtr;
93
94extern _X_EXPORT GlyphHashSetPtr
95FindGlyphHashSet (CARD32 filled);
96
97extern _X_EXPORT void
98GlyphUninit (ScreenPtr pScreen);
99
100extern _X_EXPORT GlyphHashSetPtr
101FindGlyphHashSet (CARD32 filled);
102
103extern _X_EXPORT GlyphRefPtr
104FindGlyphRef (GlyphHashPtr hash,
105 CARD32 signature,
106 Bool match,
107 unsigned char sha1[20]);
108
109extern _X_EXPORT GlyphPtr
110FindGlyphByHash (unsigned char sha1[20], int format);
111
112extern _X_EXPORT int
113HashGlyph (xGlyphInfo *gi,
114 CARD8 *bits,
115 unsigned long size,
116 unsigned char sha1[20]);
117
118extern _X_EXPORT void
119FreeGlyph (GlyphPtr glyph, int format);
120
121extern _X_EXPORT void
122AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
123
124extern _X_EXPORT Bool
125DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
126
127extern _X_EXPORT GlyphPtr
128FindGlyph (GlyphSetPtr glyphSet, Glyph id);
129
130extern _X_EXPORT GlyphPtr
131AllocateGlyph (xGlyphInfo *gi, int format);
132
133extern _X_EXPORT Bool
134AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
135
136extern _X_EXPORT Bool
137ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
138
139extern _X_EXPORT Bool
140ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
141
142extern _X_EXPORT GlyphSetPtr
143AllocateGlyphSet (int fdepth, PictFormatPtr format);
144
145extern _X_EXPORT int
146FreeGlyphSet (pointer value,
147 XID gid);
148
149
150
151#endif /* _GLYPHSTR_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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