annotate src/video/win32/wactab/pktdef.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
rev   line source
2724
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /* -------------------------------- pktdef.h -------------------------------- */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 /* Combined 16 & 32-bit version. */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 /*------------------------------------------------------------------------------
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 The text and information contained in this file may be freely used,
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 copied, or distributed without compensation or licensing restrictions.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 This file is copyright 1991-1998 by LCS/Telegraphics.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 ------------------------------------------------------------------------------*/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 /*------------------------------------------------------------------------------
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 How to use pktdef.h:
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 1. Include wintab.h
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 2. if using just one packet format:
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 a. Define PACKETDATA and PACKETMODE as or'ed combinations of WTPKT bits
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 (use the PK_* identifiers).
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18 b. Include pktdef.h.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 c. The generated structure typedef will be called PACKET. Use PACKETDATA
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 and PACKETMODE to fill in the LOGCONTEXT structure.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 3. If using multiple packet formats, for each one:
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 a. Define PACKETNAME. Its text value will be a prefix for this packet's
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 parameters and names.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 b. Define <PACKETNAME>PACKETDATA and <PACKETNAME>PACKETMODE similar to
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 2.a. above.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 c. Include pktdef.h.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 d. The generated structure typedef will be called
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 <PACKETNAME>PACKET. Compare with 2.c. above and example #2 below.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 4. If using extension packet data, do the following additional steps
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 for each extension:
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 a. Before including pktdef.h, define <PACKETNAME>PACKET<EXTENSION>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 as either PKEXT_ABSOLUTE or PKEXT_RELATIVE.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 b. The generated structure typedef will contain a field for the
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 extension data.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 c. Scan the WTI_EXTENSION categories to find the extension's
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 packet mask bit.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 d. OR the packet mask bit with <PACKETNAME>PACKETDATA and use the
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 result in the lcPktData field of the LOGCONTEXT structure.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39 e. If <PACKETNAME>PACKET<EXTENSION> was PKEXT_RELATIVE, OR the
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 packet mask bit with <PACKETNAME>PACKETMODE and use the result
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
41 in the lcPktMode field of the LOGCONTEXT structure.
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 Example #1. -- single packet format
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 #include <wintab.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 #define PACKETDATA PK_X | PK_Y | PK_BUTTONS /@ x, y, buttons @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 #define PACKETMODE PK_BUTTONS /@ buttons relative mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 #include <pktdef.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
51 lc.lcPktData = PACKETDATA;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 lc.lcPktMode = PACKETMODE;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 Example #2. -- multiple formats
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 #include <wintab.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57 #define PACKETNAME MOE
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 #define MOEPACKETDATA PK_X | PK_Y | PK_BUTTONS /@ x, y, buttons @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 #define MOEPACKETMODE PK_BUTTONS /@ buttons relative mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 #include <pktdef.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 #define PACKETNAME LARRY
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 #define LARRYPACKETDATA PK_Y | PK_Z | PK_BUTTONS /@ y, z, buttons @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 #define LARRYPACKETMODE PK_BUTTONS /@ buttons relative mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 #include <pktdef.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 #define PACKETNAME CURLY
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66 #define CURLYPACKETDATA PK_X | PK_Z | PK_BUTTONS /@ x, z, buttons @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67 #define CURLYPACKETMODE PK_BUTTONS /@ buttons relative mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 #include <pktdef.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70 lcMOE.lcPktData = MOEPACKETDATA;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
71 lcMOE.lcPktMode = MOEPACKETMODE;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
72 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
73 lcLARRY.lcPktData = LARRYPACKETDATA;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74 lcLARRY.lcPktMode = LARRYPACKETMODE;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76 lcCURLY.lcPktData = CURLYPACKETDATA;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 lcCURLY.lcPktMode = CURLYPACKETMODE;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
79 Example #3. -- extension packet data "XFOO".
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 #include <wintab.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
82 #define PACKETDATA PK_X | PK_Y | PK_BUTTONS /@ x, y, buttons @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 #define PACKETMODE PK_BUTTONS /@ buttons relative mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 #define PACKETXFOO PKEXT_ABSOLUTE /@ XFOO absolute mode @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
85 #include <pktdef.h>
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
86 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 UINT ScanExts(UINT wTag)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88 {
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
89 UINT i;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
90 UINT wScanTag;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92 /@ scan for wTag's info category. @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
93 for (i = 0; WTInfo(WTI_EXTENSIONS + i, EXT_TAG, &wScanTag); i++) {
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 if (wTag == wScanTag) {
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95 /@ return category offset from WTI_EXTENSIONS. @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96 return i;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97 }
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
98 }
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
99 /@ return error code. @/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
100 return 0xFFFF;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101 }
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
102 ...
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 lc.lcPktData = PACKETDATA;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 lc.lcPktMode = PACKETMODE;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105 #ifdef PACKETXFOO
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106 categoryXFOO = ScanExts(WTX_XFOO);
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 WTInfo(WTI_EXTENSIONS + categoryXFOO, EXT_MASK, &maskXFOO);
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 lc.lcPktData |= maskXFOO;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 #if PACKETXFOO == PKEXT_RELATIVE
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 lc.lcPktMode |= maskXFOO;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 WTOpen(hWnd, &lc, TRUE);
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 ------------------------------------------------------------------------------*/
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 #ifdef __cplusplus
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118 extern "C" {
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 #endif /* __cplusplus */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 #ifndef PACKETNAME
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 /* if no packet name prefix */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123 #define __PFX(x) x
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 #define __IFX(x,y) x ## y
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 #else
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 /* add prefixes and infixes to packet format names */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 #define __PFX(x) __PFX2(PACKETNAME,x)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 #define __PFX2(p,x) __PFX3(p,x)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 #define __PFX3(p,x) p ## x
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130 #define __IFX(x,y) __IFX2(x,PACKETNAME,y)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 #define __IFX2(x,i,y) __IFX3(x,i,y)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132 #define __IFX3(x,i,y) x ## i ## y
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
133 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
134
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
135 #define __SFX2(x,s) __SFX3(x,s)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
136 #define __SFX3(x,s) x ## s
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
137
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
138 #define __TAG __IFX(tag,PACKET)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
139 #define __TYPES __PFX(PACKET), * __IFX(P,PACKET), NEAR * __IFX(NP,PACKET), \
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
140 FAR * __IFX(LP,PACKET)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
141
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
142 #define __DATA (__PFX(PACKETDATA))
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
143 #define __MODE (__PFX(PACKETMODE))
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
144 #define __EXT(x) __SFX2(__PFX(PACKET),x)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
145
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
146
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
147 typedef struct __TAG {
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
148 #if (__DATA & PK_CONTEXT)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
149 HCTX pkContext;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
150 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
151 #if (__DATA & PK_STATUS)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
152 UINT pkStatus;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
153 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
154 #if (__DATA & PK_TIME)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
155 DWORD pkTime;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
156 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
157 #if (__DATA & PK_CHANGED)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
158 WTPKT pkChanged;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
159 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
160 #if (__DATA & PK_SERIAL_NUMBER)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
161 UINT pkSerialNumber;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
162 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
163 #if (__DATA & PK_CURSOR)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
164 UINT pkCursor;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
165 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
166 #if (__DATA & PK_BUTTONS)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
167 DWORD pkButtons;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
168 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
169 #if (__DATA & PK_X)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
170 LONG pkX;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
171 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
172 #if (__DATA & PK_Y)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
173 LONG pkY;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
174 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
175 #if (__DATA & PK_Z)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
176 LONG pkZ;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
177 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
178 #if (__DATA & PK_NORMAL_PRESSURE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
179 #if (__MODE & PK_NORMAL_PRESSURE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
180 /* relative */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
181 int pkNormalPressure;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
182 #else
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
183 /* absolute */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
184 UINT pkNormalPressure;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
185 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
186 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
187 #if (__DATA & PK_TANGENT_PRESSURE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
188 #if (__MODE & PK_TANGENT_PRESSURE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
189 /* relative */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
190 int pkTangentPressure;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
191 #else
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
192 /* absolute */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
193 UINT pkTangentPressure;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
194 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
195 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
196 #if (__DATA & PK_ORIENTATION)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
197 ORIENTATION pkOrientation;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
198 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
199 #if (__DATA & PK_ROTATION)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
200 ROTATION pkRotation; /* 1.1 */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
201 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
202
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
203 #ifndef NOWTEXTENSIONS
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
204 /* extensions begin here. */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
205 #if (__EXT(FKEYS) == PKEXT_RELATIVE) || (__EXT(FKEYS) == PKEXT_ABSOLUTE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
206 UINT pkFKeys;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
207 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
208 #if (__EXT(TILT) == PKEXT_RELATIVE) || (__EXT(TILT) == PKEXT_ABSOLUTE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
209 TILT pkTilt;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
210 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
211 #if (__EXT(EXPKEYS) == PKEXT_RELATIVE) || (__EXT(EXPKEYS) == PKEXT_ABSOLUTE)
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
212 WORD pkExpKeys[4]; /* 1.3 */
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
213 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
214 #endif
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
215
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
216 } __TYPES ;
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
217
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
218 #undef PACKETNAME
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
219 #undef __TAG
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
220 #undef __TAG2
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
221 #undef __TYPES
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
222 #undef __TYPES2
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
223 #undef __DATA
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
224 #undef __MODE
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
225 #undef __PFX
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
226 #undef __PFX2
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
227 #undef __PFX3
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
228 #undef __IFX
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
229 #undef __IFX2
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
230 #undef __IFX3
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
231 #undef __SFX2
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
232 #undef __SFX3
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
233
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
234 #ifdef __cplusplus
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
235 }
0e2b65f32298 Added Wacom API headers.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
236 #endif /* __cplusplus */