OEMPENINFO

  1. 0 2.0

Structure containing original equipment manufacturer (OEM) hardware information for the pen or tablet.

typedef struct {

UINT wPdt;

UINT wValueMax;

UINT wDistinct;

} OEMPENINFO;

Members

wPdt

A combination of PDT_ values.

wValueMax

The largest value returned by the device.

wDistinct

The number of distinct readings possible.

Comments

The OEMPENINFO structure contains a description of the additional OEM information that the hardware can generate. It is a component of the PENINFO structure.

Besides capturing the x- and y- coordinates of the pen movement, a pen device has the option of providing a number of other types of input data, such as pen pressure, height of the pen tip above the tablet surface, angle of the pen, and so on. A pen driver can capture up to MAXOEMDATAWORDS types of data, where MAXOEMDATAWORDS is defined as six. An application can access the OEM data through the GetPenInput function. A recognizer can receive OEM data from an application through the AddPenInputHRC function. It is the up to the application whether to send this data or not.

Each pen event generates a packet of information from the pen driver that contains the current pen position and, optionally, other types of OEM information. The cbOemData member of the PENINFO structure specifies the width of the optional OEM data in bytes. Each type of data is one word wide. The type of data in the nth word of the OEM data packet is given by the nth element of the rgoempeninfo member (an array of OEMPENINFO structures) in the PENINFO structure.

For the wPdt member, PDT_NULL indicates no data. Values greater than PDT_OEMSPECIFIC are reserved for private use by drivers for data types not currently defined as standard. The wValueMax member contains the largest variable size the device can return for that data type. The wDistinct member is the number of distinct readings the device can take between 0 and wValueMax.

For a list of values for the wPdt member, see the entry for PDT_ values in Chapter 13, "Pen Application Programming Interface Constants."

Example

As an example of how to use OEMPENINFO, consider a device that can sense both the height above the tablet surface and the Z-angle of the pen. Assume the device can sense 256 levels of height in a range from 0 to 10 centimeters and has a resolution of 1 degree on the angle of the pen. The two additional words of OEM information occupy 4 bytes, so the cbOemData and rgoempeninfo members of PENINFO look like this:

peninfo.cbOemData = 4

peninfo.rgoempeninfo[MAXOEMDATAWORDS] = {

{PDT_HEIGHT, 1000, 256},

{PDT_ANGLEZ, 1800, 180},

{PDT NULL, 0, 0},

{PDT_NULL, 0, 0},

{PDT_NULL, 0, 0},

{PDT_NULL, 0, 0} };

This optional information is saved by the pen driver in the same manner as the x- and y- coordinate data. There must be a one-to-one correspondence between the OEM event data and the coordinate data.

Figure 11.5 shows the pen in a position where both the Xy-angle and Z-angle are approximately 45 degrees.

See Also

PENINFO

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database