Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtDamageWidget()

Mark a widget as damaged so it will be redrawn

Synopsis:

int PtDamageWidget( PtWidget_t *widget );

Library:

ph

Description:

This function adds the specified widget's extent to the damage list of the widget's first window parent. This effectively marks the widget as being damaged so that it will be redrawn.

The widget library takes care of updating widgets whenever resources are modified; you don't normally need to use this function unless you're using a PtRaw widget and want it to redraw and repair itself.

If you want the widget to be redrawn immediately, call PtFlush() after calling PtDamageWidget().

Returns:

0
Successful completion.
-1
An error occurred.

Examples:

Set some global variables used in a PtRaw widget's draw function and then damage the widget:

grid_color  = Pg_BLACK;
line_color1 = Pg_BLUE;
line_color2 = Pg_RED;

PtDamageWidget( my_raw_widget );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtDamageExtent(), PtFlush()