Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XMTREGISTERPROCEDURES (3)


XmtRegisterProcedures(), XmtRegisterCallbackProcedure(), XmtVaRegisterCallbackProcedures() - register procedures for use with the Xmt callback converter.



   #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,
{ String name, XtCallbackProc proc, String type, }

   typedef struct {
String name;
XmtProcedure function;
String argument_types[8];
/* private, internal fields omitted */    } XmtProcedureInfo;


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.

XmtRCallbackWidgetPass the widget that invoked the callback.
XmtRCallbackDataPass the call_data argument.
XmtRCallbackAppContextPass the application context of the widget.
XmtRCallbackWindowPass the window ID of the invoking widget.
XmtRCallbackDisplayPass the display pointer of the invoking widget.
XmtRCallbackUnusedPass 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().
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.