Input: 4.1 Pen Input and Ink: Ink Data Structures

Up: GEOS SDK TechDocs | Up | Prev: 4 Pen Input and Ink | Next: 4.2 Ink Input Flow

Ink input is stored in data blocks. The Input Manager stores up Ink events into a data block and then transfers the block to the proper window or application with MSG_META_NOTIFY_WITH_DATA_BLOCK . (This is a general change notification message.) The type of the data block passed is NT_INK, the manufacturer ID is MANUFACTURER_ID_GEOWORKS.

The data block is headed by an InkHeader structure (defined below). The header is followed by a list of points, all in screen coordinates (not points as with normal graphics commands). The block will contain as many points as are registered during the Ink input sequence.

The InkHeader structure has the following format:

typedef struct {
    word       IH_count;
    Rectangle  IH_bounds;
    optr       IH_destination;
    dword      IH_reserved;
    Point      IH_data;
} InkHeader;

The fields of the structure are listed below with the information they contain.

IH_count
The number of points stored in the data block.
IH_bounds
The bounds of the Ink input on the screen (in document coordinates).
IH_destination
The destination of the Ink input. An object can use this field to see if the Ink was sent directly to it or if it received the Ink simply due to an overlap.
IH_reserved
Internal data; do not use.
IH_data
Actually a label indicating the beginning of the list of points. Following this label will be a number of Point structures, each one detailing a single Ink point.

Up: GEOS SDK TechDocs | Up | Prev: 4 Pen Input and Ink | Next: 4.2 Ink Input Flow