Crate wintab_lite

Crate wintab_lite 

Source
Expand description

§Wintab Lite

This is an un-official port of the wintab.h headers to rust. It is provided as is and without support or any sort of warranty express or implied etc etc.

The original wintab headers and documentation are marked with a copyright notice by Wacom.

See here and here However the example code provided by Wacom is MIT licensed here

For example usage please read / run the example cargo run --example wininit_libloading

Modules§

WT
These are the event numbers of the wintab events which are sent to the window that owns the a context or any ‘manager’ windows. e.g. WT::PACKET is the event received by a window when a packet is available.

Macros§

cast_void
Takes a mutable reference to the input then casts it to a void pointer: The result can be interpreted as LPVOID or *mut std::ffi::c_void.

Structs§

AXIS
Describes range and resolution for many of the packet data items.
Bitmask
This is a wrapper for integer types that basically just changes the debug display to show as a binary string of 1s and 0s
ButtonChange
This struct is unused, in a previous version it was the type of Packet::pkButtons I think it was working, but i opted to use the bitmask datatype instead.
CRC
See CSR::CAPABILITIES cursor capabilities
CString40
CXL
CXO
See LOGCONTEXT::lcOptions
CXS
FIX32
A 32-bit fixed-point arithmetic type, with the radix point between the two words. Thus, the type contains 16 bits to the left of the radix point and 16 bits to the right of it.
HCTX
This is not meant to be instantiated, we only ever use the pointer to this type
HWC
See WTI::DEVICES and DVC::HARDWARE hardware and driver capabilities
LOGCONTEXT
The LOGCONTEXT data structure is used when opening and manipulating contexts. This structure contains everything applications and tablet managers need to know about a context. To simplify context manipulations, applications may want to take advantage of the default context specification available via the WTInfoA function.
Packet
This is the full packet data structure, for absolute mode packets except for buttons which is assumed to be in relative mode. To receive packets with this struct the user MUST call WTOpen with a LOGCONTEXT where
WTPKT
Data items available in event packets. Can also contain extension data items not documented below.
XY
A utility struct to represent a 2 dimensional coordinate
XYZ
A utility struct to represent a 3 dimensional coordinate

Enums§

ButtonChangeType
See ButtonChange
CSR
WTI::CURSORS Index Definitions
CTX
WTI::DEFCONTEXT, WTI::DEFSYSCTX, WTI::DDCTXS, and WTI::DSCTXS Index Definitions
DVC
WTI::DEVICES Index Definitions
EXT
WTI::EXTENSIONS Index Definitions
IFC
WTI::INTERFACE Index Definitions
STA
WTI::STATUS Index Definitions
WTI
The Information Category; used as the first argument when querying wintab through the WTInfo() function.

Type Aliases§

BOOL
= std::ffi::c_int ≈ i32
DWORD
= std::ffi::c_long ≈ u32
INT
= std::ffi::c_int ≈ i32 Note: the original wintab spec just uses int directly. I create this alias for consistency in this crate
LONG
= std::ffi::c_long ≈ i32
LPVOID
= *mut std::ffi::c_void
UINT
= std::ffi::u_int ≈ u32