1 | /*
|
---|
2 | * Copyright (C) 1991-1998 by LCS/Telegraphics
|
---|
3 | * Copyright (C) 2002 Patrik Stridvall
|
---|
4 | *
|
---|
5 | * This library is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU Lesser General Public
|
---|
7 | * License as published by the Free Software Foundation; either
|
---|
8 | * version 2.1 of the License, or (at your option) any later version.
|
---|
9 | *
|
---|
10 | * This library is distributed in the hope that it will be useful,
|
---|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
13 | * Lesser General Public License for more details.
|
---|
14 | *
|
---|
15 | * You should have received a copy of the GNU Lesser General Public
|
---|
16 | * License along with this library; if not, write to the Free Software
|
---|
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
22 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
23 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
24 | * a choice of LGPL license versions is made available with the language indicating
|
---|
25 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
26 | * of the LGPL is applied is otherwise unspecified.
|
---|
27 | */
|
---|
28 |
|
---|
29 | #ifndef __WINE_WINTAB_H
|
---|
30 | #define __WINE_WINTAB_H
|
---|
31 |
|
---|
32 | #ifdef __cplusplus
|
---|
33 | extern "C" {
|
---|
34 | #endif /* defined(__cplusplus) */
|
---|
35 |
|
---|
36 | /***********************************************************************
|
---|
37 | * Messages
|
---|
38 | */
|
---|
39 | #ifndef NOWTMESSAGES
|
---|
40 |
|
---|
41 | #define WT_DEFBASE 0x7FF0
|
---|
42 | #define WT_MAXOFFSET 0xF
|
---|
43 |
|
---|
44 | #define _WT_PACKET(b) ((b)+0)
|
---|
45 | #define _WT_CTXOPEN(b) ((b)+1)
|
---|
46 | #define _WT_CTXCLOSE(b) ((b)+2)
|
---|
47 | #define _WT_CTXUPDATE(b) ((b)+3)
|
---|
48 | #define _WT_CTXOVERLAP(b) ((b)+4)
|
---|
49 | #define _WT_PROXIMITY(b) ((b)+5)
|
---|
50 | #define _WT_INFOCHANGE(b) ((b)+6)
|
---|
51 | #define _WT_CSRCHANGE(b) ((b)+7) /* 1.1 */
|
---|
52 | #define _WT_MAX(b) ((b)+WT_MAXOFFSET)
|
---|
53 |
|
---|
54 | #define WT_PACKET _WT_PACKET(WT_DEFBASE)
|
---|
55 | #define WT_CTXOPEN _WT_CTXOPEN(WT_DEFBASE)
|
---|
56 | #define WT_CTXCLOSE _WT_CTXCLOSE(WT_DEFBASE)
|
---|
57 | #define WT_CTXUPDATE _WT_CTXUPDATE(WT_DEFBASE)
|
---|
58 | #define WT_CTXOVERLAP _WT_CTXOVERLAP(WT_DEFBASE)
|
---|
59 | #define WT_PROXIMITY _WT_PROXIMITY(WT_DEFBASE)
|
---|
60 | #define WT_INFOCHANGE _WT_INFOCHANGE(WT_DEFBASE)
|
---|
61 | #define WT_CSRCHANGE _WT_CSRCHANGE(WT_DEFBASE) /* 1.1 */
|
---|
62 | #define WT_MAX _WT_MAX(WT_DEFBASE)
|
---|
63 |
|
---|
64 | #endif
|
---|
65 |
|
---|
66 | /***********************************************************************
|
---|
67 | * COMMON DATA DEFS
|
---|
68 | */
|
---|
69 |
|
---|
70 | DECLARE_HANDLE(HMGR); /* manager handle */
|
---|
71 | DECLARE_HANDLE(HCTX); /* context handle */
|
---|
72 | DECLARE_HANDLE(HWTHOOK); /* hook handle */
|
---|
73 |
|
---|
74 | typedef DWORD WTPKT; /* packet mask */
|
---|
75 |
|
---|
76 | #ifndef NOWTPKT
|
---|
77 |
|
---|
78 | /* WTPKT bits */
|
---|
79 | #define PK_CONTEXT 0x0001 /* reporting context */
|
---|
80 | #define PK_STATUS 0x0002 /* status bits */
|
---|
81 | #define PK_TIME 0x0004 /* time stamp */
|
---|
82 | #define PK_CHANGED 0x0008 /* change bit vector */
|
---|
83 | #define PK_SERIAL_NUMBER 0x0010 /* packet serial number */
|
---|
84 | #define PK_CURSOR 0x0020 /* reporting cursor */
|
---|
85 | #define PK_BUTTONS 0x0040 /* button information */
|
---|
86 | #define PK_X 0x0080 /* x axis */
|
---|
87 | #define PK_Y 0x0100 /* y axis */
|
---|
88 | #define PK_Z 0x0200 /* z axis */
|
---|
89 | #define PK_NORMAL_PRESSURE 0x0400 /* normal or tip pressure */
|
---|
90 | #define PK_TANGENT_PRESSURE 0x0800 /* tangential or barrel pressure */
|
---|
91 | #define PK_ORIENTATION 0x1000 /* orientation info: tilts */
|
---|
92 | #define PK_ROTATION 0x2000 /* rotation info; 1.1 */
|
---|
93 |
|
---|
94 | #endif
|
---|
95 |
|
---|
96 | typedef DWORD FIX32; /* fixed-point arithmetic type */
|
---|
97 |
|
---|
98 | #ifndef NOFIX32
|
---|
99 |
|
---|
100 | #define INT(x) HIWORD(x)
|
---|
101 | #define FRAC(x) LOWORD(x)
|
---|
102 |
|
---|
103 | #define CASTFIX32(x) ((FIX32)((x)*65536L))
|
---|
104 |
|
---|
105 | #define ROUND(x) (INT(x) + (FRAC(x) > (WORD)0x8000))
|
---|
106 |
|
---|
107 | #define FIX_MUL(c, a, b) \
|
---|
108 | (c = (((DWORD)FRAC(a) * FRAC(b)) >> 16) + \
|
---|
109 | (DWORD)INT(a) * FRAC(b) + \
|
---|
110 | (DWORD)INT(b) * FRAC(a) + \
|
---|
111 | ((DWORD)INT(a) * INT(b) << 16))
|
---|
112 |
|
---|
113 | #ifdef _WINDLL
|
---|
114 | # define FIX_DIV_SC static
|
---|
115 | #else
|
---|
116 | # define FIX_DIV_SC
|
---|
117 | # endif
|
---|
118 |
|
---|
119 | #define FIX_DIV(c, a, b) \
|
---|
120 | { \
|
---|
121 | FIX_DIV_SC DWORD temp, rem, btemp; \
|
---|
122 | \
|
---|
123 | /* fraction done bytewise */ \
|
---|
124 | temp = ((a / b) << 16); \
|
---|
125 | rem = a % b; \
|
---|
126 | btemp = b; \
|
---|
127 | if (INT(btemp) < 256) { \
|
---|
128 | rem <<= 8; \
|
---|
129 | } else { \
|
---|
130 | btemp >>= 8; \
|
---|
131 | } \
|
---|
132 | temp += ((rem / btemp) << 8); \
|
---|
133 | rem %= btemp; \
|
---|
134 | rem <<= 8; \
|
---|
135 | temp += rem / btemp; \
|
---|
136 | c = temp; \
|
---|
137 | }
|
---|
138 |
|
---|
139 | #endif
|
---|
140 |
|
---|
141 | /***********************************************************************
|
---|
142 | * INFO DATA DEFS
|
---|
143 | */
|
---|
144 |
|
---|
145 | #ifndef NOWTINFO
|
---|
146 |
|
---|
147 | #ifndef NOWTAXIS
|
---|
148 |
|
---|
149 | typedef struct tagAXIS {
|
---|
150 | LONG axMin;
|
---|
151 | LONG axMax;
|
---|
152 | UINT axUnits;
|
---|
153 | FIX32 axResolution;
|
---|
154 | } AXIS, *PAXIS, *NPAXIS, *LPAXIS;
|
---|
155 |
|
---|
156 | /* unit specifiers */
|
---|
157 | #define TU_NONE 0
|
---|
158 | #define TU_INCHES 1
|
---|
159 | #define TU_CENTIMETERS 2
|
---|
160 | #define TU_CIRCLE 3
|
---|
161 |
|
---|
162 | #endif
|
---|
163 |
|
---|
164 | #ifndef NOWTSYSBUTTONS
|
---|
165 |
|
---|
166 | /* system button assignment values */
|
---|
167 | #define SBN_NONE 0x00
|
---|
168 | #define SBN_LCLICK 0x01
|
---|
169 | #define SBN_LDBLCLICK 0x02
|
---|
170 | #define SBN_LDRAG 0x03
|
---|
171 | #define SBN_RCLICK 0x04
|
---|
172 | #define SBN_RDBLCLICK 0x05
|
---|
173 | #define SBN_RDRAG 0x06
|
---|
174 | #define SBN_MCLICK 0x07
|
---|
175 | #define SBN_MDBLCLICK 0x08
|
---|
176 | #define SBN_MDRAG 0x09
|
---|
177 |
|
---|
178 | /* for Pen Windows */
|
---|
179 | #define SBN_PTCLICK 0x10
|
---|
180 | #define SBN_PTDBLCLICK 0x20
|
---|
181 | #define SBN_PTDRAG 0x30
|
---|
182 | #define SBN_PNCLICK 0x40
|
---|
183 | #define SBN_PNDBLCLICK 0x50
|
---|
184 | #define SBN_PNDRAG 0x60
|
---|
185 | #define SBN_P1CLICK 0x70
|
---|
186 | #define SBN_P1DBLCLICK 0x80
|
---|
187 | #define SBN_P1DRAG 0x90
|
---|
188 | #define SBN_P2CLICK 0xA0
|
---|
189 | #define SBN_P2DBLCLICK 0xB0
|
---|
190 | #define SBN_P2DRAG 0xC0
|
---|
191 | #define SBN_P3CLICK 0xD0
|
---|
192 | #define SBN_P3DBLCLICK 0xE0
|
---|
193 | #define SBN_P3DRAG 0xF0
|
---|
194 |
|
---|
195 | #endif
|
---|
196 |
|
---|
197 | #ifndef NOWTCAPABILITIES
|
---|
198 |
|
---|
199 | /* hardware capabilities */
|
---|
200 | #define HWC_INTEGRATED 0x0001
|
---|
201 | #define HWC_TOUCH 0x0002
|
---|
202 | #define HWC_HARDPROX 0x0004
|
---|
203 | #define HWC_PHYSID_CURSORS 0x0008 /* 1.1 */
|
---|
204 | #endif
|
---|
205 |
|
---|
206 | #ifndef NOWTIFC
|
---|
207 |
|
---|
208 | #ifndef NOWTCURSORS
|
---|
209 |
|
---|
210 | /* cursor capabilities */
|
---|
211 | #define CRC_MULTIMODE 0x0001 /* 1.1 */
|
---|
212 | #define CRC_AGGREGATE 0x0002 /* 1.1 */
|
---|
213 | #define CRC_INVERT 0x0004 /* 1.1 */
|
---|
214 |
|
---|
215 | #endif
|
---|
216 |
|
---|
217 | /* info categories */
|
---|
218 | #define WTI_INTERFACE 1
|
---|
219 | #define IFC_WINTABID 1
|
---|
220 | #define IFC_SPECVERSION 2
|
---|
221 | #define IFC_IMPLVERSION 3
|
---|
222 | #define IFC_NDEVICES 4
|
---|
223 | #define IFC_NCURSORS 5
|
---|
224 | #define IFC_NCONTEXTS 6
|
---|
225 | #define IFC_CTXOPTIONS 7
|
---|
226 | #define IFC_CTXSAVESIZE 8
|
---|
227 | #define IFC_NEXTENSIONS 9
|
---|
228 | #define IFC_NMANAGERS 10
|
---|
229 | #define IFC_MAX 10
|
---|
230 |
|
---|
231 | #endif
|
---|
232 |
|
---|
233 | #ifndef NOWTSTATUS
|
---|
234 |
|
---|
235 | #define WTI_STATUS 2
|
---|
236 | #define STA_CONTEXTS 1
|
---|
237 | #define STA_SYSCTXS 2
|
---|
238 | #define STA_PKTRATE 3
|
---|
239 | #define STA_PKTDATA 4
|
---|
240 | #define STA_MANAGERS 5
|
---|
241 | #define STA_SYSTEM 6
|
---|
242 | #define STA_BUTTONUSE 7
|
---|
243 | #define STA_SYSBTNUSE 8
|
---|
244 | #define STA_MAX 8
|
---|
245 |
|
---|
246 | #endif
|
---|
247 |
|
---|
248 | #ifndef NOWTDEFCONTEXT
|
---|
249 |
|
---|
250 | #define WTI_DEFCONTEXT 3
|
---|
251 | #define WTI_DEFSYSCTX 4
|
---|
252 | #define WTI_DDCTXS 400 /* 1.1 */
|
---|
253 | #define WTI_DSCTXS 500 /* 1.1 */
|
---|
254 | #define CTX_NAME 1
|
---|
255 | #define CTX_OPTIONS 2
|
---|
256 | #define CTX_STATUS 3
|
---|
257 | #define CTX_LOCKS 4
|
---|
258 | #define CTX_MSGBASE 5
|
---|
259 | #define CTX_DEVICE 6
|
---|
260 | #define CTX_PKTRATE 7
|
---|
261 | #define CTX_PKTDATA 8
|
---|
262 | #define CTX_PKTMODE 9
|
---|
263 | #define CTX_MOVEMASK 10
|
---|
264 | #define CTX_BTNDNMASK 11
|
---|
265 | #define CTX_BTNUPMASK 12
|
---|
266 | #define CTX_INORGX 13
|
---|
267 | #define CTX_INORGY 14
|
---|
268 | #define CTX_INORGZ 15
|
---|
269 | #define CTX_INEXTX 16
|
---|
270 | #define CTX_INEXTY 17
|
---|
271 | #define CTX_INEXTZ 18
|
---|
272 | #define CTX_OUTORGX 19
|
---|
273 | #define CTX_OUTORGY 20
|
---|
274 | #define CTX_OUTORGZ 21
|
---|
275 | #define CTX_OUTEXTX 22
|
---|
276 | #define CTX_OUTEXTY 23
|
---|
277 | #define CTX_OUTEXTZ 24
|
---|
278 | #define CTX_SENSX 25
|
---|
279 | #define CTX_SENSY 26
|
---|
280 | #define CTX_SENSZ 27
|
---|
281 | #define CTX_SYSMODE 28
|
---|
282 | #define CTX_SYSORGX 29
|
---|
283 | #define CTX_SYSORGY 30
|
---|
284 | #define CTX_SYSEXTX 31
|
---|
285 | #define CTX_SYSEXTY 32
|
---|
286 | #define CTX_SYSSENSX 33
|
---|
287 | #define CTX_SYSSENSY 34
|
---|
288 | #define CTX_MAX 34
|
---|
289 |
|
---|
290 | #endif
|
---|
291 |
|
---|
292 | #ifndef NOWTDEVICES
|
---|
293 |
|
---|
294 | #define WTI_DEVICES 100
|
---|
295 | #define DVC_NAME 1
|
---|
296 | #define DVC_HARDWARE 2
|
---|
297 | #define DVC_NCSRTYPES 3
|
---|
298 | #define DVC_FIRSTCSR 4
|
---|
299 | #define DVC_PKTRATE 5
|
---|
300 | #define DVC_PKTDATA 6
|
---|
301 | #define DVC_PKTMODE 7
|
---|
302 | #define DVC_CSRDATA 8
|
---|
303 | #define DVC_XMARGIN 9
|
---|
304 | #define DVC_YMARGIN 10
|
---|
305 | #define DVC_ZMARGIN 11
|
---|
306 | #define DVC_X 12
|
---|
307 | #define DVC_Y 13
|
---|
308 | #define DVC_Z 14
|
---|
309 | #define DVC_NPRESSURE 15
|
---|
310 | #define DVC_TPRESSURE 16
|
---|
311 | #define DVC_ORIENTATION 17
|
---|
312 | #define DVC_ROTATION 18 /* 1.1 */
|
---|
313 | #define DVC_PNPID 19 /* 1.1 */
|
---|
314 | #define DVC_MAX 19
|
---|
315 |
|
---|
316 | #endif
|
---|
317 |
|
---|
318 | #ifndef NOWTCURSORS
|
---|
319 |
|
---|
320 | #define WTI_CURSORS 200
|
---|
321 | #define CSR_NAME 1
|
---|
322 | #define CSR_ACTIVE 2
|
---|
323 | #define CSR_PKTDATA 3
|
---|
324 | #define CSR_BUTTONS 4
|
---|
325 | #define CSR_BUTTONBITS 5
|
---|
326 | #define CSR_BTNNAMES 6
|
---|
327 | #define CSR_BUTTONMAP 7
|
---|
328 | #define CSR_SYSBTNMAP 8
|
---|
329 | #define CSR_NPBUTTON 9
|
---|
330 | #define CSR_NPBTNMARKS 10
|
---|
331 | #define CSR_NPRESPONSE 11
|
---|
332 | #define CSR_TPBUTTON 12
|
---|
333 | #define CSR_TPBTNMARKS 13
|
---|
334 | #define CSR_TPRESPONSE 14
|
---|
335 | #define CSR_PHYSID 15 /* 1.1 */
|
---|
336 | #define CSR_MODE 16 /* 1.1 */
|
---|
337 | #define CSR_MINPKTDATA 17 /* 1.1 */
|
---|
338 | #define CSR_MINBUTTONS 18 /* 1.1 */
|
---|
339 | #define CSR_CAPABILITIES 19 /* 1.1 */
|
---|
340 | /* from http://www.wacomeng.com/devsupport/ibmpc/wacomwindevfaq.html */
|
---|
341 | #define CSR_TYPE 20
|
---|
342 | #define CSR_MAX 20
|
---|
343 |
|
---|
344 | #endif
|
---|
345 |
|
---|
346 | #ifndef NOWTEXTENSIONS
|
---|
347 |
|
---|
348 | #define WTI_EXTENSIONS 300
|
---|
349 | #define EXT_NAME 1
|
---|
350 | #define EXT_TAG 2
|
---|
351 | #define EXT_MASK 3
|
---|
352 | #define EXT_SIZE 4
|
---|
353 | #define EXT_AXES 5
|
---|
354 | #define EXT_DEFAULT 6
|
---|
355 | #define EXT_DEFCONTEXT 7
|
---|
356 | #define EXT_DEFSYSCTX 8
|
---|
357 | #define EXT_CURSORS 9
|
---|
358 | #define EXT_MAX 109 /* Allow 100 cursors */
|
---|
359 |
|
---|
360 | #endif
|
---|
361 |
|
---|
362 | #endif
|
---|
363 |
|
---|
364 | /***********************************************************************
|
---|
365 | * CONTEXT DATA DEFS
|
---|
366 | */
|
---|
367 |
|
---|
368 | #define LCNAMELEN 40
|
---|
369 | #define LC_NAMELEN 40
|
---|
370 |
|
---|
371 | typedef struct tagLOGCONTEXTA {
|
---|
372 | char lcName[LCNAMELEN];
|
---|
373 | UINT lcOptions;
|
---|
374 | UINT lcStatus;
|
---|
375 | UINT lcLocks;
|
---|
376 | UINT lcMsgBase;
|
---|
377 | UINT lcDevice;
|
---|
378 | UINT lcPktRate;
|
---|
379 | WTPKT lcPktData;
|
---|
380 | WTPKT lcPktMode;
|
---|
381 | WTPKT lcMoveMask;
|
---|
382 | DWORD lcBtnDnMask;
|
---|
383 | DWORD lcBtnUpMask;
|
---|
384 | LONG lcInOrgX;
|
---|
385 | LONG lcInOrgY;
|
---|
386 | LONG lcInOrgZ;
|
---|
387 | LONG lcInExtX;
|
---|
388 | LONG lcInExtY;
|
---|
389 | LONG lcInExtZ;
|
---|
390 | LONG lcOutOrgX;
|
---|
391 | LONG lcOutOrgY;
|
---|
392 | LONG lcOutOrgZ;
|
---|
393 | LONG lcOutExtX;
|
---|
394 | LONG lcOutExtY;
|
---|
395 | LONG lcOutExtZ;
|
---|
396 | FIX32 lcSensX;
|
---|
397 | FIX32 lcSensY;
|
---|
398 | FIX32 lcSensZ;
|
---|
399 | BOOL lcSysMode;
|
---|
400 | int lcSysOrgX;
|
---|
401 | int lcSysOrgY;
|
---|
402 | int lcSysExtX;
|
---|
403 | int lcSysExtY;
|
---|
404 | FIX32 lcSysSensX;
|
---|
405 | FIX32 lcSysSensY;
|
---|
406 | } LOGCONTEXTA, *PLOGCONTEXTA, *NPLOGCONTEXTA, *LPLOGCONTEXTA;
|
---|
407 |
|
---|
408 | typedef struct tagLOGCONTEXTW {
|
---|
409 | WCHAR lcName[LCNAMELEN];
|
---|
410 | UINT lcOptions;
|
---|
411 | UINT lcStatus;
|
---|
412 | UINT lcLocks;
|
---|
413 | UINT lcMsgBase;
|
---|
414 | UINT lcDevice;
|
---|
415 | UINT lcPktRate;
|
---|
416 | WTPKT lcPktData;
|
---|
417 | WTPKT lcPktMode;
|
---|
418 | WTPKT lcMoveMask;
|
---|
419 | DWORD lcBtnDnMask;
|
---|
420 | DWORD lcBtnUpMask;
|
---|
421 | LONG lcInOrgX;
|
---|
422 | LONG lcInOrgY;
|
---|
423 | LONG lcInOrgZ;
|
---|
424 | LONG lcInExtX;
|
---|
425 | LONG lcInExtY;
|
---|
426 | LONG lcInExtZ;
|
---|
427 | LONG lcOutOrgX;
|
---|
428 | LONG lcOutOrgY;
|
---|
429 | LONG lcOutOrgZ;
|
---|
430 | LONG lcOutExtX;
|
---|
431 | LONG lcOutExtY;
|
---|
432 | LONG lcOutExtZ;
|
---|
433 | FIX32 lcSensX;
|
---|
434 | FIX32 lcSensY;
|
---|
435 | FIX32 lcSensZ;
|
---|
436 | BOOL lcSysMode;
|
---|
437 | int lcSysOrgX;
|
---|
438 | int lcSysOrgY;
|
---|
439 | int lcSysExtX;
|
---|
440 | int lcSysExtY;
|
---|
441 | FIX32 lcSysSensX;
|
---|
442 | FIX32 lcSysSensY;
|
---|
443 | } LOGCONTEXTW, *PLOGCONTEXTW, *NPLOGCONTEXTW, *LPLOGCONTEXTW;
|
---|
444 |
|
---|
445 | DECL_WINELIB_TYPE_AW(LOGCONTEXT)
|
---|
446 | DECL_WINELIB_TYPE_AW(PLOGCONTEXT)
|
---|
447 | DECL_WINELIB_TYPE_AW(NPLOGCONTEXT)
|
---|
448 | DECL_WINELIB_TYPE_AW(LPLOGCONTEXT)
|
---|
449 |
|
---|
450 | /* context option values */
|
---|
451 | #define CXO_SYSTEM 0x0001
|
---|
452 | #define CXO_PEN 0x0002
|
---|
453 | #define CXO_MESSAGES 0x0004
|
---|
454 | #define CXO_MARGIN 0x8000
|
---|
455 | #define CXO_MGNINSIDE 0x4000
|
---|
456 | #define CXO_CSRMESSAGES 0x0008 /* 1.1 */
|
---|
457 |
|
---|
458 | /* context status values */
|
---|
459 | #define CXS_DISABLED 0x0001
|
---|
460 | #define CXS_OBSCURED 0x0002
|
---|
461 | #define CXS_ONTOP 0x0004
|
---|
462 |
|
---|
463 | /* context lock values */
|
---|
464 | #define CXL_INSIZE 0x0001
|
---|
465 | #define CXL_INASPECT 0x0002
|
---|
466 | #define CXL_SENSITIVITY 0x0004
|
---|
467 | #define CXL_MARGIN 0x0008
|
---|
468 | #define CXL_SYSOUT 0x0010
|
---|
469 |
|
---|
470 | /***********************************************************************
|
---|
471 | * EVENT DATA DEFS
|
---|
472 | */
|
---|
473 |
|
---|
474 | /* For packet structure definition, see pktdef.h */
|
---|
475 |
|
---|
476 | /* packet status values */
|
---|
477 | #define TPS_PROXIMITY 0x0001
|
---|
478 | #define TPS_QUEUE_ERR 0x0002
|
---|
479 | #define TPS_MARGIN 0x0004
|
---|
480 | #define TPS_GRAB 0x0008
|
---|
481 | #define TPS_INVERT 0x0010 /* 1.1 */
|
---|
482 |
|
---|
483 | typedef struct tagORIENTATION {
|
---|
484 | int orAzimuth;
|
---|
485 | int orAltitude;
|
---|
486 | int orTwist;
|
---|
487 | } ORIENTATION, *PORIENTATION, *NPORIENTATION, *LPORIENTATION;
|
---|
488 |
|
---|
489 | typedef struct tagROTATION { /* 1.1 */
|
---|
490 | int roPitch;
|
---|
491 | int roRoll;
|
---|
492 | int roYaw;
|
---|
493 | } ROTATION, *PROTATION, *NPROTATION, *LPROTATION;
|
---|
494 |
|
---|
495 | /* grandfather in obsolete member names. */
|
---|
496 | #define rotPitch roPitch
|
---|
497 | #define rotRoll roRoll
|
---|
498 | #define rotYaw roYaw
|
---|
499 |
|
---|
500 | /* relative buttons */
|
---|
501 | #define TBN_NONE 0
|
---|
502 | #define TBN_UP 1
|
---|
503 | #define TBN_DOWN 2
|
---|
504 |
|
---|
505 | /***********************************************************************
|
---|
506 | * DEVICE CONFIG CONSTANTS
|
---|
507 | */
|
---|
508 |
|
---|
509 | #ifndef NOWTDEVCFG
|
---|
510 |
|
---|
511 | #define WTDC_NONE 0
|
---|
512 | #define WTDC_CANCEL 1
|
---|
513 | #define WTDC_OK 2
|
---|
514 | #define WTDC_RESTART 3
|
---|
515 |
|
---|
516 | #endif
|
---|
517 |
|
---|
518 | /***********************************************************************
|
---|
519 | * HOOK CONSTANTS
|
---|
520 | */
|
---|
521 |
|
---|
522 | #ifndef NOWTHOOKS
|
---|
523 |
|
---|
524 | #define WTH_PLAYBACK 1
|
---|
525 | #define WTH_RECORD 2
|
---|
526 |
|
---|
527 | #define WTHC_GETLPLPFN (-3)
|
---|
528 | #define WTHC_LPLPFNNEXT (-2)
|
---|
529 | #define WTHC_LPFNNEXT (-1)
|
---|
530 | #define WTHC_ACTION 0
|
---|
531 | #define WTHC_GETNEXT 1
|
---|
532 | #define WTHC_SKIP 2
|
---|
533 |
|
---|
534 | #endif
|
---|
535 |
|
---|
536 | /***********************************************************************
|
---|
537 | * PREFERENCE FUNCTION CONSTANTS
|
---|
538 | */
|
---|
539 |
|
---|
540 | #ifndef NOWTPREF
|
---|
541 |
|
---|
542 | #define WTP_LPDEFAULT ((LPVOID)-1L)
|
---|
543 | #define WTP_DWDEFAULT ((DWORD)-1L)
|
---|
544 |
|
---|
545 | #endif
|
---|
546 |
|
---|
547 | /***********************************************************************
|
---|
548 | * EXTENSION TAGS AND CONSTANTS
|
---|
549 | */
|
---|
550 |
|
---|
551 | #ifndef NOWTEXTENSIONS
|
---|
552 |
|
---|
553 | /* constants for use with pktdef.h */
|
---|
554 | #define PKEXT_ABSOLUTE 1
|
---|
555 | #define PKEXT_RELATIVE 2
|
---|
556 |
|
---|
557 | /* Extension tags. */
|
---|
558 | #define WTX_OBT 0 /* Out of bounds tracking */
|
---|
559 | #define WTX_FKEYS 1 /* Function keys */
|
---|
560 | #define WTX_TILT 2 /* Raw Cartesian tilt; 1.1 */
|
---|
561 | #define WTX_CSRMASK 3 /* select input by cursor type; 1.1 */
|
---|
562 | #define WTX_XBTNMASK 4 /* Extended button mask; 1.1 */
|
---|
563 |
|
---|
564 | typedef struct tagXBTNMASK {
|
---|
565 | BYTE xBtnDnMask[32];
|
---|
566 | BYTE xBtnUpMask[32];
|
---|
567 | } XBTNMASK;
|
---|
568 |
|
---|
569 | typedef struct tagTILT { /* 1.1 */
|
---|
570 | int tiltX;
|
---|
571 | int tiltY;
|
---|
572 | } TILT;
|
---|
573 |
|
---|
574 | #endif
|
---|
575 |
|
---|
576 | /***********************************************************************
|
---|
577 | * Functions
|
---|
578 | */
|
---|
579 |
|
---|
580 | #ifndef NOWTCALLBACKS
|
---|
581 |
|
---|
582 | #ifndef NOWTMANAGERFXNS
|
---|
583 |
|
---|
584 | /* callback function types */
|
---|
585 | typedef BOOL (WINAPI * WTENUMPROC)(HCTX, LPARAM); /* changed CALLBACK->WINAPI, 1.1 */
|
---|
586 | typedef BOOL (WINAPI * WTCONFIGPROC)(HCTX, HWND);
|
---|
587 | typedef LRESULT (WINAPI * WTHOOKPROC)(int, WPARAM, LPARAM);
|
---|
588 | typedef WTHOOKPROC *LPWTHOOKPROC;
|
---|
589 |
|
---|
590 | #endif
|
---|
591 |
|
---|
592 | #endif
|
---|
593 |
|
---|
594 | #ifndef NOWTFUNCTIONS
|
---|
595 |
|
---|
596 | #ifndef NOWTBASICFXNS
|
---|
597 | /* BASIC FUNCTIONS */
|
---|
598 |
|
---|
599 | #define ORD_WTInfoA 20
|
---|
600 | #define ORD_WTInfoW 1020
|
---|
601 | #define ORD_WTInfo WINELIB_NAME_AW(ORD_WTInfo)
|
---|
602 | #define ORD_WTOpenA 21
|
---|
603 | #define ORD_WTOpenW 1021
|
---|
604 | #define ORD_WTOpen WINELIB_NAME_AW(ORD_WTOpen)
|
---|
605 | #define ORD_WTClose 22
|
---|
606 | #define ORD_WTPacketsGet 23
|
---|
607 | #define ORD_WTPacket 24
|
---|
608 |
|
---|
609 | UINT WINAPI WTInfoA(UINT, UINT, LPVOID);
|
---|
610 | UINT WINAPI WTInfoW(UINT, UINT, LPVOID);
|
---|
611 | #define WTInfo WINELIB_NAME_AW(WTInfo)
|
---|
612 | HCTX WINAPI WTOpenA(HWND, LPLOGCONTEXTA, BOOL);
|
---|
613 | HCTX WINAPI WTOpenW(HWND, LPLOGCONTEXTW, BOOL);
|
---|
614 | #define WTOpen WINELIB_NAME_AW(WTOpen)
|
---|
615 | BOOL WINAPI WTClose(HCTX);
|
---|
616 | int WINAPI WTPacketsGet(HCTX, int, LPVOID);
|
---|
617 | BOOL WINAPI WTPacket(HCTX, UINT, LPVOID);
|
---|
618 |
|
---|
619 | #endif
|
---|
620 |
|
---|
621 | #ifndef NOWTVISIBILITYFXNS
|
---|
622 | /* VISIBILITY FUNCTIONS */
|
---|
623 |
|
---|
624 | #define ORD_WTEnable 40
|
---|
625 | #define ORD_WTOverlap 41
|
---|
626 |
|
---|
627 | BOOL WINAPI WTEnable(HCTX, BOOL);
|
---|
628 | BOOL WINAPI WTOverlap(HCTX, BOOL);
|
---|
629 |
|
---|
630 | #endif
|
---|
631 |
|
---|
632 | #ifndef NOWTCTXEDITFXNS
|
---|
633 | /* CONTEXT EDITING FUNCTIONS */
|
---|
634 |
|
---|
635 | #define ORD_WTConfig 60
|
---|
636 | #define ORD_WTGetA 61
|
---|
637 | #define ORD_WTGetW 1061
|
---|
638 | #define ORD_WTGet WINELIB_NAME_AW(ORD_WTGet)
|
---|
639 | #define ORD_WTSetA 62
|
---|
640 | #define ORD_WTSetW 1062
|
---|
641 | #define ORD_WTSet WINELIB_NAME_AW(ORD_WTSet)
|
---|
642 | #define ORD_WTExtGet 63
|
---|
643 | #define ORD_WTExtSet 64
|
---|
644 | #define ORD_WTSave 65
|
---|
645 | #define ORD_WTRestore 66
|
---|
646 |
|
---|
647 | BOOL WINAPI WTConfig(HCTX, HWND);
|
---|
648 | BOOL WINAPI WTGetA(HCTX, LPLOGCONTEXTA);
|
---|
649 | BOOL WINAPI WTGetW(HCTX, LPLOGCONTEXTW);
|
---|
650 | #define WTGet WINELIB_NAME_AW(WTGet)
|
---|
651 | BOOL WINAPI WTSetA(HCTX, LPLOGCONTEXTA);
|
---|
652 | BOOL WINAPI WTSetW(HCTX, LPLOGCONTEXTW);
|
---|
653 | #define WTSet WINELIB_NAME_AW(WTSet)
|
---|
654 | BOOL WINAPI WTExtGet(HCTX, UINT, LPVOID);
|
---|
655 | BOOL WINAPI WTExtSet(HCTX, UINT, LPVOID);
|
---|
656 | BOOL WINAPI WTSave(HCTX, LPVOID);
|
---|
657 | HCTX WINAPI WTRestore(HWND, LPVOID, BOOL);
|
---|
658 |
|
---|
659 | #endif
|
---|
660 |
|
---|
661 | #ifndef NOWTQUEUEFXNS
|
---|
662 | /* ADVANCED PACKET AND QUEUE FUNCTIONS */
|
---|
663 |
|
---|
664 | #define ORD_WTPacketsPeek 80
|
---|
665 | #define ORD_WTDataGet 81
|
---|
666 | #define ORD_WTDataPeek 82
|
---|
667 | #define ORD_WTQueueSizeGet 84
|
---|
668 | #define ORD_WTQueueSizeSet 85
|
---|
669 |
|
---|
670 | int WINAPI WTPacketsPeek(HCTX, int, LPVOID);
|
---|
671 | int WINAPI WTDataGet(HCTX, UINT, UINT, int, LPVOID, LPINT);
|
---|
672 | int WINAPI WTDataPeek(HCTX, UINT, UINT, int, LPVOID, LPINT);
|
---|
673 | int WINAPI WTQueueSizeGet(HCTX);
|
---|
674 | BOOL WINAPI WTQueueSizeSet(HCTX, int);
|
---|
675 |
|
---|
676 | #endif
|
---|
677 |
|
---|
678 | #ifndef NOWTHMGRFXNS
|
---|
679 | /* MANAGER HANDLE FUNCTIONS */
|
---|
680 |
|
---|
681 | #define ORD_WTMgrOpen 100
|
---|
682 | #define ORD_WTMgrClose 101
|
---|
683 |
|
---|
684 | HMGR WINAPI WTMgrOpen(HWND, UINT);
|
---|
685 | BOOL WINAPI WTMgrClose(HMGR);
|
---|
686 |
|
---|
687 | #endif
|
---|
688 |
|
---|
689 | #ifndef NOWTMGRCTXFXNS
|
---|
690 | /* MANAGER CONTEXT FUNCTIONS */
|
---|
691 |
|
---|
692 | #define ORD_WTMgrContextEnum 120
|
---|
693 | #define ORD_WTMgrContextOwner 121
|
---|
694 | #define ORD_WTMgrDefContext 122
|
---|
695 | #define ORD_WTMgrDefContextEx 206
|
---|
696 |
|
---|
697 | BOOL WINAPI WTMgrContextEnum(HMGR, WTENUMPROC, LPARAM);
|
---|
698 | HWND WINAPI WTMgrContextOwner(HMGR, HCTX);
|
---|
699 | HCTX WINAPI WTMgrDefContext(HMGR, BOOL);
|
---|
700 | HCTX WINAPI WTMgrDefContextEx(HMGR, UINT, BOOL); /* 1.1 */
|
---|
701 |
|
---|
702 | #endif
|
---|
703 |
|
---|
704 | #ifndef NOWTMGRCONFIGFXNS
|
---|
705 | /* MANAGER CONFIG BOX FUNCTIONS */
|
---|
706 |
|
---|
707 | #define ORD_WTMgrDeviceConfig 140
|
---|
708 |
|
---|
709 | UINT WINAPI WTMgrDeviceConfig(HMGR, UINT, HWND);
|
---|
710 |
|
---|
711 | #endif
|
---|
712 |
|
---|
713 | #ifndef NOWTMGRHOOKFXNS
|
---|
714 | /* MANAGER PACKET HOOK FUNCTIONS */
|
---|
715 |
|
---|
716 | /* OBSOLETE IN WIN32! */
|
---|
717 |
|
---|
718 | #endif
|
---|
719 |
|
---|
720 | #ifndef NOWTMGRPREFFXNS
|
---|
721 | /* MANAGER PREFERENCE DATA FUNCTIONS */
|
---|
722 |
|
---|
723 | #define ORD_WTMgrExt 180
|
---|
724 | #define ORD_WTMgrCsrEnable 181
|
---|
725 | #define ORD_WTMgrCsrButtonMap 182
|
---|
726 | #define ORD_WTMgrCsrPressureBtnMarks 183
|
---|
727 | #define ORD_WTMgrCsrPressureResponse 184
|
---|
728 | #define ORD_WTMgrCsrExt 185
|
---|
729 |
|
---|
730 | BOOL WINAPI WTMgrExt(HMGR, UINT, LPVOID);
|
---|
731 | BOOL WINAPI WTMgrCsrEnable(HMGR, UINT, BOOL);
|
---|
732 | BOOL WINAPI WTMgrCsrButtonMap(HMGR, UINT, LPBYTE, LPBYTE);
|
---|
733 | BOOL WINAPI WTMgrCsrPressureBtnMarks(HMGR, UINT, DWORD, DWORD);
|
---|
734 | BOOL WINAPI WTMgrCsrPressureResponse(HMGR, UINT, UINT *, UINT *);
|
---|
735 | BOOL WINAPI WTMgrCsrExt(HMGR, UINT, UINT, LPVOID);
|
---|
736 |
|
---|
737 | #endif
|
---|
738 |
|
---|
739 | /***********************************************************************
|
---|
740 | * Win32 replacements for non-portable functions.
|
---|
741 | */
|
---|
742 |
|
---|
743 | #ifndef NOWTQUEUEFXNS
|
---|
744 | /* ADVANCED PACKET AND QUEUE FUNCTIONS */
|
---|
745 |
|
---|
746 | #define ORD_WTQueuePacketsEx 200
|
---|
747 |
|
---|
748 | BOOL WINAPI WTQueuePacketsEx(HCTX, UINT *, UINT *);
|
---|
749 |
|
---|
750 | #endif
|
---|
751 |
|
---|
752 | #ifndef NOWTMGRCONFIGFXNS
|
---|
753 | /* MANAGER CONFIG BOX FUNCTIONS */
|
---|
754 |
|
---|
755 | #define ORD_WTMgrConfigReplaceExA 202
|
---|
756 | #define ORD_WTMgrConfigReplaceExW 1202
|
---|
757 | #define ORD_WTMgrConfigReplaceEx WINELIB_NAME_AW(ORD_WTMgrConfigReplaceEx)
|
---|
758 |
|
---|
759 | BOOL WINAPI WTMgrConfigReplaceExA(HMGR, BOOL, LPSTR, LPSTR);
|
---|
760 | BOOL WINAPI WTMgrConfigReplaceExW(HMGR, BOOL, LPWSTR, LPSTR);
|
---|
761 | #define WTMgrConfigReplaceEx WINELIB_NAME_AW(WTMgrConfigReplaceEx)
|
---|
762 |
|
---|
763 | #endif
|
---|
764 |
|
---|
765 | #ifndef NOWTMGRHOOKFXNS
|
---|
766 | /* MANAGER PACKET HOOK FUNCTIONS */
|
---|
767 |
|
---|
768 | #define ORD_WTMgrPacketHookExA 203
|
---|
769 | #define ORD_WTMgrPacketHookExW 1203
|
---|
770 | #define ORD_WTMgrPacketHookEx WINELIB_NAME_AW(ORD_WTMgrPacketHookEx)
|
---|
771 | #define ORD_WTMgrPacketUnhook 204
|
---|
772 | #define ORD_WTMgrPacketHookNext 205
|
---|
773 |
|
---|
774 | HWTHOOK WINAPI WTMgrPacketHookExA(HMGR, int, LPSTR, LPSTR);
|
---|
775 | HWTHOOK WINAPI WTMgrPacketHookExW(HMGR, int, LPWSTR, LPSTR);
|
---|
776 | #define WTMgrPacketHookEx WINELIB_NAME_AW(WTMgrPacketHookEx)
|
---|
777 | BOOL WINAPI WTMgrPacketUnhook(HWTHOOK);
|
---|
778 | LRESULT WINAPI WTMgrPacketHookNext(HWTHOOK, int, WPARAM, LPARAM);
|
---|
779 |
|
---|
780 | #endif
|
---|
781 |
|
---|
782 | #ifndef NOWTMGRPREFFXNS
|
---|
783 | /* MANAGER PREFERENCE DATA FUNCTIONS */
|
---|
784 |
|
---|
785 | #define ORD_WTMgrCsrPressureBtnMarksEx 201
|
---|
786 |
|
---|
787 | BOOL WINAPI WTMgrCsrPressureBtnMarksEx(HMGR, UINT, UINT *, UINT *);
|
---|
788 |
|
---|
789 | #endif
|
---|
790 |
|
---|
791 | #endif
|
---|
792 |
|
---|
793 | #ifdef __cplusplus
|
---|
794 | } /* extern "C" */
|
---|
795 | #endif /* defined(__cplusplus) */
|
---|
796 |
|
---|
797 | #endif /* defined(__WINE_WINTAB_H */
|
---|