Name
XtGetValues — copy resources from a widget to the argument list.
Synopsis
void XtGetValues(object, args, num_args)
Widget object;
ArgList args;
Cardinal num_args;
Arguments
objectSpecifies the object whose resource values are to be returned; may be of class Object or any subclass thereof.
argsSpecifies the argument list of name/address pairs that contain the resource names and the addresses into which the resource values are to be stored. The resource names are widget-dependent.
num_argsSpecifies the number of arguments in the argument list.
Description
XtGetValues retrieves the current values of one or more resources associated with a widget instance. The conjugate function XtSetValues sets a widget’s resource values.
The name fields in args contain the names of resources. The value fields in args contain addresses into which XtGetValues stores the corresponding resource values. XtGetValues expects the args.value fields to be pointers to locations where the actual values can be put. It is the caller’s responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.
XtGetValues starts with the resources specified for the Core widget fields and descends the subclass chain to the widget. If the widget’s parent is a subclass of constraintWidgetClass, XtGetValues then fetches the values for any Constraint resources requested. It starts with the Constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s Constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified.
If any get_values_hook methods in the widget’s class or superclass records are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by XtGetValues. Finally, XtGetValues calls the get_values_hook method in superclass-to-subclass order. If:
•The widget’s parent is a subclass of constraintWidgetClass any of the parent’s class or superclass records have declared ConstraintClassExtension records in the constraint class part extension fields with a record type of NULLQUARK the get_values_hook field in the extension record is non-NULL.
•Calling the get_values_hook methods permits a subclass and constraint parent to provide nonwidget resource data to XtGetValues.
Structures
An Arg is defined as follows in <X11/Intrinsic.h>:
typedef struct {
String name;
XtArgVal value;
} Arg, ∗ArgList;
See Also
XtSetArg(1), XtSetValues(1), XtVaGetValues(1), XtVaSetValues(1),
get_values_hook(4), initialize_hook(4).