|procedures||An array of procedure names, pointers and argument descriptions to be registered.|
|num_procedures||The number of elements in procedures.|
|name||The name of an XtCallbackProc to be registered. For XmtVaRegisterCallbackProcedures(), this argument may appear any number of times as part of a NULL-terminated argument list.|
|proc||The XtCallbackProc to be registered for use with the Xmt callback converter. For XmtVaRegister CallbackProcedures(), this argument may appear any number of times as part of a NULL-terminated argument list.|
|type||The representation type of the client_data argument that proc expects For XmtVaRegisterCallback Procedures(), this argument may appear any number of times as part of a NULL-terminated argument list.|
XmtRegisterProcedures() is the general way to register C procedures with the Xmt String-to-Callback converter so that they can be called in resource files.
Each element of the procedures array is an XmtProcedureInfo structure that one procedure to be registered. The function field of this structure specifies the procedure to be registered. You will have to cast your procedure to the special type XmtProcedure to set this field. The name field of the structure specifies the name under which the procedure will be registered. The argument_types field of the XmtProcedureInfo structure is an array of strings that let you specify the representation type of up to 8 arguments for the procedure. The Xmt callback converter will parse arguments specified in a resource file and automatically convert them to the appropriate type before calling the procedure. If the procedure being registered expects fewer than 8 arguments, leave the unused arguments uninitialized as NULL.
You may also specify some special argument types in the argument_types array. These special representation types are listed in the table. When a registered procedure takes one of these types, the callback converter will automatically pass a value, and you will not have to specify a value in the resource file.
Type Meaning XmtRCallbackWidget Pass the widget that invoked the callback. XmtRCallbackData Pass the call_data argument. XmtRCallbackAppContext Pass the application context of the widget. XmtRCallbackWindow Pass the window ID of the invoking widget. XmtRCallbackDisplay Pass the display pointer of the invoking widget. XmtRCallbackUnused Pass NULL; good for unused arguments.
See Chapter 10, Callbacks in Resource Files for more information on using the Xmt callback converter, and on registering procedures for it.
XmtRegisterCallbackProcedure() is a simplified interface to XmtRegisterProcedures() that you can use when registering a standard callback procedure of type XtCallbackProc. It creates and registers an XmtProcedureInfo structure using the specified name and proc. It uses the argument_types field to specify that the procedure proc takes three arguments, of types XmtRCallbackWidget, type, and XmtRCallbackData. The first and last of these types specify standard callback arguments, as shown in the table. The second argument is the type that was passed to the function.
XmtVaRegisterCallbackProcedures() is like XmtRegisterCallbackProcedure(), but it takes a NULL-terminated list of (name, proc, type) triples to register.
Chapter 10, Callbacks in Resource Files, XmtRegisterCallbackConverter(), XmtRegisterUnixProcedures(), XmtRegisterXmtProcedures(), XmtRegisterXtProcedures().
|Xmt||XMTREGISTERPROCEDURES (3)||Motif Tools|