Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PtDestroyWidget

PtDestroyWidget

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PtDestroyWidget()

Remove a widget from the widget family hierarchy

Synopsis:

int PtDestroyWidget( PtWidget_t *widget );

Library:

ph

Description:

This function performs the following on the specified widget:

The widget's resources aren't freed until the return of PtEventHandler().


Note: You might get callbacks from the widget after PtDestroyWidget() has returned. To determine if this is happening, check the widget's Pt_DESTROYED flag. For example:
if (PtWidgetFlags(widget) & Pt_DESTROYED)
{
   return( Pt_CONTINUE );
}

Returns:

0
Success.
-1
An error occurred.

Examples:

See PtContainerBox().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtEventHandler(), PtCreateWidget(), PtRealizeWidget(), PtUnrealizeWidget(), PtWidgetFlags()

Pt_ARG_FLAGS, Pt_CB_DESTROYED, Pt_CB_IS_DESTROYED resources of PtWidget in the Widget Reference

"Widget life cycle" in the Introduction to the Photon Programmer's Guide