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