Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtRegisterProcedures(3)    Library Functions Manual	XmtRegisterProcedures(3)

NAME
     XmtRegisterProcedures(), XmtRegisterCallbackProcedure(), XmtVaRegisterCall-
     backProcedures()  -  register procedures for use with the Xmt callback con-
     verter.

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

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

ARGUMENTS
     INPUTS

	  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  XmtVaReg-
		 isterCallbackProcedures(),  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  call-
		 back  converter.  For	XmtVaRegister CallbackProcedures(), this
		 argument may appear any number of times as part of a  NULL-ter-
		 minated 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 ar-
		 gument list.

DESCRIPTION
     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 speci-
     fies  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  speci-
     fied  in  a resource file and automatically convert them to the appropriate
     type before calling the procedure. If the procedure  being  registered  ex-
     pects  fewer  than 8 arguments, leave the unused arguments uninitialized as
     NULL.

     You may also specify some special argument types in the argument_types  ar-
     ray.  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 XmtRegisterPro-
     cedures() that you can use when registering a ``standard'' callback  proce-
     dure  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  sec-
     ond 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 regis-
     ter.

SEE ALSO
     Chapter 10, Callbacks in Resource Files, XmtRegisterCallbackConverter(),
     XmtRegisterUnixProcedures(), XmtRegisterXmtProcedures(),
     XmtRegisterXtProcedures().

Xmt				   Motif Tools		XmtRegisterProcedures(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtRegisterProcedures&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help