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