QNX Developer Support
![]() |
![]() |
![]() |
![]() |
PtSuperClassSetResources()
Set resources
Synopsis:
int PtSuperClassSetResources(
PtWidgetClassRef_t *wc_ref,
PtWidget_t *widget,
int num_args,
PtArg_t const *args )
Arguments:
- wc_ref
- The superclass whose method you want to call.
- widget
- A pointer to the widget for which to call the superclass's method.
- num_args
- The number of entries in the args array.
- args
- An array of PtArg_t structures (see the Photon Library Reference) that define the resources to set and their values.
Description:
This function sets the resources given by num_args and args in the manner defined by wc_ref. This is extremely helpful when overriding the query_f member of an overridden resource.
Returns:
The number of resources set.
Examples:
my_modify_area( PtWidget_t *widget, PtArg_t *argt )
{
MyWidget_t *mw = (MyWidget_t *)widget;
mw->area_changed = Pt_TRUE;
// Apply the resource the same way a superclass does.
PtSuperClassSetResources(
widget->class_rec->superclass->cref,
widget, 1, argt );
// Set the resource so that it's treated
// like a PtBasic class widget.
PtSuperClassSetResources( PtBasic, widget, 1, argt );
}
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PtArg_t in the Photon Library Reference
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)
