VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.7.7/exevents.h

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

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 9.4 KB
 
1/************************************************************
2
3Copyright 1996 by Thomas E. Dickey <[email protected]>
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the name of the above listed
12copyright holder(s) not be used in advertising or publicity pertaining
13to distribution of the software without specific, written prior
14permission.
15
16THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
17TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
19LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
21ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
22OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23
24********************************************************/
25
26/********************************************************************
27 * Interface of 'exevents.c'
28 */
29
30#ifndef EXEVENTS_H
31#define EXEVENTS_H
32
33#include <X11/extensions/XIproto.h>
34#include "inputstr.h"
35
36/***************************************************************
37 * Interface available to drivers *
38 ***************************************************************/
39
40extern _X_EXPORT int InitProximityClassDeviceStruct(
41 DeviceIntPtr /* dev */);
42
43extern _X_EXPORT void InitValuatorAxisStruct(
44 DeviceIntPtr /* dev */,
45 int /* axnum */,
46 Atom /* label */,
47 int /* minval */,
48 int /* maxval */,
49 int /* resolution */,
50 int /* min_res */,
51 int /* max_res */);
52
53/* Input device properties */
54extern _X_EXPORT void XIDeleteAllDeviceProperties(
55 DeviceIntPtr /* device */
56);
57
58extern _X_EXPORT int XIDeleteDeviceProperty(
59 DeviceIntPtr /* device */,
60 Atom /* property */,
61 Bool /* fromClient */
62);
63
64extern _X_EXPORT int XIChangeDeviceProperty(
65 DeviceIntPtr /* dev */,
66 Atom /* property */,
67 Atom /* type */,
68 int /* format*/,
69 int /* mode*/,
70 unsigned long /* len*/,
71 pointer /* value*/,
72 Bool /* sendevent*/
73 );
74
75extern _X_EXPORT int XIGetDeviceProperty(
76 DeviceIntPtr /* dev */,
77 Atom /* property */,
78 XIPropertyValuePtr* /* value */
79);
80
81extern _X_EXPORT int XISetDevicePropertyDeletable(
82 DeviceIntPtr /* dev */,
83 Atom /* property */,
84 Bool /* deletable */
85);
86
87extern _X_EXPORT long XIRegisterPropertyHandler(
88 DeviceIntPtr dev,
89 int (*SetProperty) (DeviceIntPtr dev,
90 Atom property,
91 XIPropertyValuePtr prop,
92 BOOL checkonly),
93 int (*GetProperty) (DeviceIntPtr dev,
94 Atom property),
95 int (*DeleteProperty) (DeviceIntPtr dev,
96 Atom property)
97);
98
99extern _X_EXPORT void XIUnregisterPropertyHandler(
100 DeviceIntPtr dev,
101 long id
102);
103
104extern _X_EXPORT Atom XIGetKnownProperty(
105 char* name
106);
107
108extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev);
109
110extern _X_EXPORT int XIPropToInt(
111 XIPropertyValuePtr val,
112 int *nelem_return,
113 int **buf_return
114);
115
116extern _X_EXPORT int XIPropToFloat(
117 XIPropertyValuePtr val,
118 int *nelem_return,
119 float **buf_return
120);
121
122/****************************************************************************
123 * End of driver interface *
124 ****************************************************************************/
125
126
127/**
128 * Attached to the devPrivates of each client. Specifies the version number as
129 * supported by the client.
130 */
131typedef struct _XIClientRec {
132 int major_version;
133 int minor_version;
134} XIClientRec, *XIClientPtr;
135
136
137typedef struct _GrabParameters {
138 int grabtype; /* GRABTYPE_CORE, etc. */
139 unsigned int ownerEvents;
140 unsigned int this_device_mode;
141 unsigned int other_devices_mode;
142 Window grabWindow;
143 Window confineTo;
144 Cursor cursor;
145 unsigned int modifiers;
146} GrabParameters;
147
148
149extern void
150RegisterOtherDevice (
151 DeviceIntPtr /* device */);
152
153extern int
154UpdateDeviceState (
155 DeviceIntPtr /* device */,
156 DeviceEvent* /* xE */);
157
158extern void
159ProcessOtherEvent (
160 InternalEvent* /* ev */,
161 DeviceIntPtr /* other */);
162
163extern void
164DeviceFocusEvent(
165 DeviceIntPtr /* dev */,
166 int /* type */,
167 int /* mode */,
168 int /* detail */,
169 WindowPtr /* pWin */);
170
171extern int
172CheckGrabValues(
173 ClientPtr /* client */,
174 GrabParameters* /* param */);
175
176extern int
177GrabButton(
178 ClientPtr /* client */,
179 DeviceIntPtr /* dev */,
180 DeviceIntPtr /* modifier_device */,
181 int /* button */,
182 GrabParameters* /* param */,
183 GrabType /* grabtype */,
184 GrabMask* /* eventMask */);
185
186extern int
187GrabKey(
188 ClientPtr /* client */,
189 DeviceIntPtr /* dev */,
190 DeviceIntPtr /* modifier_device */,
191 int /* key */,
192 GrabParameters* /* param */,
193 GrabType /* grabtype */,
194 GrabMask* /* eventMask */);
195
196extern int
197GrabWindow(
198 ClientPtr /* client */,
199 DeviceIntPtr /* dev */,
200 int /* type */,
201 GrabParameters* /* param */,
202 GrabMask* /* eventMask */);
203
204extern int
205SelectForWindow(
206 DeviceIntPtr /* dev */,
207 WindowPtr /* pWin */,
208 ClientPtr /* client */,
209 Mask /* mask */,
210 Mask /* exclusivemasks */);
211
212extern int
213AddExtensionClient (
214 WindowPtr /* pWin */,
215 ClientPtr /* client */,
216 Mask /* mask */,
217 int /* mskidx */);
218
219extern void
220RecalculateDeviceDeliverableEvents(
221 WindowPtr /* pWin */);
222
223extern int
224InputClientGone(
225 WindowPtr /* pWin */,
226 XID /* id */);
227
228extern int
229SendEvent (
230 ClientPtr /* client */,
231 DeviceIntPtr /* d */,
232 Window /* dest */,
233 Bool /* propagate */,
234 xEvent * /* ev */,
235 Mask /* mask */,
236 int /* count */);
237
238extern int
239SetButtonMapping (
240 ClientPtr /* client */,
241 DeviceIntPtr /* dev */,
242 int /* nElts */,
243 BYTE * /* map */);
244
245extern int
246ChangeKeyMapping(
247 ClientPtr /* client */,
248 DeviceIntPtr /* dev */,
249 unsigned /* len */,
250 int /* type */,
251 KeyCode /* firstKeyCode */,
252 CARD8 /* keyCodes */,
253 CARD8 /* keySymsPerKeyCode */,
254 KeySym * /* map */);
255
256extern void
257DeleteWindowFromAnyExtEvents(
258 WindowPtr /* pWin */,
259 Bool /* freeResources */);
260
261extern int
262MaybeSendDeviceMotionNotifyHint (
263 deviceKeyButtonPointer * /* pEvents */,
264 Mask /* mask */);
265
266extern void
267CheckDeviceGrabAndHintWindow (
268 WindowPtr /* pWin */,
269 int /* type */,
270 deviceKeyButtonPointer * /* xE */,
271 GrabPtr /* grab */,
272 ClientPtr /* client */,
273 Mask /* deliveryMask */);
274
275extern void
276MaybeStopDeviceHint(
277 DeviceIntPtr /* dev */,
278 ClientPtr /* client */);
279
280extern int
281DeviceEventSuppressForWindow(
282 WindowPtr /* pWin */,
283 ClientPtr /* client */,
284 Mask /* mask */,
285 int /* maskndx */);
286
287extern void
288SendEventToAllWindows(
289 DeviceIntPtr /* dev */,
290 Mask /* mask */,
291 xEvent * /* ev */,
292 int /* count */);
293
294extern _X_HIDDEN void XI2EventSwap(
295 xGenericEvent * /* from */,
296 xGenericEvent * /* to */);
297
298/* For an event such as MappingNotify which affects client interpretation
299 * of input events sent by device dev, should we notify the client, or
300 * would it merely be irrelevant and confusing? */
301extern int
302XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
303
304extern void
305XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master,
306 DeviceChangedEvent *dce);
307
308extern int
309XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
310 unsigned int len, unsigned char* mask);
311
312extern int
313XICheckInvalidMaskBits(unsigned char *mask, int len);
314
315#endif /* EXEVENTS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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