|
NAMEXmtRegisterProcedures(), XmtRegisterCallbackProcedure(), XmtVaRegisterCallbackProcedures() - register procedures for use with the Xmt callback converter.SYNOPSIS#include <Xmt/Procedures.h>
void XmtRegisterProcedures(XmtProcedureInfo *procedures, Cardinal num_procedures) void XmtRegisterCallbackProcedure(String name, XtCallbackProc proc, String type) void XmtVaRegisterCallbackProcedures(String
name, XtCallbackProc proc, String type,
typedef struct {
ARGUMENTSINPUTS
DESCRIPTIONXmtRegisterProcedures() 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.
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. SEE ALSOChapter 10, Callbacks in Resource Files, XmtRegisterCallbackConverter(), XmtRegisterUnixProcedures(), XmtRegisterXmtProcedures(), XmtRegisterXtProcedures().
Visit the GSP FreeBSD Man Page Interface. |