VirtualBox

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

最後變更 在這個檔案從40349是 40349,由 vboxsync 提交於 13 年 前

Additions/xorg: support X.Org Server 1.12.

  • 屬性 svn:eol-style 設為 native
檔案大小: 10.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
40/**
41 * Scroll flags for ::SetScrollValuator.
42 */
43enum ScrollFlags {
44 SCROLL_FLAG_NONE = 0,
45 /**
46 * Do not emulate legacy button events for valuator events on this axis.
47 */
48 SCROLL_FLAG_DONT_EMULATE = (1 << 1),
49 /**
50 * This axis is the preferred axis for valuator emulation for this axis'
51 * scroll type.
52 */
53 SCROLL_FLAG_PREFERRED = (1 << 2)
54};
55
56extern _X_EXPORT int InitProximityClassDeviceStruct(
57 DeviceIntPtr /* dev */);
58
59extern _X_EXPORT Bool InitValuatorAxisStruct(
60 DeviceIntPtr /* dev */,
61 int /* axnum */,
62 Atom /* label */,
63 int /* minval */,
64 int /* maxval */,
65 int /* resolution */,
66 int /* min_res */,
67 int /* max_res */,
68 int /* mode */);
69
70extern _X_EXPORT Bool SetScrollValuator(
71 DeviceIntPtr /* dev */,
72 int /* axnum */,
73 enum ScrollType /* type */,
74 double /* increment */,
75 int /* flags */);
76
77/* Input device properties */
78extern _X_EXPORT void XIDeleteAllDeviceProperties(
79 DeviceIntPtr /* device */
80);
81
82extern _X_EXPORT int XIDeleteDeviceProperty(
83 DeviceIntPtr /* device */,
84 Atom /* property */,
85 Bool /* fromClient */
86);
87
88extern _X_EXPORT int XIChangeDeviceProperty(
89 DeviceIntPtr /* dev */,
90 Atom /* property */,
91 Atom /* type */,
92 int /* format*/,
93 int /* mode*/,
94 unsigned long /* len*/,
95 const void* /* value*/,
96 Bool /* sendevent*/
97 );
98
99extern _X_EXPORT int XIGetDeviceProperty(
100 DeviceIntPtr /* dev */,
101 Atom /* property */,
102 XIPropertyValuePtr* /* value */
103);
104
105extern _X_EXPORT int XISetDevicePropertyDeletable(
106 DeviceIntPtr /* dev */,
107 Atom /* property */,
108 Bool /* deletable */
109);
110
111extern _X_EXPORT long XIRegisterPropertyHandler(
112 DeviceIntPtr dev,
113 int (*SetProperty) (DeviceIntPtr dev,
114 Atom property,
115 XIPropertyValuePtr prop,
116 BOOL checkonly),
117 int (*GetProperty) (DeviceIntPtr dev,
118 Atom property),
119 int (*DeleteProperty) (DeviceIntPtr dev,
120 Atom property)
121);
122
123extern _X_EXPORT void XIUnregisterPropertyHandler(
124 DeviceIntPtr dev,
125 long id
126);
127
128extern _X_EXPORT Atom XIGetKnownProperty(
129 const char* name
130);
131
132extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev);
133
134extern _X_EXPORT int XIPropToInt(
135 XIPropertyValuePtr val,
136 int *nelem_return,
137 int **buf_return
138);
139
140extern _X_EXPORT int XIPropToFloat(
141 XIPropertyValuePtr val,
142 int *nelem_return,
143 float **buf_return
144);
145
146/****************************************************************************
147 * End of driver interface *
148 ****************************************************************************/
149
150
151/**
152 * Attached to the devPrivates of each client. Specifies the version number as
153 * supported by the client.
154 */
155typedef struct _XIClientRec {
156 int major_version;
157 int minor_version;
158} XIClientRec, *XIClientPtr;
159
160
161typedef struct _GrabParameters {
162 int grabtype; /* CORE, etc. */
163 unsigned int ownerEvents;
164 unsigned int this_device_mode;
165 unsigned int other_devices_mode;
166 Window grabWindow;
167 Window confineTo;
168 Cursor cursor;
169 unsigned int modifiers;
170} GrabParameters;
171
172
173extern int
174UpdateDeviceState (
175 DeviceIntPtr /* device */,
176 DeviceEvent* /* xE */);
177
178extern void
179ProcessOtherEvent (
180 InternalEvent* /* ev */,
181 DeviceIntPtr /* other */);
182
183extern void
184DeviceFocusEvent(
185 DeviceIntPtr /* dev */,
186 int /* type */,
187 int /* mode */,
188 int /* detail */,
189 WindowPtr /* pWin */);
190
191extern int
192CheckGrabValues(
193 ClientPtr /* client */,
194 GrabParameters* /* param */);
195
196extern int
197GrabButton(
198 ClientPtr /* client */,
199 DeviceIntPtr /* dev */,
200 DeviceIntPtr /* modifier_device */,
201 int /* button */,
202 GrabParameters* /* param */,
203 enum InputLevel /* grabtype */,
204 GrabMask* /* eventMask */);
205
206extern int
207GrabKey(
208 ClientPtr /* client */,
209 DeviceIntPtr /* dev */,
210 DeviceIntPtr /* modifier_device */,
211 int /* key */,
212 GrabParameters* /* param */,
213 enum InputLevel /* grabtype */,
214 GrabMask* /* eventMask */);
215
216extern int
217GrabWindow(
218 ClientPtr /* client */,
219 DeviceIntPtr /* dev */,
220 int /* type */,
221 GrabParameters* /* param */,
222 GrabMask* /* eventMask */);
223
224extern int
225GrabTouch(
226 ClientPtr /* client */,
227 DeviceIntPtr /* dev */,
228 DeviceIntPtr /* mod_dev */,
229 GrabParameters* /* param */,
230 GrabMask* /* eventMask */);
231
232extern int
233SelectForWindow(
234 DeviceIntPtr /* dev */,
235 WindowPtr /* pWin */,
236 ClientPtr /* client */,
237 Mask /* mask */,
238 Mask /* exclusivemasks */);
239
240extern int
241AddExtensionClient (
242 WindowPtr /* pWin */,
243 ClientPtr /* client */,
244 Mask /* mask */,
245 int /* mskidx */);
246
247extern void
248RecalculateDeviceDeliverableEvents(
249 WindowPtr /* pWin */);
250
251extern int
252InputClientGone(
253 WindowPtr /* pWin */,
254 XID /* id */);
255
256extern void
257WindowGone(
258 WindowPtr /* win */);
259
260extern int
261SendEvent (
262 ClientPtr /* client */,
263 DeviceIntPtr /* d */,
264 Window /* dest */,
265 Bool /* propagate */,
266 xEvent * /* ev */,
267 Mask /* mask */,
268 int /* count */);
269
270extern int
271SetButtonMapping (
272 ClientPtr /* client */,
273 DeviceIntPtr /* dev */,
274 int /* nElts */,
275 BYTE * /* map */);
276
277extern int
278ChangeKeyMapping(
279 ClientPtr /* client */,
280 DeviceIntPtr /* dev */,
281 unsigned /* len */,
282 int /* type */,
283 KeyCode /* firstKeyCode */,
284 CARD8 /* keyCodes */,
285 CARD8 /* keySymsPerKeyCode */,
286 KeySym * /* map */);
287
288extern void
289DeleteWindowFromAnyExtEvents(
290 WindowPtr /* pWin */,
291 Bool /* freeResources */);
292
293extern int
294MaybeSendDeviceMotionNotifyHint (
295 deviceKeyButtonPointer * /* pEvents */,
296 Mask /* mask */);
297
298extern void
299CheckDeviceGrabAndHintWindow (
300 WindowPtr /* pWin */,
301 int /* type */,
302 deviceKeyButtonPointer * /* xE */,
303 GrabPtr /* grab */,
304 ClientPtr /* client */,
305 Mask /* deliveryMask */);
306
307extern void
308MaybeStopDeviceHint(
309 DeviceIntPtr /* dev */,
310 ClientPtr /* client */);
311
312extern int
313DeviceEventSuppressForWindow(
314 WindowPtr /* pWin */,
315 ClientPtr /* client */,
316 Mask /* mask */,
317 int /* maskndx */);
318
319extern void
320SendEventToAllWindows(
321 DeviceIntPtr /* dev */,
322 Mask /* mask */,
323 xEvent * /* ev */,
324 int /* count */);
325
326extern void
327TouchRejected(
328 DeviceIntPtr /* sourcedev */,
329 TouchPointInfoPtr /* ti */,
330 XID /* resource */,
331 TouchOwnershipEvent * /* ev */);
332
333extern _X_HIDDEN void XI2EventSwap(
334 xGenericEvent * /* from */,
335 xGenericEvent * /* to */);
336
337/* For an event such as MappingNotify which affects client interpretation
338 * of input events sent by device dev, should we notify the client, or
339 * would it merely be irrelevant and confusing? */
340extern int
341XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
342
343extern void
344XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
345
346extern int
347XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
348 unsigned int len, unsigned char* mask);
349
350extern int
351XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len);
352
353#endif /* EXEVENTS_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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