]> Pileus Git - ~andy/gtk/blob - gdk/win32/wintab.h
x11: Use boolean instead of enum for errors in xsettings code
[~andy/gtk] / gdk / win32 / wintab.h
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_MAX                         19
324
325 #endif
326
327 #ifndef NOWTEXTENSIONS
328
329 #define WTI_EXTENSIONS  300
330         #define EXT_NAME                1
331         #define EXT_TAG                 2
332         #define EXT_MASK                3
333         #define EXT_SIZE                4
334         #define EXT_AXES                5
335         #define EXT_DEFAULT             6
336         #define EXT_DEFCONTEXT  7
337         #define EXT_DEFSYSCTX   8
338         #define EXT_CURSORS             9 
339         #define EXT_MAX                 109 /* Allow 100 cursors */
340
341 #endif
342
343 #endif
344
345 /* -------------------------------------------------------------------------- */
346 /* CONTEXT DATA DEFS */
347
348 #define LCNAMELEN       40
349 #define LC_NAMELEN      40
350 #ifdef WIN32
351 typedef struct tagLOGCONTEXTA {
352         char    lcName[LCNAMELEN];
353         UINT    lcOptions;
354         UINT    lcStatus;
355         UINT    lcLocks;
356         UINT    lcMsgBase;
357         UINT    lcDevice;
358         UINT    lcPktRate;
359         WTPKT   lcPktData;
360         WTPKT   lcPktMode;
361         WTPKT   lcMoveMask;
362         DWORD   lcBtnDnMask;
363         DWORD   lcBtnUpMask;
364         LONG    lcInOrgX;
365         LONG    lcInOrgY;
366         LONG    lcInOrgZ;
367         LONG    lcInExtX;
368         LONG    lcInExtY;
369         LONG    lcInExtZ;
370         LONG    lcOutOrgX;
371         LONG    lcOutOrgY;
372         LONG    lcOutOrgZ;
373         LONG    lcOutExtX;
374         LONG    lcOutExtY;
375         LONG    lcOutExtZ;
376         FIX32   lcSensX;
377         FIX32   lcSensY;
378         FIX32   lcSensZ;
379         BOOL    lcSysMode;
380         int             lcSysOrgX;
381         int             lcSysOrgY;
382         int             lcSysExtX;
383         int             lcSysExtY;
384         FIX32   lcSysSensX;
385         FIX32   lcSysSensY;
386 } LOGCONTEXTA, *PLOGCONTEXTA, NEAR *NPLOGCONTEXTA, FAR *LPLOGCONTEXTA;
387 typedef struct tagLOGCONTEXTW {
388         WCHAR   lcName[LCNAMELEN];
389         UINT    lcOptions;
390         UINT    lcStatus;
391         UINT    lcLocks;
392         UINT    lcMsgBase;
393         UINT    lcDevice;
394         UINT    lcPktRate;
395         WTPKT   lcPktData;
396         WTPKT   lcPktMode;
397         WTPKT   lcMoveMask;
398         DWORD   lcBtnDnMask;
399         DWORD   lcBtnUpMask;
400         LONG    lcInOrgX;
401         LONG    lcInOrgY;
402         LONG    lcInOrgZ;
403         LONG    lcInExtX;
404         LONG    lcInExtY;
405         LONG    lcInExtZ;
406         LONG    lcOutOrgX;
407         LONG    lcOutOrgY;
408         LONG    lcOutOrgZ;
409         LONG    lcOutExtX;
410         LONG    lcOutExtY;
411         LONG    lcOutExtZ;
412         FIX32   lcSensX;
413         FIX32   lcSensY;
414         FIX32   lcSensZ;
415         BOOL    lcSysMode;
416         int             lcSysOrgX;
417         int             lcSysOrgY;
418         int             lcSysExtX;
419         int             lcSysExtY;
420         FIX32   lcSysSensX;
421         FIX32   lcSysSensY;
422 } LOGCONTEXTW, *PLOGCONTEXTW, NEAR *NPLOGCONTEXTW, FAR *LPLOGCONTEXTW;
423 #ifdef UNICODE
424 typedef LOGCONTEXTW LOGCONTEXT;
425 typedef PLOGCONTEXTW PLOGCONTEXT;
426 typedef NPLOGCONTEXTW NPLOGCONTEXT;
427 typedef LPLOGCONTEXTW LPLOGCONTEXT;
428 #else
429 typedef LOGCONTEXTA LOGCONTEXT;
430 typedef PLOGCONTEXTA PLOGCONTEXT;
431 typedef NPLOGCONTEXTA NPLOGCONTEXT;
432 typedef LPLOGCONTEXTA LPLOGCONTEXT;
433 #endif /* UNICODE */
434 #else /* WIN32 */
435 typedef struct tagLOGCONTEXT {
436         char    lcName[LCNAMELEN];
437         UINT    lcOptions;
438         UINT    lcStatus;
439         UINT    lcLocks;
440         UINT    lcMsgBase;
441         UINT    lcDevice;
442         UINT    lcPktRate;
443         WTPKT   lcPktData;
444         WTPKT   lcPktMode;
445         WTPKT   lcMoveMask;
446         DWORD   lcBtnDnMask;
447         DWORD   lcBtnUpMask;
448         LONG    lcInOrgX;
449         LONG    lcInOrgY;
450         LONG    lcInOrgZ;
451         LONG    lcInExtX;
452         LONG    lcInExtY;
453         LONG    lcInExtZ;
454         LONG    lcOutOrgX;
455         LONG    lcOutOrgY;
456         LONG    lcOutOrgZ;
457         LONG    lcOutExtX;
458         LONG    lcOutExtY;
459         LONG    lcOutExtZ;
460         FIX32   lcSensX;
461         FIX32   lcSensY;
462         FIX32   lcSensZ;
463         BOOL    lcSysMode;
464         int             lcSysOrgX;
465         int             lcSysOrgY;
466         int             lcSysExtX;
467         int             lcSysExtY;
468         FIX32   lcSysSensX;
469         FIX32   lcSysSensY;
470 } LOGCONTEXT, *PLOGCONTEXT, NEAR *NPLOGCONTEXT, FAR *LPLOGCONTEXT;
471 #endif /* WIN32 */
472
473         /* context option values */
474         #define CXO_SYSTEM              0x0001
475         #define CXO_PEN                 0x0002
476         #define CXO_MESSAGES    0x0004
477         #define CXO_MARGIN              0x8000
478         #define CXO_MGNINSIDE   0x4000
479         #define CXO_CSRMESSAGES 0x0008 /* 1.1 */
480
481         /* context status values */
482         #define CXS_DISABLED    0x0001
483         #define CXS_OBSCURED    0x0002
484         #define CXS_ONTOP               0x0004
485
486         /* context lock values */
487         #define CXL_INSIZE              0x0001
488         #define CXL_INASPECT    0x0002
489         #define CXL_SENSITIVITY 0x0004
490         #define CXL_MARGIN              0x0008
491         #define CXL_SYSOUT              0x0010
492
493 /* -------------------------------------------------------------------------- */
494 /* EVENT DATA DEFS */
495
496 /* For packet structure definition, see pktdef.h */
497
498 /* packet status values */
499 #define TPS_PROXIMITY           0x0001
500 #define TPS_QUEUE_ERR           0x0002
501 #define TPS_MARGIN                      0x0004
502 #define TPS_GRAB                        0x0008
503 #define TPS_INVERT                      0x0010 /* 1.1 */
504
505 typedef struct tagORIENTATION {
506         int orAzimuth;
507         int orAltitude;
508         int orTwist;
509 } ORIENTATION, *PORIENTATION, NEAR *NPORIENTATION, FAR *LPORIENTATION;
510
511 typedef struct tagROTATION { /* 1.1 */
512         int     roPitch;
513         int roRoll;
514         int roYaw;
515 } ROTATION, *PROTATION, NEAR *NPROTATION, FAR *LPROTATION;
516 // grandfather in obsolete member names.
517 #define rotPitch        roPitch
518 #define rotRoll         roRoll
519 #define rotYaw          roYaw
520
521 /* relative buttons */
522 #define TBN_NONE        0
523 #define TBN_UP          1
524 #define TBN_DOWN        2
525
526 /* -------------------------------------------------------------------------- */
527 /* DEVICE CONFIG CONSTANTS */
528
529 #ifndef NOWTDEVCFG
530
531 #define WTDC_NONE               0
532 #define WTDC_CANCEL             1
533 #define WTDC_OK                 2
534 #define WTDC_RESTART    3
535
536 #endif
537
538 /* -------------------------------------------------------------------------- */
539 /* HOOK CONSTANTS */
540
541 #ifndef NOWTHOOKS
542
543 #define WTH_PLAYBACK            1
544 #define WTH_RECORD                      2
545
546 #define WTHC_GETLPLPFN      (-3)
547 #define WTHC_LPLPFNNEXT     (-2)
548 #define WTHC_LPFNNEXT       (-1)
549 #define WTHC_ACTION                 0
550 #define WTHC_GETNEXT        1
551 #define WTHC_SKIP                       2
552
553 #endif
554
555 /* -------------------------------------------------------------------------- */
556 /* PREFERENCE FUNCTION CONSTANTS */
557
558 #ifndef NOWTPREF
559
560 #define WTP_LPDEFAULT   ((LPVOID)-1L)
561 #define WTP_DWDEFAULT   ((DWORD)-1L)
562
563 #endif
564
565 /* -------------------------------------------------------------------------- */
566 /* EXTENSION TAGS AND CONSTANTS */
567
568 #ifndef NOWTEXTENSIONS
569
570 /* constants for use with pktdef.h */
571 #define PKEXT_ABSOLUTE  1
572 #define PKEXT_RELATIVE  2
573
574 /* Extension tags. */
575 #define WTX_OBT                 0       /* Out of bounds tracking */
576 #define WTX_FKEYS               1       /* Function keys */
577 #define WTX_TILT                2       /* Raw Cartesian tilt; 1.1 */
578 #define WTX_CSRMASK             3       /* select input by cursor type; 1.1 */
579 #define WTX_XBTNMASK    4       /* Extended button mask; 1.1 */
580
581 typedef struct tagXBTNMASK {
582         BYTE xBtnDnMask[32];
583         BYTE xBtnUpMask[32];
584 } XBTNMASK;
585
586 typedef struct tagTILT { /* 1.1 */
587         int tiltX;
588         int tiltY;
589 } TILT;
590
591 #endif
592
593 /* -------------------------------------------------------------------------- */
594 /* -------------------------------------------------------------------------- */
595 /* Functions */
596
597         #ifndef API
598                 #ifndef WINAPI
599                         #define API                     FAR PASCAL
600                 #else
601                         #define API                     WINAPI
602                 #endif
603         #endif
604
605 #ifndef NOWTCALLBACKS
606
607         #ifndef CALLBACK
608         #define CALLBACK        FAR PASCAL
609         #endif
610
611         #ifndef NOWTMANAGERFXNS
612         /* callback function types */
613         typedef BOOL (WINAPI * WTENUMPROC)(HCTX, LPARAM); /* changed CALLBACK->WINAPI, 1.1 */
614         typedef BOOL (WINAPI * WTCONFIGPROC)(HCTX, HWND);
615         typedef LRESULT (WINAPI * WTHOOKPROC)(int, WPARAM, LPARAM);
616         typedef WTHOOKPROC FAR *LPWTHOOKPROC;
617         #endif
618
619 #endif
620
621
622 #ifndef NOWTFUNCTIONS
623
624         #ifndef NOWTBASICFXNS
625         /* BASIC FUNCTIONS */
626 #ifdef WIN32
627         UINT API WTInfoA(UINT, UINT, LPVOID);
628         #define ORD_WTInfoA                                             20
629         UINT API WTInfoW(UINT, UINT, LPVOID);
630         #define ORD_WTInfoW                                       1020
631         #ifdef UNICODE
632         #define WTInfo  WTInfoW
633         #define ORD_WTInfo  ORD_WTInfoW
634         #else
635         #define WTInfo  WTInfoA
636         #define ORD_WTInfo  ORD_WTInfoA
637         #endif /* !UNICODE */
638 #else
639         UINT API WTInfo(UINT, UINT, LPVOID);
640         #define ORD_WTInfo                                              20
641 #endif
642 #ifdef WIN32
643         HCTX API WTOpenA(HWND, LPLOGCONTEXTA, BOOL);
644         #define ORD_WTOpenA                                             21
645         HCTX API WTOpenW(HWND, LPLOGCONTEXTW, BOOL);
646         #define ORD_WTOpenW                                       1021
647         #ifdef UNICODE
648         #define WTOpen  WTOpenW
649         #define ORD_WTOpen  ORD_WTOpenW
650         #else
651         #define WTOpen  WTOpenA
652         #define ORD_WTOpen  ORD_WTOpenA
653         #endif /* !UNICODE */
654 #else
655         HCTX API WTOpen(HWND, LPLOGCONTEXT, BOOL);
656         #define ORD_WTOpen                                              21
657 #endif
658         BOOL API WTClose(HCTX);
659         #define ORD_WTClose                                             22
660         int API WTPacketsGet(HCTX, int, LPVOID);
661         #define ORD_WTPacketsGet                                23
662         BOOL API WTPacket(HCTX, UINT, LPVOID);
663         #define ORD_WTPacket                                    24
664         #endif
665
666         #ifndef NOWTVISIBILITYFXNS
667         /* VISIBILITY FUNCTIONS */
668         BOOL API WTEnable(HCTX, BOOL);
669         #define ORD_WTEnable                                    40
670         BOOL API WTOverlap(HCTX, BOOL);
671         #define ORD_WTOverlap                                   41
672         #endif
673
674         #ifndef NOWTCTXEDITFXNS
675         /* CONTEXT EDITING FUNCTIONS */
676         BOOL API WTConfig(HCTX, HWND);
677         #define ORD_WTConfig                                    60
678 #ifdef WIN32
679         BOOL API WTGetA(HCTX, LPLOGCONTEXTA);
680         #define ORD_WTGetA                                              61
681         BOOL API WTGetW(HCTX, LPLOGCONTEXTW);
682         #define ORD_WTGetW                                        1061
683         #ifdef UNICODE
684         #define WTGet  WTGetW
685         #define ORD_WTGet  ORD_WTGetW
686         #else
687         #define WTGet  WTGetA
688         #define ORD_WTGet  ORD_WTGetA
689         #endif /* !UNICODE */
690 #else
691         BOOL API WTGet(HCTX, LPLOGCONTEXT);
692         #define ORD_WTGet                                               61
693 #endif
694 #ifdef WIN32
695         BOOL API WTSetA(HCTX, LPLOGCONTEXTA);
696         #define ORD_WTSetA                                              62
697         BOOL API WTSetW(HCTX, LPLOGCONTEXTW);
698         #define ORD_WTSetW                                        1062
699         #ifdef UNICODE
700         #define WTSet  WTSetW
701         #define ORD_WTSet  ORD_WTSetW
702         #else
703         #define WTSet  WTSetA
704         #define ORD_WTSet  ORD_WTSetA
705         #endif /* !UNICODE */
706 #else
707         BOOL API WTSet(HCTX, LPLOGCONTEXT);
708         #define ORD_WTSet                                               62
709 #endif
710         BOOL API WTExtGet(HCTX, UINT, LPVOID);
711         #define ORD_WTExtGet                                    63
712         BOOL API WTExtSet(HCTX, UINT, LPVOID);
713         #define ORD_WTExtSet                                    64
714         BOOL API WTSave(HCTX, LPVOID);
715         #define ORD_WTSave                                              65
716         HCTX API WTRestore(HWND, LPVOID, BOOL);
717         #define ORD_WTRestore                                   66
718         #endif
719
720         #ifndef NOWTQUEUEFXNS
721         /* ADVANCED PACKET AND QUEUE FUNCTIONS */
722         int API WTPacketsPeek(HCTX, int, LPVOID);
723         #define ORD_WTPacketsPeek                               80
724         int API WTDataGet(HCTX, UINT, UINT, int, LPVOID, LPINT);
725         #define ORD_WTDataGet                                   81
726         int API WTDataPeek(HCTX, UINT, UINT, int, LPVOID, LPINT);
727         #define ORD_WTDataPeek                                  82
728 #ifndef WIN32
729 /* OBSOLETE IN WIN32! */
730         DWORD API WTQueuePackets(HCTX);
731         #define ORD_WTQueuePackets                              83
732 #endif
733         int API WTQueueSizeGet(HCTX);
734         #define ORD_WTQueueSizeGet                              84
735         BOOL API WTQueueSizeSet(HCTX, int);
736         #define ORD_WTQueueSizeSet                              85
737         #endif
738
739         #ifndef NOWTHMGRFXNS
740         /* MANAGER HANDLE FUNCTIONS */
741         HMGR API WTMgrOpen(HWND, UINT);
742         #define ORD_WTMgrOpen                                   100
743         BOOL API WTMgrClose(HMGR);
744         #define ORD_WTMgrClose                                  101
745         #endif
746
747         #ifndef NOWTMGRCTXFXNS
748         /* MANAGER CONTEXT FUNCTIONS */
749         BOOL API WTMgrContextEnum(HMGR, WTENUMPROC, LPARAM);
750         #define ORD_WTMgrContextEnum                    120
751         HWND API WTMgrContextOwner(HMGR, HCTX);
752         #define ORD_WTMgrContextOwner                   121
753         HCTX API WTMgrDefContext(HMGR, BOOL);
754         #define ORD_WTMgrDefContext                             122
755         HCTX API WTMgrDefContextEx(HMGR, UINT, BOOL); /* 1.1 */
756         #define ORD_WTMgrDefContextEx                   206
757         #endif
758         
759         #ifndef NOWTMGRCONFIGFXNS
760         /* MANAGER CONFIG BOX  FUNCTIONS */
761         UINT API WTMgrDeviceConfig(HMGR, UINT, HWND);
762         #define ORD_WTMgrDeviceConfig                   140
763 #ifndef WIN32
764 /* OBSOLETE IN WIN32! */
765         BOOL API WTMgrConfigReplace(HMGR, BOOL, WTCONFIGPROC);
766         #define ORD_WTMgrConfigReplace                  141
767 #endif
768         #endif
769
770         #ifndef NOWTMGRHOOKFXNS
771         /* MANAGER PACKET HOOK FUNCTIONS */
772 #ifndef WIN32
773 /* OBSOLETE IN WIN32! */
774         WTHOOKPROC API WTMgrPacketHook(HMGR, BOOL, int, WTHOOKPROC);
775         #define ORD_WTMgrPacketHook                             160
776         LRESULT API WTMgrPacketHookDefProc(int, WPARAM, LPARAM, LPWTHOOKPROC);
777         #define ORD_WTMgrPacketHookDefProc              161
778 #endif
779         #endif
780
781         #ifndef NOWTMGRPREFFXNS
782         /* MANAGER PREFERENCE DATA FUNCTIONS */
783         BOOL API WTMgrExt(HMGR, UINT, LPVOID);
784         #define ORD_WTMgrExt                                    180
785         BOOL API WTMgrCsrEnable(HMGR, UINT, BOOL);
786         #define ORD_WTMgrCsrEnable                              181
787         BOOL API WTMgrCsrButtonMap(HMGR, UINT, LPBYTE, LPBYTE);
788         #define ORD_WTMgrCsrButtonMap                   182
789         BOOL API WTMgrCsrPressureBtnMarks(HMGR, UINT, DWORD, DWORD);
790         #define ORD_WTMgrCsrPressureBtnMarks    183
791         BOOL API WTMgrCsrPressureResponse(HMGR, UINT, UINT FAR *, UINT FAR *);
792         #define ORD_WTMgrCsrPressureResponse    184
793         BOOL API WTMgrCsrExt(HMGR, UINT, UINT, LPVOID);
794         #define ORD_WTMgrCsrExt                                 185
795         #endif
796
797 /* Win32 replacements for non-portable functions. */
798         #ifndef NOWTQUEUEFXNS
799         /* ADVANCED PACKET AND QUEUE FUNCTIONS */
800         BOOL API WTQueuePacketsEx(HCTX, UINT FAR *, UINT FAR *);
801         #define ORD_WTQueuePacketsEx                    200
802         #endif
803
804         #ifndef NOWTMGRCONFIGFXNS
805         /* MANAGER CONFIG BOX  FUNCTIONS */
806 #ifdef WIN32
807         BOOL API WTMgrConfigReplaceExA(HMGR, BOOL, LPSTR, LPSTR);
808         #define ORD_WTMgrConfigReplaceExA               202
809         BOOL API WTMgrConfigReplaceExW(HMGR, BOOL, LPWSTR, LPSTR);
810         #define ORD_WTMgrConfigReplaceExW               1202
811         #ifdef UNICODE
812         #define WTMgrConfigReplaceEx  WTMgrConfigReplaceExW
813         #define ORD_WTMgrConfigReplaceEx  ORD_WTMgrConfigReplaceExW
814         #else
815         #define WTMgrConfigReplaceEx  WTMgrConfigReplaceExA
816         #define ORD_WTMgrConfigReplaceEx  ORD_WTMgrConfigReplaceExA
817         #endif /* !UNICODE */
818 #else
819         BOOL API WTMgrConfigReplaceEx(HMGR, BOOL, LPSTR, LPSTR);
820         #define ORD_WTMgrConfigReplaceEx                202
821 #endif
822         #endif
823
824         #ifndef NOWTMGRHOOKFXNS
825         /* MANAGER PACKET HOOK FUNCTIONS */
826 #ifdef WIN32
827         HWTHOOK API WTMgrPacketHookExA(HMGR, int, LPSTR, LPSTR);
828         #define ORD_WTMgrPacketHookExA                  203
829         HWTHOOK API WTMgrPacketHookExW(HMGR, int, LPWSTR, LPSTR);
830         #define ORD_WTMgrPacketHookExW                  1203
831         #ifdef UNICODE
832         #define WTMgrPacketHookEx  WTMgrPacketHookExW
833         #define ORD_WTMgrPacketHookEx  ORD_WTMgrPacketHookExW
834         #else
835         #define WTMgrPacketHookEx  WTMgrPacketHookExA
836         #define ORD_WTMgrPacketHookEx  ORD_WTMgrPacketHookExA
837         #endif /* !UNICODE */
838 #else
839         HWTHOOK API WTMgrPacketHookEx(HMGR, int, LPSTR, LPSTR);
840         #define ORD_WTMgrPacketHookEx                   203
841 #endif
842         BOOL API WTMgrPacketUnhook(HWTHOOK);
843         #define ORD_WTMgrPacketUnhook                   204
844         LRESULT API WTMgrPacketHookNext(HWTHOOK, int, WPARAM, LPARAM);
845         #define ORD_WTMgrPacketHookNext                 205
846         #endif
847
848         #ifndef NOWTMGRPREFFXNS
849         /* MANAGER PREFERENCE DATA FUNCTIONS */
850         BOOL API WTMgrCsrPressureBtnMarksEx(HMGR, UINT, UINT FAR *, UINT FAR *);
851         #define ORD_WTMgrCsrPressureBtnMarksEx  201
852         #endif
853
854
855
856 #endif
857
858 #ifdef __cplusplus
859 }
860 #endif  /* __cplusplus */
861
862 #endif /* #define _INC_WINTAB */
863