1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.ximtec.igesture.io.wacom;
29
30
31
32
33
34 import org.ximtec.igesture.io.win32.W32API;
35
36 import com.sun.jna.Structure;
37
38
39
40
41
42
43
44 public interface Wintab32 extends W32API {
45
46
47
48 static int HWND_BROADCAST = 0xffff;
49 static int WTI_DEFCONTEXT = 3;
50 static int WTI_DEFSYSCTX = 4;
51 static int WTI_DEVICES = 100;
52
53 HDC WTOpenW(HWND hwnd, LOGCONTEXTW s, boolean b);
54
55 boolean WTClose(HDC hDC);
56
57 int WTInfoW(int category, int index, LOGCONTEXTW s);
58
59 int WTQueueSizeGet(HDC hdc);
60
61
62 int WTPacketsGet(HDC hdc, int max, PACKET p);
63 int WTPacketsGet(HDC hdc, int max, PACKET[] p);
64 boolean WTPacket(HDC hdc, int wSerial, PACKET p);
65 void WacomDoSpecialContextHandling(boolean b);
66
67
68 HANDLE WTMgrPacketHookEx(HINSTANCE hmgr, int nType, String module, String hookproc);
69
70
71 public static class LOGCONTEXTW extends Structure {
72
73
74
75 public char[] lcName=new char[40];
76 public int lcOptions;
77 public int lcStatus;
78 public int lcLocks;
79 public int lcMsgBase;
80 public int lcDevice;
81 public int lcPktRate;
82 public int lcPktData;
83 public int lcPktMode;
84 public int lcMoveMask;
85 public int lcBtnDnMask;
86 public int lcBtnUpMask;
87 public int lcInOrgX;
88 public int lcInOrgY;
89 public int lcInOrgZ;
90 public int lcInExtX;
91 public int lcInExtY;
92 public int lcInExtZ;
93 public int lcOutOrgX;
94 public int lcOutOrgY;
95 public int lcOutOrgZ;
96 public int lcOutExtX;
97 public int lcOutExtY;
98 public int lcOutExtZ;
99 public int lcSensX;
100 public int lcSensY;
101 public int lcSensZ;
102 public boolean lcSysMode;
103 public int lcSysOrgX;
104 public int lcSysOrgY;
105 public int lcSysExtX;
106 public int lcSysExtY;
107 public int lcSysSensX;
108 public int lcSysSensY;
109
110 }
111
112
113 public static class PACKET extends Structure {
114
115 public HDC pkContext;
116 public int pkStatus;
117 public int pkTime;
118 public int pkChanged;
119 public int pkSerialNumber;
120 public int pkCursor;
121 public int pkButtons;
122 public int pkX;
123 public int pkY;
124 public int pkZ;
125 public int pkNormalPressure;
126 public int pkTangentPressure;
127 public ORIENTATION pkOrientation;
128 public ROTATION pkRotation;
129
130 }
131
132 public static class ORIENTATION extends Structure{
133 public int orAzimuth;
134 public int orAltitude;
135 public int orTwist;
136 }
137
138 public static class ROTATION extends Structure{
139 public int roPitch;
140 public int roRoll;
141 public int roYaw;
142 }
143
144 }
145
146
147