Specifications

Athena Widget Set libXaw 1.0.7
The arguments and values that are passed will depend on the widget being modified. Some wid-
gets may not allowcertain resources to be modified after the widget instance has been created or
realized. No notification is givenifany part of a XtSetValues request is ignored.
Forfurther information about these functions, see the XToolkit Intrinsics — C Language Inter-
face.
Note
The argument list entry for XtGetValues specifies the address to which the caller
wants the value copied. The argument list entry for XtSetValues,howev er, contains
the newvalue itself, if the size of value is less than sizeof(XtArgVal) (architecture
dependent, but at least sizeof(long)); otherwise, it is a pointer to the value. String
resources are always passed as pointers, regardless of the length of the string.
2.9. Using the Client Callback Interface
Widgets can communicate changes in their state to their clients by means of a callback facility.
The format for a client’scallback handler is:
void CallbackProc(w, client_data, call_data)
Widget w;
XtPointer client_data;
XtPointer call_data;
w Specifies widget for which the callback is registered.
client_data Specifies arbitrary client-supplied data that the widget should pass back to the
client when the widget executes the client’scallback procedure. This is a way for
the client registering the callback to also register client-specific data: a pointer to
additional information about the widget, a reason for invoking the callback, and
so on. If no additional information is necessary,NULL may be passed as this
argument. This field is also frequently known as the closure.
call_data Specifies anycallback-specific data the widget wants to pass to the client. For
example, when Scrollbar executes its jumpProc callback list, it passes the cur-
rent position of the thumb in call_data.
Callbacks can be registered either by creating an argument containing the callback list described
beloworbyusing the special convenience routines XtAddCallback and XtAddCallbacks.
When the widget is created, a pointer to a list of callback procedure and data pairs can be passed
in the argument list to XtCreateWidget.The list is of type XtCallbackList:
typedef struct {
XtCallbackProc callback;
XtPointer closure;
}XtCallbackRec, *XtCallbackList;
The callback list must be allocated and initialized before calling XtCreateWidget.The end of
the list is identified by an entry containing NULL in callback and closure. Once the widget is cre-
ated, the client can change or de-allocate this list; the widget itself makes no further reference to
it. The closure field contains the client_data passed to the callback when the callback list is
executed.
The second method for registering callbacks is to use XtAddCallback after the widget has been
created.
12