annotate src/video/win32/wactab/pktdef.h @ 4765:5ff305de5834

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