Added check for duplicate ordinals, and fixed bug it uncovered in
[wine] / dlls / wintab32 / manager.c
1 /*
2  * Tablet Manager
3  *
4  * Copyright 2002 Patrik Stridvall
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26
27 #include "wintab.h"
28
29 #include "wine/debug.h"
30
31 WINE_DEFAULT_DEBUG_CHANNEL(wintab32);
32
33 /***********************************************************************
34  *              WTMgrOpen (WINTAB32.100)
35  */
36 HMGR WINAPI WTMgrOpen(HWND hWnd, UINT wMsgBase)
37 {
38     FIXME("(%p, %u): stub\n", hWnd, wMsgBase);
39
40     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
41
42     return NULL;
43 }
44
45 /***********************************************************************
46  *              WTMgrClose (WINTAB32.101)
47  */
48 BOOL WINAPI WTMgrClose(HMGR hMgr)
49 {
50     FIXME("(%p): stub\n", hMgr);
51
52     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
53
54     return FALSE;
55 }
56
57 /***********************************************************************
58  *              WTMgrContextEnum (WINTAB32.120)
59  */
60 BOOL WINAPI WTMgrContextEnum(HMGR hMgr, WTENUMPROC lpEnumFunc, LPARAM lParam)
61 {
62     FIXME("(%p, %p, %ld): stub\n", hMgr, lpEnumFunc, lParam);
63
64     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
65
66     return FALSE;
67 }
68
69 /***********************************************************************
70  *              WTMgrContextOwner (WINTAB32.121)
71  */
72 HWND WINAPI WTMgrContextOwner(HMGR hMgr, HCTX hCtx)
73 {
74     FIXME("(%p, %p): stub\n", hMgr, hCtx);
75
76     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
77
78     return NULL;
79 }
80
81 /***********************************************************************
82  *              WTMgrDefContext (WINTAB32.122)
83  */
84 HCTX WINAPI WTMgrDefContext(HMGR hMgr, BOOL fSystem)
85 {
86     FIXME("(%p, %u): stub\n", hMgr, fSystem);
87
88     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
89
90     return NULL;
91 }
92
93 /***********************************************************************
94  *              WTMgrDefContextEx (WINTAB32.206)
95  *
96  * 1.1
97  */
98 HCTX WINAPI WTMgrDefContextEx(HMGR hMgr, UINT wDevice, BOOL fSystem)
99 {
100     FIXME("(%p, %hu, %hu): stub\n", hMgr, wDevice, fSystem);
101
102     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
103
104     return NULL;
105 }
106
107 /***********************************************************************
108  *              WTMgrDeviceConfig (WINTAB32.140)
109  */
110 UINT WINAPI WTMgrDeviceConfig(HMGR hMgr, UINT wDevice, HWND hWnd)
111 {
112     FIXME("(%p, %u, %p): stub\n", hMgr, wDevice, hWnd);
113
114     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
115
116     return 0;
117 }
118
119 /***********************************************************************
120  *              WTMgrConfigReplaceExA (WINTAB32.202)
121  */
122 BOOL WINAPI WTMgrConfigReplaceExA(HMGR hMgr, BOOL fInstall,
123                                   LPSTR lpszModule, LPSTR lpszCfgProc)
124 {
125     FIXME("(%p, %u, %s, %s): stub\n", hMgr, fInstall,
126           debugstr_a(lpszModule), debugstr_a(lpszCfgProc));
127
128     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
129
130     return FALSE;
131 }
132
133 /***********************************************************************
134  *              WTMgrConfigReplaceExW (WINTAB32.1202)
135  */
136 BOOL WINAPI WTMgrConfigReplaceExW(HMGR hMgr, BOOL fInstall,
137                                   LPWSTR lpszModule, LPSTR lpszCfgProc)
138 {
139     FIXME("(%p, %u, %s, %s): stub\n", hMgr, fInstall,
140           debugstr_w(lpszModule), debugstr_a(lpszCfgProc));
141
142     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
143
144     return FALSE;
145 }
146
147 /***********************************************************************
148  *              WTMgrPacketHookExA (WINTAB32.203)
149  */
150 HWTHOOK WINAPI WTMgrPacketHookExA(HMGR hMgr, int nType,
151                                   LPSTR lpszModule, LPSTR lpszHookProc)
152 {
153     FIXME("(%p, %d, %s, %s): stub\n", hMgr, nType,
154           debugstr_a(lpszModule), debugstr_a(lpszHookProc));
155
156     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
157
158     return NULL;
159 }
160
161 /***********************************************************************
162  *              WTMgrPacketHookExW (WINTAB32.1203)
163  */
164 HWTHOOK WINAPI WTMgrPacketHookExW(HMGR hMgr, int nType,
165                                   LPWSTR lpszModule, LPSTR lpszHookProc)
166 {
167     FIXME("(%p, %d, %s, %s): stub\n", hMgr, nType,
168           debugstr_w(lpszModule), debugstr_a(lpszHookProc));
169
170     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
171
172     return NULL;
173 }
174
175 /***********************************************************************
176  *              WTMgrPacketUnhook (WINTAB32.204)
177  */
178 BOOL WINAPI WTMgrPacketUnhook(HWTHOOK hHook)
179 {
180     FIXME("(%p): stub\n", hHook);
181
182     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
183
184     return FALSE;
185 }
186
187 /***********************************************************************
188  *              WTMgrPacketHookNext (WINTAB32.205)
189  */
190 LRESULT WINAPI WTMgrPacketHookNext(HWTHOOK hHook, int nCode,
191                                    WPARAM wParam, LPARAM lParam)
192 {
193     FIXME("(%p, %d, %u, %lu): stub\n", hHook, nCode, wParam, lParam);
194
195     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
196
197     return 0;
198 }
199
200
201 /***********************************************************************
202  *              WTMgrExt (WINTAB32.180)
203  */
204 BOOL WINAPI WTMgrExt(HMGR hMgr, UINT wExt, LPVOID lpData)
205 {
206     FIXME("(%p, %u, %p): stub\n", hMgr, wExt, lpData);
207
208     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
209
210     return FALSE;
211 }
212
213 /***********************************************************************
214  *              WTMgrCsrEnable (WINTAB32.181)
215  */
216 BOOL WINAPI WTMgrCsrEnable(HMGR hMgr, UINT wCursor, BOOL fEnable)
217 {
218     FIXME("(%p, %u, %u): stub\n", hMgr, wCursor, fEnable);
219
220     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
221
222     return FALSE;
223 }
224
225 /***********************************************************************
226  *              WTMgrCsrButtonMap (WINTAB32.182)
227  */
228 BOOL WINAPI WTMgrCsrButtonMap(HMGR hMgr, UINT wCursor,
229                               LPBYTE lpLogBtns, LPBYTE lpSysBtns)
230 {
231     FIXME("(%p, %u, %p, %p): stub\n", hMgr, wCursor, lpLogBtns, lpSysBtns);
232
233     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
234
235     return FALSE;
236 }
237
238 /***********************************************************************
239  *              WTMgrCsrPressureBtnMarks (WINTAB32.183)
240  *
241  * OBSOLETE IN WIN32! (But only according to documentation)
242  */
243 BOOL WINAPI WTMgrCsrPressureBtnMarks(HMGR hMgr, UINT wCsr,
244                                      DWORD dwNMarks, DWORD dwTMarks)
245 {
246     FIXME("(%p, %u, %lu, %lu): stub\n", hMgr, wCsr, dwNMarks, dwTMarks);
247
248     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
249
250     return FALSE;
251 }
252
253 /***********************************************************************
254  *              WTMgrCsrPressureBtnMarksEx (WINTAB32.201)
255  */
256 BOOL WINAPI WTMgrCsrPressureBtnMarksEx(HMGR hMgr, UINT wCsr,
257                                        UINT *lpNMarks, UINT *lpTMarks)
258 {
259     FIXME("(%p, %u, %p, %p): stub\n", hMgr, wCsr, lpNMarks, lpTMarks);
260
261     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
262
263     return FALSE;
264 }
265
266 /***********************************************************************
267  *              WTMgrCsrPressureResponse (WINTAB32.184)
268  */
269 BOOL WINAPI WTMgrCsrPressureResponse(HMGR hMgr, UINT wCsr,
270                                      UINT *lpNResp, UINT *lpTResp)
271 {
272     FIXME("(%p, %u, %p, %p): stub\n", hMgr, wCsr, lpNResp, lpTResp);
273
274     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
275
276     return FALSE;
277 }
278
279 /***********************************************************************
280  *              WTMgrCsrExt (WINTAB32.185)
281  */
282 BOOL WINAPI WTMgrCsrExt(HMGR hMgr, UINT wCsr, UINT wExt, LPVOID lpData)
283 {
284     FIXME("(%p, %u, %u, %p): stub\n", hMgr, wCsr, wExt, lpData);
285
286     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
287
288     return FALSE;
289 }