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