VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/extnsionst.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.3 KB
 
1/* $Xorg: extnsionst.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
31Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
33provided that the above copyright notice appear in all copies and that
34both that copyright notice and this permission notice appear in
35supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
37software without specific, written prior permission.
38
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
48/* $XFree86: xc/programs/Xserver/include/extnsionst.h,v 3.7 2001/12/14 19:59:54 dawes Exp $ */
49
50#ifndef EXTENSIONSTRUCT_H
51#define EXTENSIONSTRUCT_H
52
53#include "misc.h"
54#include "screenint.h"
55#include "extension.h"
56#include "gc.h"
57
58typedef struct _ExtensionEntry {
59 int index;
60 void (* CloseDown)( /* called at server shutdown */
61#if NeedNestedPrototypes
62 struct _ExtensionEntry * /* extension */
63#endif
64);
65 char *name; /* extension name */
66 int base; /* base request number */
67 int eventBase;
68 int eventLast;
69 int errorBase;
70 int errorLast;
71 int num_aliases;
72 char **aliases;
73 pointer extPrivate;
74 unsigned short (* MinorOpcode)( /* called for errors */
75#if NeedNestedPrototypes
76 ClientPtr /* client */
77#endif
78);
79#ifdef XCSECURITY
80 Bool secure; /* extension visible to untrusted clients? */
81#endif
82} ExtensionEntry;
83
84/*
85 * The arguments may be different for extension event swapping functions.
86 * Deal with this by casting when initializing the event's EventSwapVector[]
87 * entries.
88 */
89typedef void (*EventSwapPtr) (
90#if NeedFunctionPrototypes
91 xEvent *,
92 xEvent *
93#endif
94);
95
96extern EventSwapPtr EventSwapVector[128];
97
98extern void NotImplemented ( /* FIXME: this may move to another file... */
99#if NeedFunctionPrototypes
100 xEvent *,
101 xEvent *
102#endif
103);
104
105typedef void (* ExtensionLookupProc)( /*args indeterminate*/
106#ifdef EXTENSION_PROC_ARGS
107 EXTENSION_PROC_ARGS
108#endif
109);
110
111typedef struct _ProcEntry {
112 char *name;
113 ExtensionLookupProc proc;
114} ProcEntryRec, *ProcEntryPtr;
115
116typedef struct _ScreenProcEntry {
117 int num;
118 ProcEntryPtr procList;
119} ScreenProcEntry;
120
121#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
122 pGC->VectorElement = NewRoutineAddress;
123
124#define GetGCValue(pGC, GCElement) (pGC->GCElement)
125
126
127extern ExtensionEntry *AddExtension(
128#if NeedFunctionPrototypes
129 char* /*name*/,
130 int /*NumEvents*/,
131 int /*NumErrors*/,
132 int (* /*MainProc*/)(
133#if NeedNestedPrototypes
134 ClientPtr /*client*/
135#endif
136),
137 int (* /*SwappedMainProc*/)(
138#if NeedNestedPrototypes
139 ClientPtr /*client*/
140#endif
141),
142 void (* /*CloseDownProc*/)(
143#if NeedNestedPrototypes
144 ExtensionEntry * /*extension*/
145#endif
146),
147 unsigned short (* /*MinorOpcodeProc*/)(
148#if NeedNestedPrototypes
149 ClientPtr /*client*/
150#endif
151 )
152#endif /* NeedFunctionPrototypes */
153);
154
155extern Bool AddExtensionAlias(
156#if NeedFunctionPrototypes
157 char* /*alias*/,
158 ExtensionEntry * /*extension*/
159#endif
160);
161
162extern ExtensionEntry *CheckExtension(const char *extname);
163
164extern ExtensionLookupProc LookupProc(
165#if NeedFunctionPrototypes
166 char* /*name*/,
167 GCPtr /*pGC*/
168#endif
169);
170
171extern Bool RegisterProc(
172#if NeedFunctionPrototypes
173 char* /*name*/,
174 GCPtr /*pGC*/,
175 ExtensionLookupProc /*proc*/
176#endif
177);
178
179extern Bool RegisterScreenProc(
180#if NeedFunctionPrototypes
181 char* /*name*/,
182 ScreenPtr /*pScreen*/,
183 ExtensionLookupProc /*proc*/
184#endif
185);
186
187extern void DeclareExtensionSecurity(
188#if NeedFunctionPrototypes
189 char * /*extname*/,
190 Bool /*secure*/
191#endif
192);
193
194#endif /* EXTENSIONSTRUCT_H */
195
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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