wintab.h revision 930b5f872e89407f445d4000d4e4aaecaa6a0998
/*
* Copyright (C) 1991-1998 by LCS/Telegraphics
* Copyright (C) 2002 Patrik Stridvall
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#ifndef __WINE_WINTAB_H
#define __WINE_WINTAB_H
#ifdef __cplusplus
extern "C" {
#endif /* defined(__cplusplus) */
/***********************************************************************
* Messages
*/
#ifndef NOWTMESSAGES
#define WT_DEFBASE 0x7FF0
#define WT_MAXOFFSET 0xF
#define _WT_PACKET(b) ((b)+0)
#define _WT_CTXOPEN(b) ((b)+1)
#define _WT_CTXCLOSE(b) ((b)+2)
#define _WT_CTXUPDATE(b) ((b)+3)
#define _WT_CTXOVERLAP(b) ((b)+4)
#define _WT_PROXIMITY(b) ((b)+5)
#define _WT_INFOCHANGE(b) ((b)+6)
#define _WT_MAX(b) ((b)+WT_MAXOFFSET)
#endif
/***********************************************************************
* COMMON DATA DEFS
*/
#ifndef NOWTPKT
/* WTPKT bits */
#endif
#ifndef NOFIX32
#define FIX_MUL(c, a, b) \
#ifdef _WINDLL
# define FIX_DIV_SC static
#else
# define FIX_DIV_SC
# endif
#define FIX_DIV(c, a, b) \
{ \
\
/* fraction done bytewise */ \
temp = ((a / b) << 16); \
rem = a % b; \
btemp = b; \
rem <<= 8; \
} else { \
btemp >>= 8; \
} \
rem <<= 8; \
c = temp; \
}
#endif
/***********************************************************************
* INFO DATA DEFS
*/
#ifndef NOWTINFO
#ifndef NOWTAXIS
typedef struct tagAXIS {
/* unit specifiers */
#define TU_NONE 0
#define TU_INCHES 1
#define TU_CENTIMETERS 2
#define TU_CIRCLE 3
#endif
#ifndef NOWTSYSBUTTONS
/* system button assignment values */
#define SBN_NONE 0x00
#define SBN_LCLICK 0x01
#define SBN_LDBLCLICK 0x02
#define SBN_LDRAG 0x03
#define SBN_RCLICK 0x04
#define SBN_RDBLCLICK 0x05
#define SBN_RDRAG 0x06
#define SBN_MCLICK 0x07
#define SBN_MDBLCLICK 0x08
#define SBN_MDRAG 0x09
/* for Pen Windows */
#define SBN_PTCLICK 0x10
#define SBN_PTDBLCLICK 0x20
#define SBN_PTDRAG 0x30
#define SBN_PNCLICK 0x40
#define SBN_PNDBLCLICK 0x50
#define SBN_PNDRAG 0x60
#define SBN_P1CLICK 0x70
#define SBN_P1DBLCLICK 0x80
#define SBN_P1DRAG 0x90
#define SBN_P2CLICK 0xA0
#define SBN_P2DBLCLICK 0xB0
#define SBN_P2DRAG 0xC0
#define SBN_P3CLICK 0xD0
#define SBN_P3DBLCLICK 0xE0
#define SBN_P3DRAG 0xF0
#endif
#ifndef NOWTCAPABILITIES
/* hardware capabilities */
#define HWC_INTEGRATED 0x0001
#define HWC_TOUCH 0x0002
#define HWC_HARDPROX 0x0004
#endif
#ifndef NOWTIFC
#ifndef NOWTCURSORS
/* cursor capabilities */
#endif
/* info categories */
#define WTI_INTERFACE 1
#define IFC_WINTABID 1
#define IFC_SPECVERSION 2
#define IFC_IMPLVERSION 3
#define IFC_NDEVICES 4
#define IFC_NCURSORS 5
#define IFC_NCONTEXTS 6
#define IFC_CTXOPTIONS 7
#define IFC_CTXSAVESIZE 8
#define IFC_NEXTENSIONS 9
#define IFC_NMANAGERS 10
#define IFC_MAX 10
#endif
#ifndef NOWTSTATUS
#define WTI_STATUS 2
#define STA_CONTEXTS 1
#define STA_SYSCTXS 2
#define STA_PKTRATE 3
#define STA_PKTDATA 4
#define STA_MANAGERS 5
#define STA_SYSTEM 6
#define STA_BUTTONUSE 7
#define STA_SYSBTNUSE 8
#define STA_MAX 8
#endif
#ifndef NOWTDEFCONTEXT
#define WTI_DEFCONTEXT 3
#define WTI_DEFSYSCTX 4
#define CTX_NAME 1
#define CTX_OPTIONS 2
#define CTX_STATUS 3
#define CTX_LOCKS 4
#define CTX_MSGBASE 5
#define CTX_DEVICE 6
#define CTX_PKTRATE 7
#define CTX_PKTDATA 8
#define CTX_PKTMODE 9
#define CTX_MOVEMASK 10
#define CTX_BTNDNMASK 11
#define CTX_BTNUPMASK 12
#define CTX_INORGX 13
#define CTX_INORGY 14
#define CTX_INORGZ 15
#define CTX_INEXTX 16
#define CTX_INEXTY 17
#define CTX_INEXTZ 18
#define CTX_OUTORGX 19
#define CTX_OUTORGY 20
#define CTX_OUTORGZ 21
#define CTX_OUTEXTX 22
#define CTX_OUTEXTY 23
#define CTX_OUTEXTZ 24
#define CTX_SENSX 25
#define CTX_SENSY 26
#define CTX_SENSZ 27
#define CTX_SYSMODE 28
#define CTX_SYSORGX 29
#define CTX_SYSORGY 30
#define CTX_SYSEXTX 31
#define CTX_SYSEXTY 32
#define CTX_SYSSENSX 33
#define CTX_SYSSENSY 34
#define CTX_MAX 34
#endif
#ifndef NOWTDEVICES
#define WTI_DEVICES 100
#define DVC_NAME 1
#define DVC_HARDWARE 2
#define DVC_NCSRTYPES 3
#define DVC_FIRSTCSR 4
#define DVC_PKTRATE 5
#define DVC_PKTDATA 6
#define DVC_PKTMODE 7
#define DVC_CSRDATA 8
#define DVC_XMARGIN 9
#define DVC_YMARGIN 10
#define DVC_ZMARGIN 11
#define DVC_X 12
#define DVC_Y 13
#define DVC_Z 14
#define DVC_NPRESSURE 15
#define DVC_TPRESSURE 16
#define DVC_ORIENTATION 17
#define DVC_MAX 19
#endif
#ifndef NOWTCURSORS
#define WTI_CURSORS 200
#define CSR_NAME 1
#define CSR_ACTIVE 2
#define CSR_PKTDATA 3
#define CSR_BUTTONS 4
#define CSR_BUTTONBITS 5
#define CSR_BTNNAMES 6
#define CSR_BUTTONMAP 7
#define CSR_SYSBTNMAP 8
#define CSR_NPBUTTON 9
#define CSR_NPBTNMARKS 10
#define CSR_NPRESPONSE 11
#define CSR_TPBUTTON 12
#define CSR_TPBTNMARKS 13
#define CSR_TPRESPONSE 14
#define CSR_TYPE 20
#define CSR_MAX 20
#endif
#ifndef NOWTEXTENSIONS
#define WTI_EXTENSIONS 300
#define EXT_NAME 1
#define EXT_TAG 2
#define EXT_MASK 3
#define EXT_SIZE 4
#define EXT_AXES 5
#define EXT_DEFAULT 6
#define EXT_DEFCONTEXT 7
#define EXT_DEFSYSCTX 8
#define EXT_CURSORS 9
#endif
#endif
/***********************************************************************
* CONTEXT DATA DEFS
*/
#define LCNAMELEN 40
#define LC_NAMELEN 40
typedef struct tagLOGCONTEXTA {
int lcSysOrgX;
int lcSysOrgY;
int lcSysExtX;
int lcSysExtY;
typedef struct tagLOGCONTEXTW {
int lcSysOrgX;
int lcSysOrgY;
int lcSysExtX;
int lcSysExtY;
/* context option values */
#define CXO_SYSTEM 0x0001
#define CXO_PEN 0x0002
#define CXO_MESSAGES 0x0004
#define CXO_MARGIN 0x8000
#define CXO_MGNINSIDE 0x4000
/* context status values */
#define CXS_DISABLED 0x0001
#define CXS_OBSCURED 0x0002
#define CXS_ONTOP 0x0004
/* context lock values */
#define CXL_INSIZE 0x0001
#define CXL_INASPECT 0x0002
#define CXL_SENSITIVITY 0x0004
#define CXL_MARGIN 0x0008
#define CXL_SYSOUT 0x0010
/***********************************************************************
* EVENT DATA DEFS
*/
/* For packet structure definition, see pktdef.h */
/* packet status values */
#define TPS_PROXIMITY 0x0001
#define TPS_QUEUE_ERR 0x0002
#define TPS_MARGIN 0x0004
#define TPS_GRAB 0x0008
typedef struct tagORIENTATION {
int orAzimuth;
int orAltitude;
int orTwist;
typedef struct tagROTATION { /* 1.1 */
int roPitch;
int roRoll;
int roYaw;
/* grandfather in obsolete member names. */
/* relative buttons */
#define TBN_NONE 0
#define TBN_UP 1
#define TBN_DOWN 2
/***********************************************************************
* DEVICE CONFIG CONSTANTS
*/
#ifndef NOWTDEVCFG
#define WTDC_NONE 0
#define WTDC_CANCEL 1
#define WTDC_OK 2
#define WTDC_RESTART 3
#endif
/***********************************************************************
* HOOK CONSTANTS
*/
#ifndef NOWTHOOKS
#define WTH_PLAYBACK 1
#define WTH_RECORD 2
#define WTHC_GETLPLPFN (-3)
#define WTHC_LPLPFNNEXT (-2)
#define WTHC_LPFNNEXT (-1)
#define WTHC_ACTION 0
#define WTHC_GETNEXT 1
#define WTHC_SKIP 2
#endif
/***********************************************************************
* PREFERENCE FUNCTION CONSTANTS
*/
#ifndef NOWTPREF
#endif
/***********************************************************************
* EXTENSION TAGS AND CONSTANTS
*/
#ifndef NOWTEXTENSIONS
/* constants for use with pktdef.h */
#define PKEXT_ABSOLUTE 1
#define PKEXT_RELATIVE 2
/* Extension tags. */
#define WTX_OBT 0 /* Out of bounds tracking */
typedef struct tagXBTNMASK {
} XBTNMASK;
typedef struct tagTILT { /* 1.1 */
int tiltX;
int tiltY;
} TILT;
#endif
/***********************************************************************
* Functions
*/
#ifndef NOWTCALLBACKS
#ifndef NOWTMANAGERFXNS
/* callback function types */
typedef WTHOOKPROC *LPWTHOOKPROC;
#endif
#endif
#ifndef NOWTFUNCTIONS
#ifndef NOWTBASICFXNS
/* BASIC FUNCTIONS */
#define ORD_WTInfoA 20
#define ORD_WTInfoW 1020
#define ORD_WTOpenA 21
#define ORD_WTOpenW 1021
#define ORD_WTClose 22
#define ORD_WTPacketsGet 23
#define ORD_WTPacket 24
#endif
#ifndef NOWTVISIBILITYFXNS
/* VISIBILITY FUNCTIONS */
#define ORD_WTEnable 40
#define ORD_WTOverlap 41
#endif
#ifndef NOWTCTXEDITFXNS
/* CONTEXT EDITING FUNCTIONS */
#define ORD_WTConfig 60
#define ORD_WTGetA 61
#define ORD_WTGetW 1061
#define ORD_WTSetA 62
#define ORD_WTSetW 1062
#define ORD_WTExtGet 63
#define ORD_WTExtSet 64
#define ORD_WTSave 65
#define ORD_WTRestore 66
#endif
#ifndef NOWTQUEUEFXNS
/* ADVANCED PACKET AND QUEUE FUNCTIONS */
#define ORD_WTPacketsPeek 80
#define ORD_WTDataGet 81
#define ORD_WTDataPeek 82
#define ORD_WTQueueSizeGet 84
#define ORD_WTQueueSizeSet 85
#endif
#ifndef NOWTHMGRFXNS
/* MANAGER HANDLE FUNCTIONS */
#define ORD_WTMgrOpen 100
#define ORD_WTMgrClose 101
#endif
#ifndef NOWTMGRCTXFXNS
/* MANAGER CONTEXT FUNCTIONS */
#define ORD_WTMgrContextEnum 120
#define ORD_WTMgrContextOwner 121
#define ORD_WTMgrDefContext 122
#define ORD_WTMgrDefContextEx 206
#endif
#ifndef NOWTMGRCONFIGFXNS
/* MANAGER CONFIG BOX FUNCTIONS */
#define ORD_WTMgrDeviceConfig 140
#endif
#ifndef NOWTMGRHOOKFXNS
/* MANAGER PACKET HOOK FUNCTIONS */
/* OBSOLETE IN WIN32! */
#endif
#ifndef NOWTMGRPREFFXNS
/* MANAGER PREFERENCE DATA FUNCTIONS */
#define ORD_WTMgrExt 180
#define ORD_WTMgrCsrEnable 181
#define ORD_WTMgrCsrButtonMap 182
#define ORD_WTMgrCsrPressureBtnMarks 183
#define ORD_WTMgrCsrPressureResponse 184
#define ORD_WTMgrCsrExt 185
#endif
/***********************************************************************
* Win32 replacements for non-portable functions.
*/
#ifndef NOWTQUEUEFXNS
/* ADVANCED PACKET AND QUEUE FUNCTIONS */
#define ORD_WTQueuePacketsEx 200
#endif
#ifndef NOWTMGRCONFIGFXNS
/* MANAGER CONFIG BOX FUNCTIONS */
#define ORD_WTMgrConfigReplaceExA 202
#define ORD_WTMgrConfigReplaceExW 1202
#endif
#ifndef NOWTMGRHOOKFXNS
/* MANAGER PACKET HOOK FUNCTIONS */
#define ORD_WTMgrPacketHookExA 203
#define ORD_WTMgrPacketHookExW 1203
#define ORD_WTMgrPacketUnhook 204
#define ORD_WTMgrPacketHookNext 205
#endif
#ifndef NOWTMGRPREFFXNS
/* MANAGER PREFERENCE DATA FUNCTIONS */
#define ORD_WTMgrCsrPressureBtnMarksEx 201
#endif
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */
#endif /* defined(__WINE_WINTAB_H */