PtAddWidgetData()

Add data to the widget data chain

Synopsis:

int PtAddWidgetData( PtWidget_t *widget, 
                     PtWidgetClassRef_t *type, 
                     long subtype, 
                     void *data );

Arguments:

widget
A pointer to the widget whose chain the data should be added to.
type
The class of the widget adding the data.
subtype
A subtype that's used to discriminate between multiple blocks of data added by the same widget class. The subtype shouldn't be -1, as this value has special meaning when searching for a specific block within the widget data chain.
data
A pointer to the data to be added to the widget data chain.

Description:

This function adds a piece of data to the widget data chain. The data provided must be in a block of memory allocated by malloc() (see the QNX Neutrino Library Reference).

You can retrieve this data by calling PtFindWidgetData() or PtFindNextWidgetData().

Returns:

0 on success; -1 if an error occurred (e.g. out of memory).

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtFindWidgetData(), PtFindNextWidgetData(), PtRemoveWidgetData()