[Previous] [Contents] [Index] [Next]

PtSetStruct()

Set the specified resource

Synopsis:

int PtSetStruct( char *base, 
                 PtResourceRec_t const *mod, 
                 PtArg_t const *arg );

Description:

This function sets the resource specified by arg on the widget at address base in the manner described by mod. The arg argument indicates which resource to modify as well as the value to modify that resource with. The mod argument is a resource record that describes the type of resource being modified.

Unlike PtSetValue(), PtSetStruct() doesn't examine the mod_f member of mod (e.g. for a Pt_CHANGE_RESIZE flag). It sets the appropriate structure members based on mod->value and mod->len.

If you want to do the extra widget processing as well as set the appropriate structure members, use PtSetValue(). For a cleaner solution, consider using PtSuperClassSetResources().

Returns:

0
No change.
1
A change was made.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtGetStruct(), PtSetValue(), PtSuperClassGetResources(), PtSuperClassSetResources()


[Previous] [Contents] [Index] [Next]