![]() |
![]() |
![]() |
![]() |
Retrieve one resource value for a widget
#define PtGetResource( widget, type, value, len ) ...
ph
This macro sets a pointer to a resource value within the specified widget. The arguments are:
PtGetResource() doesn't support the nonpointer method of getting resources. For information on getting and setting resources, see the Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.
![]() |
Because PtGetResource() returns a pointer directly into the
internals of the widget, don't modify the resource value
directly. If you wish to retrieve the value of a given resource and
then modify that value:
|
Determine whether or not a widget is highlighted:
unsigned long *flags; PtWidget_t *widget; PtGetResource( widget, Pt_ARG_FLAGS, &flags, 0 ); printf( "Highlighted: %s\n", *flags & Pt_HIGHLIGHTED ? "Yes":"No" );
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtArg_t, Pt_ARG(), PtGetResources(), PtSetArg(), PtSetResource(), PtSetResources()
Manipulating Resources in Application Code chapter of the Photon Programmer's Guide.
![]() |
![]() |
![]() |
![]() |