Release 1.3.7.
[wine/gsoc-2012-control.git] / dlls / wintab.dll16 / wintab.c
blobfc3597766128c1bcfabff7a7a005dc81aadfe7db
1 /*
2 * Tablet Win16
4 * Copyright 2002 Patrik Stridvall
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
28 #include "wintab.h"
30 #include "wine/windef16.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(wintab);
35 /**********************************************************************/
37 #define DECLARE_HANDLE16(a) \
38 typedef HANDLE16 a##16; \
39 typedef a##16 *P##a##16; \
40 typedef a##16 *NP##a##16; \
41 typedef a##16 *LP##a##16
43 DECLARE_HANDLE16(HMGR); /* manager handle */
44 DECLARE_HANDLE16(HCTX); /* context handle */
45 DECLARE_HANDLE16(HWTHOOK); /* hook handle */
47 /**********************************************************************/
49 typedef struct tagLOGCONTEXT16 {
50 char lcName[LCNAMELEN];
51 UINT16 lcOptions;
52 UINT16 lcStatus;
53 UINT16 lcLocks;
54 UINT16 lcMsgBase;
55 UINT16 lcDevice;
56 UINT16 lcPktRate;
57 WTPKT lcPktData;
58 WTPKT lcPktMode;
59 WTPKT lcMoveMask;
60 DWORD lcBtnDnMask;
61 DWORD lcBtnUpMask;
62 LONG lcInOrgX;
63 LONG lcInOrgY;
64 LONG lcInOrgZ;
65 LONG lcInExtX;
66 LONG lcInExtY;
67 LONG lcInExtZ;
68 LONG lcOutOrgX;
69 LONG lcOutOrgY;
70 LONG lcOutOrgZ;
71 LONG lcOutExtX;
72 LONG lcOutExtY;
73 LONG lcOutExtZ;
74 FIX32 lcSensX;
75 FIX32 lcSensY;
76 FIX32 lcSensZ;
77 BOOL16 lcSysMode;
78 INT16 lcSysOrgX;
79 INT16 lcSysOrgY;
80 INT16 lcSysExtX;
81 INT16 lcSysExtY;
82 FIX32 lcSysSensX;
83 FIX32 lcSysSensY;
84 } LOGCONTEXT16, *PLOGCONTEXT16, *NPLOGCONTEXT16, *LPLOGCONTEXT16;
86 /**********************************************************************/
88 typedef BOOL16 (WINAPI * WTENUMPROC16)(HCTX16, LPARAM); /* changed CALLBACK->WINAPI, 1.1 */
89 typedef BOOL16 (WINAPI * WTCONFIGPROC16)(HCTX16, HWND16);
90 typedef LRESULT (WINAPI * WTHOOKPROC16)(INT16, WPARAM16, LPARAM);
91 typedef WTHOOKPROC16 *LPWTHOOKPROC16;
93 /***********************************************************************
94 * WTInfo (WINTAB.20)
96 UINT16 WINAPI WTInfo16(UINT16 wCategory, UINT16 nIndex, LPVOID lpOutput)
98 FIXME("(%hu, %hu, %p): stub\n", wCategory, nIndex, lpOutput);
100 return 0;
103 /***********************************************************************
104 * WTOpen (WINTAB.21)
106 HCTX16 WINAPI WTOpen16(HWND16 hWnd, LPLOGCONTEXT16 lpLogCtx, BOOL16 fEnable)
108 FIXME("(0x%04hx, %p, %hu): stub\n", hWnd, lpLogCtx, fEnable);
110 return 0;
113 /***********************************************************************
114 * WTClose (WINTAB.22)
116 BOOL16 WINAPI WTClose16(HCTX16 hCtx)
118 FIXME("(0x%04hx): stub\n", hCtx);
120 return TRUE;
123 /***********************************************************************
124 * WTPacketsGet (WINTAB.23)
126 INT16 WINAPI WTPacketsGet16(HCTX16 hCtx, INT16 cMaxPkts, LPVOID lpPkts)
128 FIXME("(0x%04hx, %hd, %p): stub\n", hCtx, cMaxPkts, lpPkts);
130 return 0;
133 /***********************************************************************
134 * WTPacket (WINTAB.24)
136 BOOL16 WINAPI WTPacket16(HCTX16 hCtx, UINT16 wSerial, LPVOID lpPkt)
138 FIXME("(0x%04hx, %hd, %p): stub\n", hCtx, wSerial, lpPkt);
140 return FALSE;
143 /***********************************************************************
144 * WTEnable (WINTAB.40)
146 BOOL16 WINAPI WTEnable16(HCTX16 hCtx, BOOL16 fEnable)
148 FIXME("(0x%04hx, %hu): stub\n", hCtx, fEnable);
150 return FALSE;
153 /***********************************************************************
154 * WTOverlap (WINTAB.41)
156 BOOL16 WINAPI WTOverlap16(HCTX16 hCtx, BOOL16 fToTop)
158 FIXME("(0x%04hx, %hu): stub\n", hCtx, fToTop);
160 return FALSE;
163 /***********************************************************************
164 * WTConfig (WINTAB.60)
166 BOOL16 WINAPI WTConfig16(HCTX16 hCtx, HWND16 hWnd)
168 FIXME("(0x%04hx, 0x%04hx): stub\n", hCtx, hWnd);
170 return FALSE;
173 /***********************************************************************
174 * WTGet (WINTAB.61)
176 BOOL16 WINAPI WTGet16(HCTX16 hCtx, LPLOGCONTEXT16 lpLogCtx)
178 FIXME("(0x%04hx, %p): stub\n", hCtx, lpLogCtx);
180 return FALSE;
183 /***********************************************************************
184 * WTSet (WINTAB.62)
186 BOOL16 WINAPI WTSet16(HCTX16 hCtx, LPLOGCONTEXT16 lpLogCtx)
188 FIXME("(0x%04hx, %p): stub\n", hCtx, lpLogCtx);
190 return FALSE;
193 /***********************************************************************
194 * WTExtGet (WINTAB.63)
196 BOOL16 WINAPI WTExtGet16(HCTX16 hCtx, UINT16 wExt, LPVOID lpData)
198 FIXME("(0x%04hx, %hu, %p): stub\n", hCtx, wExt, lpData);
200 return FALSE;
203 /***********************************************************************
204 * WTExtSet (WINTAB.64)
206 BOOL16 WINAPI WTExtSet16(HCTX16 hCtx, UINT16 wExt, LPVOID lpData)
208 FIXME("(0x%04hx, %hu, %p): stub\n", hCtx, wExt, lpData);
210 return FALSE;
213 /***********************************************************************
214 * WTSave (WINTAB.65)
216 BOOL16 WINAPI WTSave16(HCTX16 hCtx, LPVOID lpSaveInfo)
218 FIXME("(0x%04hx, %p): stub\n", hCtx, lpSaveInfo);
220 return FALSE;
223 /***********************************************************************
224 * WTRestore (WINTAB.66)
226 HCTX16 WINAPI WTRestore16(HWND16 hWnd, LPVOID lpSaveInfo, BOOL16 fEnable)
228 FIXME("(0x%04hx, %p, %hu): stub\n", hWnd, lpSaveInfo, fEnable);
230 return 0;
233 /***********************************************************************
234 * WTPacketsPeek (WINTAB.80)
236 INT16 WINAPI WTPacketsPeek16(HCTX16 hCtx, INT16 cMaxPkts, LPVOID lpPkts)
238 FIXME("(0x%04hx, %hd, %p): stub\n", hCtx, cMaxPkts, lpPkts);
240 return 0;
243 /***********************************************************************
244 * WTDataGet (WINTAB.81)
246 INT16 WINAPI WTDataGet16(HCTX16 hCtx, UINT16 wBegin, UINT16 wEnd,
247 INT16 cMaxPkts, LPVOID lpPkts, LPINT16 lpNPkts)
249 FIXME("(0x%04hx, %hu, %hu, %hd, %p, %p): stub\n",
250 hCtx, wBegin, wEnd, cMaxPkts, lpPkts, lpNPkts);
252 return 0;
255 /***********************************************************************
256 * WTDataPeek (WINTAB.82)
258 INT16 WINAPI WTDataPeek16(HCTX16 hCtx, UINT16 wBegin, UINT16 wEnd,
259 INT16 cMaxPkts, LPVOID lpPkts, LPINT16 lpNPkts)
261 FIXME("(0x%04hx, %hu, %hu, %hd, %p, %p): stub\n",
262 hCtx, wBegin, wEnd, cMaxPkts, lpPkts, lpNPkts);
264 return 0;
267 /***********************************************************************
268 * WTQueuePackets (WINTAB.83)
270 * OBSOLETE IN WIN32!
272 DWORD WINAPI WTQueuePackets16(HCTX16 hCtx)
274 FIXME("(0x%04hx): stub\n", hCtx);
276 return 0;
279 /***********************************************************************
280 * WTQueuePacketsEx (WINTAB.200)
282 BOOL16 WINAPI WTQueuePacketsEx16(HCTX16 hCtx, UINT16 *lpOld, UINT16 *lpNew)
284 FIXME("(0x%04hx, %p, %p): stub\n", hCtx, lpOld, lpNew);
286 return TRUE;
289 /***********************************************************************
290 * WTQueueSizeGet (WINTAB.84)
292 INT16 WINAPI WTQueueSizeGet16(HCTX16 hCtx)
294 FIXME("(0x%04hx): stub\n", hCtx);
296 return 0;
299 /***********************************************************************
300 * WTQueueSizeSet (WINTAB.85)
302 BOOL16 WINAPI WTQueueSizeSet16(HCTX16 hCtx, INT16 nPkts)
304 FIXME("(0x%04hx, %hd): stub\n", hCtx, nPkts);
306 return FALSE;
309 /***********************************************************************
310 * WTMgrOpen (WINTAB.100)
312 HMGR16 WINAPI WTMgrOpen16(HWND16 hWnd, UINT16 wMsgBase)
314 FIXME("(0x%04hx, %hu): stub\n", hWnd, wMsgBase);
316 return 0;
319 /***********************************************************************
320 * WTMgrClose (WINTAB.101)
322 BOOL16 WINAPI WTMgrClose16(HMGR16 hMgr)
324 FIXME("(0x%04hx): stub\n", hMgr);
326 return FALSE;
329 /***********************************************************************
330 * WTMgrContextEnum (WINTAB.120)
332 BOOL16 WINAPI WTMgrContextEnum16(HMGR16 hMgr, WTENUMPROC16 lpEnumFunc, LPARAM lParam)
334 FIXME("(0x%04hx, %p, %ld): stub\n", hMgr, lpEnumFunc, lParam);
336 return FALSE;
339 /***********************************************************************
340 * WTMgrContextOwner (WINTAB.121)
342 HWND16 WINAPI WTMgrContextOwner16(HMGR16 hMgr, HCTX16 hCtx)
344 FIXME("(0x%04hx, 0x%04hx): stub\n", hMgr, hCtx);
346 return 0;
349 /***********************************************************************
350 * WTMgrDefContext (WINTAB.122)
352 HCTX16 WINAPI WTMgrDefContext16(HMGR16 hMgr, BOOL16 fSystem)
354 FIXME("(0x%04hx, %hu): stub\n", hMgr, fSystem);
356 return 0;
359 /***********************************************************************
360 * WTMgrDefContextEx (WINTAB.206)
362 * 1.1
364 HCTX16 WINAPI WTMgrDefContextEx16(HMGR16 hMgr, UINT16 wDevice, BOOL16 fSystem)
366 FIXME("(0x%04hx, %hu, %hu): stub\n", hMgr, wDevice, fSystem);
368 return 0;
371 /***********************************************************************
372 * WTMgrDeviceConfig (WINTAB.140)
374 UINT16 WINAPI WTMgrDeviceConfig16(HMGR16 hMgr, UINT16 wDevice, HWND16 hWnd)
376 FIXME("(0x%04hx, %hu, 0x%04hx): stub\n", hMgr, wDevice, hWnd);
378 return 0;
381 /***********************************************************************
382 * WTMgrConfigReplace (WINTAB.141)
384 * OBSOLETE IN WIN32!
386 BOOL16 WINAPI WTMgrConfigReplace16(HMGR16 hMgr, BOOL16 fInstall,
387 WTCONFIGPROC16 lpConfigProc)
389 FIXME("(0x%04hx, %hu, %p): stub\n", hMgr, fInstall, lpConfigProc);
391 return FALSE;
394 /***********************************************************************
395 * WTMgrConfigReplaceEx (WINTAB.202)
397 BOOL16 WINAPI WTMgrConfigReplaceEx16(HMGR16 hMgr, BOOL16 fInstall,
398 LPSTR lpszModule, LPSTR lpszCfgProc)
400 FIXME("(0x%04hx, %hu, %s, %s): stub\n", hMgr, fInstall,
401 debugstr_a(lpszModule), debugstr_a(lpszCfgProc));
403 return FALSE;
406 /***********************************************************************
407 * WTMgrPacketHook (WINTAB.160)
409 * OBSOLETE IN WIN32!
411 WTHOOKPROC16 WINAPI WTMgrPacketHook16(HMGR16 hMgr, BOOL16 fInstall,
412 INT16 nType, WTHOOKPROC16 lpFunc)
414 FIXME("(0x%04hx, %hu, %hd, %p): stub\n", hMgr, fInstall, nType, lpFunc);
416 return 0;
419 /***********************************************************************
420 * WTMgrPacketHookEx (WINTAB.203)
422 HWTHOOK16 WINAPI WTMgrPacketHookEx16(HMGR16 hMgr, INT16 nType,
423 LPSTR lpszModule, LPSTR lpszHookProc)
425 FIXME("(0x%04hx, %hd, %s, %s): stub\n", hMgr, nType,
426 debugstr_a(lpszModule), debugstr_a(lpszHookProc));
428 return 0;
431 /***********************************************************************
432 * WTMgrPacketUnhook (WINTAB.204)
434 BOOL16 WINAPI WTMgrPacketUnhook16(HWTHOOK16 hHook)
436 FIXME("(0x%04hx): stub\n", hHook);
438 return FALSE;
441 /***********************************************************************
442 * WTMgrPacketHookDefProc (WINTAB.161)
444 * OBSOLETE IN WIN32!
446 LRESULT WINAPI WTMgrPacketHookDefProc16(INT16 nCode, WPARAM16 wParam,
447 LPARAM lParam, LPWTHOOKPROC16 lplpFunc)
449 FIXME("(%hd, %hu, %lu, %p): stub\n", nCode, wParam, lParam, lplpFunc);
451 return 0;
454 /***********************************************************************
455 * WTMgrPacketHookNext (WINTAB.205)
457 LRESULT WINAPI WTMgrPacketHookNext16(HWTHOOK16 hHook, INT16 nCode,
458 WPARAM16 wParam, LPARAM lParam)
460 FIXME("(0x%04hx, %hd, %hu, %lu): stub\n", hHook, nCode, wParam, lParam);
462 return 0;
466 /***********************************************************************
467 * WTMgrExt (WINTAB.180)
469 BOOL16 WINAPI WTMgrExt16(HMGR16 hMgr, UINT16 wExt, LPVOID lpData)
471 FIXME("(0x%04hx, %hu, %p): stub\n", hMgr, wExt, lpData);
473 return FALSE;
476 /***********************************************************************
477 * WTMgrCsrEnable (WINTAB.181)
479 BOOL16 WINAPI WTMgrCsrEnable16(HMGR16 hMgr, UINT16 wCursor, BOOL16 fEnable)
481 FIXME("(0x%04hx, %hu, %hu): stub\n", hMgr, wCursor, fEnable);
483 return FALSE;
486 /***********************************************************************
487 * WTMgrCsrButtonMap (WINTAB.182)
489 BOOL16 WINAPI WTMgrCsrButtonMap16(HMGR16 hMgr, UINT16 wCursor,
490 LPBYTE lpLogBtns, LPBYTE lpSysBtns)
492 FIXME("(0x%04hx, %hu, %p, %p): stub\n", hMgr, wCursor, lpLogBtns, lpSysBtns);
494 return FALSE;
497 /***********************************************************************
498 * WTMgrCsrPressureBtnMarks (WINTAB.183)
500 * OBSOLETE IN WIN32! (But only according to documentation)
502 BOOL16 WINAPI WTMgrCsrPressureBtnMarks16(HMGR16 hMgr, UINT16 wCsr,
503 DWORD dwNMarks, DWORD dwTMarks)
505 FIXME("(0x%04hx, %hu, %u, %u): stub\n", hMgr, wCsr, dwNMarks, dwTMarks);
507 return FALSE;
510 /***********************************************************************
511 * WTMgrCsrPressureBtnMarksEx (WINTAB.201)
513 BOOL16 WINAPI WTMgrCsrPressureBtnMarksEx16(HMGR16 hMgr, UINT16 wCsr,
514 UINT16 *lpNMarks, UINT16 *lpTMarks)
516 FIXME("(0x%04hx, %hu, %p, %p): stub\n", hMgr, wCsr, lpNMarks, lpTMarks);
518 return FALSE;
521 /***********************************************************************
522 * WTMgrCsrPressureResponse (WINTAB.184)
524 BOOL16 WINAPI WTMgrCsrPressureResponse16(HMGR16 hMgr, UINT16 wCsr,
525 UINT16 *lpNResp, UINT16 *lpTResp)
527 FIXME("(0x%04hx, %hu, %p, %p): stub\n", hMgr, wCsr, lpNResp, lpTResp);
529 return FALSE;
532 /***********************************************************************
533 * WTMgrCsrExt (WINTAB.185)
535 BOOL16 WINAPI WTMgrCsrExt16(HMGR16 hMgr, UINT16 wCsr, UINT16 wExt, LPVOID lpData)
537 FIXME("(0x%04hx, %hu, %hu, %p): stub\n", hMgr, wCsr, wExt, lpData);
539 return FALSE;