4.13 wintab -- Wrapper around the WintabTM Developer Kit

The WintabTM specification is an open industry standard interface that provides access to pointing devices such as a pen tablet, for example. The API was developed by LCS/Telegraphics.

The wintab module is a wrapper around the WintabTM Developer Kit and can be used to add tablet support to your Python application. Before you can get any data from the tablet you have to create an instance of the Context class, set the desired parameters and open the context. Once the context is open you will either receive messages from the tablet driver or you can poll the current tablet state. Either way, you will receive the tablet data via Packet objects that contain all the data that was generated by the tablet. See also the Wintab Interface Specification at http://www.pointing.com/ for more detailed usage information.

The constants used in this module are either available in the wintab module or in the wintab.constants module. The latter can be used if you want to import only the constants into your namespace.

available( )
Returns True if the Wintab functionality is available. As the Wintab Developer Kit is only available on Windows, this function will always return False on other operating systems.

On Windows, this function can still return False if either the Wintab drivers are not installed or cgkit was compiled without Wintab support.

If this function returns False, an exception will be raised whenever you try to call another function or instantiate a class from this module.

info( category)
This function returns a dictionary with global information about the interface. category specifies the category from which information is being requested. It can be one of the values in the following table:

Category Description
WTI_INTERFACE Global interface identification and capability information
WTI_STATUS Current interface resource usage statistics
WTI_DEFCONTEXT ...
WTI_DEFSYSCTX ...
WTI_DEVICES+n Capability and status information for a device
WTI_CURSORS+n Capability and status information for a cursor
WTI_EXTENSIONS+n Descriptive information and defaults for an extension
WTI_DDCTXS ...
WTI_DSCTXS ...

Note: The module uses the WintabTM Programmer's Kit which can be found at http://www.pointing.com/.

The Wintab Programmer's Kit is copyright 1991-1998 by LCS/Telegraphics.



Subsections