Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

863 lines
21 KiB

  1. /* -------------------------------- wintab.h -------------------------------- */
  2. /* Combined 16 & 32-bit version. */
  3. /*------------------------------------------------------------------------------
  4. The text and information contained in this file may be freely used,
  5. copied, or distributed without compensation or licensing restrictions.
  6. This file is copyright 1991-1998 by LCS/Telegraphics.
  7. ------------------------------------------------------------------------------*/
  8. #ifndef _INC_WINTAB /* prevent multiple includes */
  9. #define _INC_WINTAB
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif /* __cplusplus */
  13. /* -------------------------------------------------------------------------- */
  14. /* Messages */
  15. #ifndef NOWTMESSAGES
  16. #define WT_DEFBASE 0x7FF0
  17. #define WT_MAXOFFSET 0xF
  18. #define _WT_PACKET(b) ((b)+0)
  19. #define _WT_CTXOPEN(b) ((b)+1)
  20. #define _WT_CTXCLOSE(b) ((b)+2)
  21. #define _WT_CTXUPDATE(b) ((b)+3)
  22. #define _WT_CTXOVERLAP(b) ((b)+4)
  23. #define _WT_PROXIMITY(b) ((b)+5)
  24. #define _WT_INFOCHANGE(b) ((b)+6)
  25. #define _WT_CSRCHANGE(b) ((b)+7) /* 1.1 */
  26. #define _WT_MAX(b) ((b)+WT_MAXOFFSET)
  27. #define WT_PACKET _WT_PACKET(WT_DEFBASE)
  28. #define WT_CTXOPEN _WT_CTXOPEN(WT_DEFBASE)
  29. #define WT_CTXCLOSE _WT_CTXCLOSE(WT_DEFBASE)
  30. #define WT_CTXUPDATE _WT_CTXUPDATE(WT_DEFBASE)
  31. #define WT_CTXOVERLAP _WT_CTXOVERLAP(WT_DEFBASE)
  32. #define WT_PROXIMITY _WT_PROXIMITY(WT_DEFBASE)
  33. #define WT_INFOCHANGE _WT_INFOCHANGE(WT_DEFBASE)
  34. #define WT_CSRCHANGE _WT_CSRCHANGE(WT_DEFBASE) /* 1.1 */
  35. #define WT_MAX _WT_MAX(WT_DEFBASE)
  36. #endif
  37. /* -------------------------------------------------------------------------- */
  38. /* -------------------------------------------------------------------------- */
  39. /* Data Types */
  40. /* -------------------------------------------------------------------------- */
  41. /* COMMON DATA DEFS */
  42. DECLARE_HANDLE(HMGR); /* manager handle */
  43. DECLARE_HANDLE(HCTX); /* context handle */
  44. DECLARE_HANDLE(HWTHOOK); /* hook handle */
  45. typedef DWORD WTPKT; /* packet mask */
  46. #ifndef NOWTPKT
  47. /* WTPKT bits */
  48. #define PK_CONTEXT 0x0001 /* reporting context */
  49. #define PK_STATUS 0x0002 /* status bits */
  50. #define PK_TIME 0x0004 /* time stamp */
  51. #define PK_CHANGED 0x0008 /* change bit vector */
  52. #define PK_SERIAL_NUMBER 0x0010 /* packet serial number */
  53. #define PK_CURSOR 0x0020 /* reporting cursor */
  54. #define PK_BUTTONS 0x0040 /* button information */
  55. #define PK_X 0x0080 /* x axis */
  56. #define PK_Y 0x0100 /* y axis */
  57. #define PK_Z 0x0200 /* z axis */
  58. #define PK_NORMAL_PRESSURE 0x0400 /* normal or tip pressure */
  59. #define PK_TANGENT_PRESSURE 0x0800 /* tangential or barrel pressure */
  60. #define PK_ORIENTATION 0x1000 /* orientation info: tilts */
  61. #define PK_ROTATION 0x2000 /* rotation info; 1.1 */
  62. #endif
  63. typedef DWORD FIX32; /* fixed-point arithmetic type */
  64. #ifndef NOFIX32
  65. #define INT(x) HIWORD(x)
  66. #define FRAC(x) LOWORD(x)
  67. #define CASTFIX32(x) ((FIX32)((x)*65536L))
  68. #define ROUND(x) (INT(x) + (FRAC(x) > (WORD)0x8000))
  69. #define FIX_MUL(c, a, b) \
  70. (c = (((DWORD)FRAC(a) * FRAC(b)) >> 16) + \
  71. (DWORD)INT(a) * FRAC(b) + \
  72. (DWORD)INT(b) * FRAC(a) + \
  73. ((DWORD)INT(a) * INT(b) << 16))
  74. #ifdef _WINDLL
  75. #define FIX_DIV_SC static
  76. #else
  77. #define FIX_DIV_SC
  78. #endif
  79. #define FIX_DIV(c, a, b) \
  80. { \
  81. FIX_DIV_SC DWORD temp, rem, btemp; \
  82. \
  83. /* fraction done bytewise */ \
  84. temp = ((a / b) << 16); \
  85. rem = a % b; \
  86. btemp = b; \
  87. if (INT(btemp) < 256) { \
  88. rem <<= 8; \
  89. } \
  90. else { \
  91. btemp >>= 8; \
  92. } \
  93. temp += ((rem / btemp) << 8); \
  94. rem %= btemp; \
  95. rem <<= 8; \
  96. temp += rem / btemp; \
  97. c = temp; \
  98. }
  99. #endif
  100. /* -------------------------------------------------------------------------- */
  101. /* INFO DATA DEFS */
  102. #ifndef NOWTINFO
  103. #ifndef NOWTAXIS
  104. typedef struct tagAXIS {
  105. LONG axMin;
  106. LONG axMax;
  107. UINT axUnits;
  108. FIX32 axResolution;
  109. } AXIS, *PAXIS, NEAR *NPAXIS, FAR *LPAXIS;
  110. /* unit specifiers */
  111. #define TU_NONE 0
  112. #define TU_INCHES 1
  113. #define TU_CENTIMETERS 2
  114. #define TU_CIRCLE 3
  115. #endif
  116. #ifndef NOWTSYSBUTTONS
  117. /* system button assignment values */
  118. #define SBN_NONE 0x00
  119. #define SBN_LCLICK 0x01
  120. #define SBN_LDBLCLICK 0x02
  121. #define SBN_LDRAG 0x03
  122. #define SBN_RCLICK 0x04
  123. #define SBN_RDBLCLICK 0x05
  124. #define SBN_RDRAG 0x06
  125. #define SBN_MCLICK 0x07
  126. #define SBN_MDBLCLICK 0x08
  127. #define SBN_MDRAG 0x09
  128. /* for Pen Windows */
  129. #define SBN_PTCLICK 0x10
  130. #define SBN_PTDBLCLICK 0x20
  131. #define SBN_PTDRAG 0x30
  132. #define SBN_PNCLICK 0x40
  133. #define SBN_PNDBLCLICK 0x50
  134. #define SBN_PNDRAG 0x60
  135. #define SBN_P1CLICK 0x70
  136. #define SBN_P1DBLCLICK 0x80
  137. #define SBN_P1DRAG 0x90
  138. #define SBN_P2CLICK 0xA0
  139. #define SBN_P2DBLCLICK 0xB0
  140. #define SBN_P2DRAG 0xC0
  141. #define SBN_P3CLICK 0xD0
  142. #define SBN_P3DBLCLICK 0xE0
  143. #define SBN_P3DRAG 0xF0
  144. #endif
  145. #ifndef NOWTCAPABILITIES
  146. /* hardware capabilities */
  147. #define HWC_INTEGRATED 0x0001
  148. #define HWC_TOUCH 0x0002
  149. #define HWC_HARDPROX 0x0004
  150. #define HWC_PHYSID_CURSORS 0x0008 /* 1.1 */
  151. #endif
  152. #ifndef NOWTIFC
  153. #ifndef NOWTCURSORS
  154. /* cursor capabilities */
  155. #define CRC_MULTIMODE 0x0001 /* 1.1 */
  156. #define CRC_AGGREGATE 0x0002 /* 1.1 */
  157. #define CRC_INVERT 0x0004 /* 1.1 */
  158. #endif
  159. /* info categories */
  160. #define WTI_INTERFACE 1
  161. #define IFC_WINTABID 1
  162. #define IFC_SPECVERSION 2
  163. #define IFC_IMPLVERSION 3
  164. #define IFC_NDEVICES 4
  165. #define IFC_NCURSORS 5
  166. #define IFC_NCONTEXTS 6
  167. #define IFC_CTXOPTIONS 7
  168. #define IFC_CTXSAVESIZE 8
  169. #define IFC_NEXTENSIONS 9
  170. #define IFC_NMANAGERS 10
  171. #define IFC_MAX 10
  172. #endif
  173. #ifndef NOWTSTATUS
  174. #define WTI_STATUS 2
  175. #define STA_CONTEXTS 1
  176. #define STA_SYSCTXS 2
  177. #define STA_PKTRATE 3
  178. #define STA_PKTDATA 4
  179. #define STA_MANAGERS 5
  180. #define STA_SYSTEM 6
  181. #define STA_BUTTONUSE 7
  182. #define STA_SYSBTNUSE 8
  183. #define STA_MAX 8
  184. #endif
  185. #ifndef NOWTDEFCONTEXT
  186. #define WTI_DEFCONTEXT 3
  187. #define WTI_DEFSYSCTX 4
  188. #define WTI_DDCTXS 400 /* 1.1 */
  189. #define WTI_DSCTXS 500 /* 1.1 */
  190. #define CTX_NAME 1
  191. #define CTX_OPTIONS 2
  192. #define CTX_STATUS 3
  193. #define CTX_LOCKS 4
  194. #define CTX_MSGBASE 5
  195. #define CTX_DEVICE 6
  196. #define CTX_PKTRATE 7
  197. #define CTX_PKTDATA 8
  198. #define CTX_PKTMODE 9
  199. #define CTX_MOVEMASK 10
  200. #define CTX_BTNDNMASK 11
  201. #define CTX_BTNUPMASK 12
  202. #define CTX_INORGX 13
  203. #define CTX_INORGY 14
  204. #define CTX_INORGZ 15
  205. #define CTX_INEXTX 16
  206. #define CTX_INEXTY 17
  207. #define CTX_INEXTZ 18
  208. #define CTX_OUTORGX 19
  209. #define CTX_OUTORGY 20
  210. #define CTX_OUTORGZ 21
  211. #define CTX_OUTEXTX 22
  212. #define CTX_OUTEXTY 23
  213. #define CTX_OUTEXTZ 24
  214. #define CTX_SENSX 25
  215. #define CTX_SENSY 26
  216. #define CTX_SENSZ 27
  217. #define CTX_SYSMODE 28
  218. #define CTX_SYSORGX 29
  219. #define CTX_SYSORGY 30
  220. #define CTX_SYSEXTX 31
  221. #define CTX_SYSEXTY 32
  222. #define CTX_SYSSENSX 33
  223. #define CTX_SYSSENSY 34
  224. #define CTX_MAX 34
  225. #endif
  226. #ifndef NOWTDEVICES
  227. #define WTI_DEVICES 100
  228. #define DVC_NAME 1
  229. #define DVC_HARDWARE 2
  230. #define DVC_NCSRTYPES 3
  231. #define DVC_FIRSTCSR 4
  232. #define DVC_PKTRATE 5
  233. #define DVC_PKTDATA 6
  234. #define DVC_PKTMODE 7
  235. #define DVC_CSRDATA 8
  236. #define DVC_XMARGIN 9
  237. #define DVC_YMARGIN 10
  238. #define DVC_ZMARGIN 11
  239. #define DVC_X 12
  240. #define DVC_Y 13
  241. #define DVC_Z 14
  242. #define DVC_NPRESSURE 15
  243. #define DVC_TPRESSURE 16
  244. #define DVC_ORIENTATION 17
  245. #define DVC_ROTATION 18 /* 1.1 */
  246. #define DVC_PNPID 19 /* 1.1 */
  247. #define DVC_MAX 19
  248. #endif
  249. #ifndef NOWTCURSORS
  250. #define WTI_CURSORS 200
  251. #define CSR_NAME 1
  252. #define CSR_ACTIVE 2
  253. #define CSR_PKTDATA 3
  254. #define CSR_BUTTONS 4
  255. #define CSR_BUTTONBITS 5
  256. #define CSR_BTNNAMES 6
  257. #define CSR_BUTTONMAP 7
  258. #define CSR_SYSBTNMAP 8
  259. #define CSR_NPBUTTON 9
  260. #define CSR_NPBTNMARKS 10
  261. #define CSR_NPRESPONSE 11
  262. #define CSR_TPBUTTON 12
  263. #define CSR_TPBTNMARKS 13
  264. #define CSR_TPRESPONSE 14
  265. #define CSR_PHYSID 15 /* 1.1 */
  266. #define CSR_MODE 16 /* 1.1 */
  267. #define CSR_MINPKTDATA 17 /* 1.1 */
  268. #define CSR_MINBUTTONS 18 /* 1.1 */
  269. #define CSR_CAPABILITIES 19 /* 1.1 */
  270. #define CSR_MAX 19
  271. #endif
  272. #ifndef NOWTEXTENSIONS
  273. #define WTI_EXTENSIONS 300
  274. #define EXT_NAME 1
  275. #define EXT_TAG 2
  276. #define EXT_MASK 3
  277. #define EXT_SIZE 4
  278. #define EXT_AXES 5
  279. #define EXT_DEFAULT 6
  280. #define EXT_DEFCONTEXT 7
  281. #define EXT_DEFSYSCTX 8
  282. #define EXT_CURSORS 9
  283. #define EXT_MAX 109 /* Allow 100 cursors */
  284. #endif
  285. #endif
  286. /* -------------------------------------------------------------------------- */
  287. /* CONTEXT DATA DEFS */
  288. #define LCNAMELEN 40
  289. #define LC_NAMELEN 40
  290. #ifdef WIN32
  291. typedef struct tagLOGCONTEXTA {
  292. char lcName[LCNAMELEN];
  293. UINT lcOptions;
  294. UINT lcStatus;
  295. UINT lcLocks;
  296. UINT lcMsgBase;
  297. UINT lcDevice;
  298. UINT lcPktRate;
  299. WTPKT lcPktData;
  300. WTPKT lcPktMode;
  301. WTPKT lcMoveMask;
  302. DWORD lcBtnDnMask;
  303. DWORD lcBtnUpMask;
  304. LONG lcInOrgX;
  305. LONG lcInOrgY;
  306. LONG lcInOrgZ;
  307. LONG lcInExtX;
  308. LONG lcInExtY;
  309. LONG lcInExtZ;
  310. LONG lcOutOrgX;
  311. LONG lcOutOrgY;
  312. LONG lcOutOrgZ;
  313. LONG lcOutExtX;
  314. LONG lcOutExtY;
  315. LONG lcOutExtZ;
  316. FIX32 lcSensX;
  317. FIX32 lcSensY;
  318. FIX32 lcSensZ;
  319. BOOL lcSysMode;
  320. int lcSysOrgX;
  321. int lcSysOrgY;
  322. int lcSysExtX;
  323. int lcSysExtY;
  324. FIX32 lcSysSensX;
  325. FIX32 lcSysSensY;
  326. } LOGCONTEXTA, *PLOGCONTEXTA, NEAR *NPLOGCONTEXTA, FAR *LPLOGCONTEXTA;
  327. typedef struct tagLOGCONTEXTW {
  328. WCHAR lcName[LCNAMELEN];
  329. UINT lcOptions;
  330. UINT lcStatus;
  331. UINT lcLocks;
  332. UINT lcMsgBase;
  333. UINT lcDevice;
  334. UINT lcPktRate;
  335. WTPKT lcPktData;
  336. WTPKT lcPktMode;
  337. WTPKT lcMoveMask;
  338. DWORD lcBtnDnMask;
  339. DWORD lcBtnUpMask;
  340. LONG lcInOrgX;
  341. LONG lcInOrgY;
  342. LONG lcInOrgZ;
  343. LONG lcInExtX;
  344. LONG lcInExtY;
  345. LONG lcInExtZ;
  346. LONG lcOutOrgX;
  347. LONG lcOutOrgY;
  348. LONG lcOutOrgZ;
  349. LONG lcOutExtX;
  350. LONG lcOutExtY;
  351. LONG lcOutExtZ;
  352. FIX32 lcSensX;
  353. FIX32 lcSensY;
  354. FIX32 lcSensZ;
  355. BOOL lcSysMode;
  356. int lcSysOrgX;
  357. int lcSysOrgY;
  358. int lcSysExtX;
  359. int lcSysExtY;
  360. FIX32 lcSysSensX;
  361. FIX32 lcSysSensY;
  362. } LOGCONTEXTW, *PLOGCONTEXTW, NEAR *NPLOGCONTEXTW, FAR *LPLOGCONTEXTW;
  363. #ifdef UNICODE
  364. typedef LOGCONTEXTW LOGCONTEXT;
  365. typedef PLOGCONTEXTW PLOGCONTEXT;
  366. typedef NPLOGCONTEXTW NPLOGCONTEXT;
  367. typedef LPLOGCONTEXTW LPLOGCONTEXT;
  368. #else
  369. typedef LOGCONTEXTA LOGCONTEXT;
  370. typedef PLOGCONTEXTA PLOGCONTEXT;
  371. typedef NPLOGCONTEXTA NPLOGCONTEXT;
  372. typedef LPLOGCONTEXTA LPLOGCONTEXT;
  373. #endif /* UNICODE */
  374. #else /* WIN32 */
  375. typedef struct tagLOGCONTEXT {
  376. char lcName[LCNAMELEN];
  377. UINT lcOptions;
  378. UINT lcStatus;
  379. UINT lcLocks;
  380. UINT lcMsgBase;
  381. UINT lcDevice;
  382. UINT lcPktRate;
  383. WTPKT lcPktData;
  384. WTPKT lcPktMode;
  385. WTPKT lcMoveMask;
  386. DWORD lcBtnDnMask;
  387. DWORD lcBtnUpMask;
  388. LONG lcInOrgX;
  389. LONG lcInOrgY;
  390. LONG lcInOrgZ;
  391. LONG lcInExtX;
  392. LONG lcInExtY;
  393. LONG lcInExtZ;
  394. LONG lcOutOrgX;
  395. LONG lcOutOrgY;
  396. LONG lcOutOrgZ;
  397. LONG lcOutExtX;
  398. LONG lcOutExtY;
  399. LONG lcOutExtZ;
  400. FIX32 lcSensX;
  401. FIX32 lcSensY;
  402. FIX32 lcSensZ;
  403. BOOL lcSysMode;
  404. int lcSysOrgX;
  405. int lcSysOrgY;
  406. int lcSysExtX;
  407. int lcSysExtY;
  408. FIX32 lcSysSensX;
  409. FIX32 lcSysSensY;
  410. } LOGCONTEXT, *PLOGCONTEXT, NEAR *NPLOGCONTEXT, FAR *LPLOGCONTEXT;
  411. #endif /* WIN32 */
  412. /* context option values */
  413. #define CXO_SYSTEM 0x0001
  414. #define CXO_PEN 0x0002
  415. #define CXO_MESSAGES 0x0004
  416. #define CXO_MARGIN 0x8000
  417. #define CXO_MGNINSIDE 0x4000
  418. #define CXO_CSRMESSAGES 0x0008 /* 1.1 */
  419. /* context status values */
  420. #define CXS_DISABLED 0x0001
  421. #define CXS_OBSCURED 0x0002
  422. #define CXS_ONTOP 0x0004
  423. /* context lock values */
  424. #define CXL_INSIZE 0x0001
  425. #define CXL_INASPECT 0x0002
  426. #define CXL_SENSITIVITY 0x0004
  427. #define CXL_MARGIN 0x0008
  428. #define CXL_SYSOUT 0x0010
  429. /* -------------------------------------------------------------------------- */
  430. /* EVENT DATA DEFS */
  431. /* For packet structure definition, see pktdef.h */
  432. /* packet status values */
  433. #define TPS_PROXIMITY 0x0001
  434. #define TPS_QUEUE_ERR 0x0002
  435. #define TPS_MARGIN 0x0004
  436. #define TPS_GRAB 0x0008
  437. #define TPS_INVERT 0x0010 /* 1.1 */
  438. typedef struct tagORIENTATION {
  439. int orAzimuth;
  440. int orAltitude;
  441. int orTwist;
  442. } ORIENTATION, *PORIENTATION, NEAR *NPORIENTATION, FAR *LPORIENTATION;
  443. typedef struct tagROTATION { /* 1.1 */
  444. int roPitch;
  445. int roRoll;
  446. int roYaw;
  447. } ROTATION, *PROTATION, NEAR *NPROTATION, FAR *LPROTATION;
  448. // grandfather in obsolete member names.
  449. #define rotPitch roPitch
  450. #define rotRoll roRoll
  451. #define rotYaw roYaw
  452. /* relative buttons */
  453. #define TBN_NONE 0
  454. #define TBN_UP 1
  455. #define TBN_DOWN 2
  456. /* -------------------------------------------------------------------------- */
  457. /* DEVICE CONFIG CONSTANTS */
  458. #ifndef NOWTDEVCFG
  459. #define WTDC_NONE 0
  460. #define WTDC_CANCEL 1
  461. #define WTDC_OK 2
  462. #define WTDC_RESTART 3
  463. #endif
  464. /* -------------------------------------------------------------------------- */
  465. /* HOOK CONSTANTS */
  466. #ifndef NOWTHOOKS
  467. #define WTH_PLAYBACK 1
  468. #define WTH_RECORD 2
  469. #define WTHC_GETLPLPFN (-3)
  470. #define WTHC_LPLPFNNEXT (-2)
  471. #define WTHC_LPFNNEXT (-1)
  472. #define WTHC_ACTION 0
  473. #define WTHC_GETNEXT 1
  474. #define WTHC_SKIP 2
  475. #endif
  476. /* -------------------------------------------------------------------------- */
  477. /* PREFERENCE FUNCTION CONSTANTS */
  478. #ifndef NOWTPREF
  479. #define WTP_LPDEFAULT ((LPVOID)-1L)
  480. #define WTP_DWDEFAULT ((DWORD)-1L)
  481. #endif
  482. /* -------------------------------------------------------------------------- */
  483. /* EXTENSION TAGS AND CONSTANTS */
  484. #ifndef NOWTEXTENSIONS
  485. /* constants for use with pktdef.h */
  486. #define PKEXT_ABSOLUTE 1
  487. #define PKEXT_RELATIVE 2
  488. /* Extension tags. */
  489. #define WTX_OBT 0 /* Out of bounds tracking */
  490. #define WTX_FKEYS 1 /* Function keys */
  491. #define WTX_TILT 2 /* Raw Cartesian tilt; 1.1 */
  492. #define WTX_CSRMASK 3 /* select input by cursor type; 1.1 */
  493. #define WTX_XBTNMASK 4 /* Extended button mask; 1.1 */
  494. typedef struct tagXBTNMASK {
  495. BYTE xBtnDnMask[32];
  496. BYTE xBtnUpMask[32];
  497. } XBTNMASK;
  498. typedef struct tagTILT { /* 1.1 */
  499. int tiltX;
  500. int tiltY;
  501. } TILT;
  502. #endif
  503. /* -------------------------------------------------------------------------- */
  504. /* -------------------------------------------------------------------------- */
  505. /* Functions */
  506. #ifndef API
  507. #ifndef WINAPI
  508. #define API FAR PASCAL
  509. #else
  510. #define API WINAPI
  511. #endif
  512. #endif
  513. #ifndef NOWTCALLBACKS
  514. #ifndef CALLBACK
  515. #define CALLBACK FAR PASCAL
  516. #endif
  517. #ifndef NOWTMANAGERFXNS
  518. /* callback function types */
  519. typedef BOOL (WINAPI * WTENUMPROC)(HCTX, LPARAM); /* changed CALLBACK->WINAPI, 1.1 */
  520. typedef BOOL (WINAPI * WTCONFIGPROC)(HCTX, HWND);
  521. typedef LRESULT (WINAPI * WTHOOKPROC)(int, WPARAM, LPARAM);
  522. typedef WTHOOKPROC FAR *LPWTHOOKPROC;
  523. #endif
  524. #endif
  525. #ifndef NOWTFUNCTIONS
  526. #ifndef NOWTBASICFXNS
  527. /* BASIC FUNCTIONS */
  528. #ifdef WIN32
  529. UINT API WTInfoA(UINT, UINT, LPVOID);
  530. #define ORD_WTInfoA 20
  531. UINT API WTInfoW(UINT, UINT, LPVOID);
  532. #define ORD_WTInfoW 1020
  533. #ifdef UNICODE
  534. #define WTInfo WTInfoW
  535. #define ORD_WTInfo ORD_WTInfoW
  536. #else
  537. #define WTInfo WTInfoA
  538. #define ORD_WTInfo ORD_WTInfoA
  539. #endif /* !UNICODE */
  540. #else
  541. UINT API WTInfo(UINT, UINT, LPVOID);
  542. #define ORD_WTInfo 20
  543. #endif
  544. #ifdef WIN32
  545. HCTX API WTOpenA(HWND, LPLOGCONTEXTA, BOOL);
  546. #define ORD_WTOpenA 21
  547. HCTX API WTOpenW(HWND, LPLOGCONTEXTW, BOOL);
  548. #define ORD_WTOpenW 1021
  549. #ifdef UNICODE
  550. #define WTOpen WTOpenW
  551. #define ORD_WTOpen ORD_WTOpenW
  552. #else
  553. #define WTOpen WTOpenA
  554. #define ORD_WTOpen ORD_WTOpenA
  555. #endif /* !UNICODE */
  556. #else
  557. HCTX API WTOpen(HWND, LPLOGCONTEXT, BOOL);
  558. #define ORD_WTOpen 21
  559. #endif
  560. BOOL API WTClose(HCTX);
  561. #define ORD_WTClose 22
  562. int API WTPacketsGet(HCTX, int, LPVOID);
  563. #define ORD_WTPacketsGet 23
  564. BOOL API WTPacket(HCTX, UINT, LPVOID);
  565. #define ORD_WTPacket 24
  566. #endif
  567. #ifndef NOWTVISIBILITYFXNS
  568. /* VISIBILITY FUNCTIONS */
  569. BOOL API WTEnable(HCTX, BOOL);
  570. #define ORD_WTEnable 40
  571. BOOL API WTOverlap(HCTX, BOOL);
  572. #define ORD_WTOverlap 41
  573. #endif
  574. #ifndef NOWTCTXEDITFXNS
  575. /* CONTEXT EDITING FUNCTIONS */
  576. BOOL API WTConfig(HCTX, HWND);
  577. #define ORD_WTConfig 60
  578. #ifdef WIN32
  579. BOOL API WTGetA(HCTX, LPLOGCONTEXTA);
  580. #define ORD_WTGetA 61
  581. BOOL API WTGetW(HCTX, LPLOGCONTEXTW);
  582. #define ORD_WTGetW 1061
  583. #ifdef UNICODE
  584. #define WTGet WTGetW
  585. #define ORD_WTGet ORD_WTGetW
  586. #else
  587. #define WTGet WTGetA
  588. #define ORD_WTGet ORD_WTGetA
  589. #endif /* !UNICODE */
  590. #else
  591. BOOL API WTGet(HCTX, LPLOGCONTEXT);
  592. #define ORD_WTGet 61
  593. #endif
  594. #ifdef WIN32
  595. BOOL API WTSetA(HCTX, LPLOGCONTEXTA);
  596. #define ORD_WTSetA 62
  597. BOOL API WTSetW(HCTX, LPLOGCONTEXTW);
  598. #define ORD_WTSetW 1062
  599. #ifdef UNICODE
  600. #define WTSet WTSetW
  601. #define ORD_WTSet ORD_WTSetW
  602. #else
  603. #define WTSet WTSetA
  604. #define ORD_WTSet ORD_WTSetA
  605. #endif /* !UNICODE */
  606. #else
  607. BOOL API WTSet(HCTX, LPLOGCONTEXT);
  608. #define ORD_WTSet 62
  609. #endif
  610. BOOL API WTExtGet(HCTX, UINT, LPVOID);
  611. #define ORD_WTExtGet 63
  612. BOOL API WTExtSet(HCTX, UINT, LPVOID);
  613. #define ORD_WTExtSet 64
  614. BOOL API WTSave(HCTX, LPVOID);
  615. #define ORD_WTSave 65
  616. HCTX API WTRestore(HWND, LPVOID, BOOL);
  617. #define ORD_WTRestore 66
  618. #endif
  619. #ifndef NOWTQUEUEFXNS
  620. /* ADVANCED PACKET AND QUEUE FUNCTIONS */
  621. int API WTPacketsPeek(HCTX, int, LPVOID);
  622. #define ORD_WTPacketsPeek 80
  623. int API WTDataGet(HCTX, UINT, UINT, int, LPVOID, LPINT);
  624. #define ORD_WTDataGet 81
  625. int API WTDataPeek(HCTX, UINT, UINT, int, LPVOID, LPINT);
  626. #define ORD_WTDataPeek 82
  627. #ifndef WIN32
  628. /* OBSOLETE IN WIN32! */
  629. DWORD API WTQueuePackets(HCTX);
  630. #define ORD_WTQueuePackets 83
  631. #endif
  632. int API WTQueueSizeGet(HCTX);
  633. #define ORD_WTQueueSizeGet 84
  634. BOOL API WTQueueSizeSet(HCTX, int);
  635. #define ORD_WTQueueSizeSet 85
  636. #endif
  637. #ifndef NOWTHMGRFXNS
  638. /* MANAGER HANDLE FUNCTIONS */
  639. HMGR API WTMgrOpen(HWND, UINT);
  640. #define ORD_WTMgrOpen 100
  641. BOOL API WTMgrClose(HMGR);
  642. #define ORD_WTMgrClose 101
  643. #endif
  644. #ifndef NOWTMGRCTXFXNS
  645. /* MANAGER CONTEXT FUNCTIONS */
  646. BOOL API WTMgrContextEnum(HMGR, WTENUMPROC, LPARAM);
  647. #define ORD_WTMgrContextEnum 120
  648. HWND API WTMgrContextOwner(HMGR, HCTX);
  649. #define ORD_WTMgrContextOwner 121
  650. HCTX API WTMgrDefContext(HMGR, BOOL);
  651. #define ORD_WTMgrDefContext 122
  652. HCTX API WTMgrDefContextEx(HMGR, UINT, BOOL); /* 1.1 */
  653. #define ORD_WTMgrDefContextEx 206
  654. #endif
  655. #ifndef NOWTMGRCONFIGFXNS
  656. /* MANAGER CONFIG BOX FUNCTIONS */
  657. UINT API WTMgrDeviceConfig(HMGR, UINT, HWND);
  658. #define ORD_WTMgrDeviceConfig 140
  659. #ifndef WIN32
  660. /* OBSOLETE IN WIN32! */
  661. BOOL API WTMgrConfigReplace(HMGR, BOOL, WTCONFIGPROC);
  662. #define ORD_WTMgrConfigReplace 141
  663. #endif
  664. #endif
  665. #ifndef NOWTMGRHOOKFXNS
  666. /* MANAGER PACKET HOOK FUNCTIONS */
  667. #ifndef WIN32
  668. /* OBSOLETE IN WIN32! */
  669. WTHOOKPROC API WTMgrPacketHook(HMGR, BOOL, int, WTHOOKPROC);
  670. #define ORD_WTMgrPacketHook 160
  671. LRESULT API WTMgrPacketHookDefProc(int, WPARAM, LPARAM, LPWTHOOKPROC);
  672. #define ORD_WTMgrPacketHookDefProc 161
  673. #endif
  674. #endif
  675. #ifndef NOWTMGRPREFFXNS
  676. /* MANAGER PREFERENCE DATA FUNCTIONS */
  677. BOOL API WTMgrExt(HMGR, UINT, LPVOID);
  678. #define ORD_WTMgrExt 180
  679. BOOL API WTMgrCsrEnable(HMGR, UINT, BOOL);
  680. #define ORD_WTMgrCsrEnable 181
  681. BOOL API WTMgrCsrButtonMap(HMGR, UINT, LPBYTE, LPBYTE);
  682. #define ORD_WTMgrCsrButtonMap 182
  683. BOOL API WTMgrCsrPressureBtnMarks(HMGR, UINT, DWORD, DWORD);
  684. #define ORD_WTMgrCsrPressureBtnMarks 183
  685. BOOL API WTMgrCsrPressureResponse(HMGR, UINT, UINT FAR *, UINT FAR *);
  686. #define ORD_WTMgrCsrPressureResponse 184
  687. BOOL API WTMgrCsrExt(HMGR, UINT, UINT, LPVOID);
  688. #define ORD_WTMgrCsrExt 185
  689. #endif
  690. /* Win32 replacements for non-portable functions. */
  691. #ifndef NOWTQUEUEFXNS
  692. /* ADVANCED PACKET AND QUEUE FUNCTIONS */
  693. BOOL API WTQueuePacketsEx(HCTX, UINT FAR *, UINT FAR *);
  694. #define ORD_WTQueuePacketsEx 200
  695. #endif
  696. #ifndef NOWTMGRCONFIGFXNS
  697. /* MANAGER CONFIG BOX FUNCTIONS */
  698. #ifdef WIN32
  699. BOOL API WTMgrConfigReplaceExA(HMGR, BOOL, LPSTR, LPSTR);
  700. #define ORD_WTMgrConfigReplaceExA 202
  701. BOOL API WTMgrConfigReplaceExW(HMGR, BOOL, LPWSTR, LPSTR);
  702. #define ORD_WTMgrConfigReplaceExW 1202
  703. #ifdef UNICODE
  704. #define WTMgrConfigReplaceEx WTMgrConfigReplaceExW
  705. #define ORD_WTMgrConfigReplaceEx ORD_WTMgrConfigReplaceExW
  706. #else
  707. #define WTMgrConfigReplaceEx WTMgrConfigReplaceExA
  708. #define ORD_WTMgrConfigReplaceEx ORD_WTMgrConfigReplaceExA
  709. #endif /* !UNICODE */
  710. #else
  711. BOOL API WTMgrConfigReplaceEx(HMGR, BOOL, LPSTR, LPSTR);
  712. #define ORD_WTMgrConfigReplaceEx 202
  713. #endif
  714. #endif
  715. #ifndef NOWTMGRHOOKFXNS
  716. /* MANAGER PACKET HOOK FUNCTIONS */
  717. #ifdef WIN32
  718. HWTHOOK API WTMgrPacketHookExA(HMGR, int, LPSTR, LPSTR);
  719. #define ORD_WTMgrPacketHookExA 203
  720. HWTHOOK API WTMgrPacketHookExW(HMGR, int, LPWSTR, LPSTR);
  721. #define ORD_WTMgrPacketHookExW 1203
  722. #ifdef UNICODE
  723. #define WTMgrPacketHookEx WTMgrPacketHookExW
  724. #define ORD_WTMgrPacketHookEx ORD_WTMgrPacketHookExW
  725. #else
  726. #define WTMgrPacketHookEx WTMgrPacketHookExA
  727. #define ORD_WTMgrPacketHookEx ORD_WTMgrPacketHookExA
  728. #endif /* !UNICODE */
  729. #else
  730. HWTHOOK API WTMgrPacketHookEx(HMGR, int, LPSTR, LPSTR);
  731. #define ORD_WTMgrPacketHookEx 203
  732. #endif
  733. BOOL API WTMgrPacketUnhook(HWTHOOK);
  734. #define ORD_WTMgrPacketUnhook 204
  735. LRESULT API WTMgrPacketHookNext(HWTHOOK, int, WPARAM, LPARAM);
  736. #define ORD_WTMgrPacketHookNext 205
  737. #endif
  738. #ifndef NOWTMGRPREFFXNS
  739. /* MANAGER PREFERENCE DATA FUNCTIONS */
  740. BOOL API WTMgrCsrPressureBtnMarksEx(HMGR, UINT, UINT FAR *, UINT FAR *);
  741. #define ORD_WTMgrCsrPressureBtnMarksEx 201
  742. #endif
  743. #endif
  744. #ifdef __cplusplus
  745. }
  746. #endif /* __cplusplus */
  747. #endif /* #define _INC_WINTAB */