2
* Motif Tools Library, Version 3.1
5
* Written by David Flanagan.
6
* Copyright (c) 1992-2001 by David Flanagan.
7
* All Rights Reserved. See the file COPYRIGHT for details.
8
* This is open source software. See the file LICENSE for details.
9
* There is no warranty for this software. See NO_WARRANTY for details.
12
* Revision 1.1.1.1 2001/07/18 11:06:03 root
15
* Revision 1.2 2001/06/12 16:25:28 andre
16
* *** empty log message ***
21
#ifndef _XmtProcedures_h
22
#define _XmtProcedures_h
25
* This is maximum number of arguments that an Xmt callback procedure
26
* can take. If you change it here, you've also got to change the code
27
* that actually passes the arguments and calls the functions, and
28
* also change the definition of an XmtProcedure below.
30
#define XmtMAX_PROCEDURE_ARGS 8
32
typedef XtPointer (*XmtProcedure) (
33
#if NeedFunctionPrototypes
34
XtPointer, XtPointer, XtPointer,
35
XtPointer, XtPointer, XtPointer,
40
* Each callback has a name and procedure pointer, of course.
41
* Each procedure will be passed 8 (this number is arbitrary) arguments.
42
* The argument_types array specifies the types of each of these arguments.
43
* Specify the type of each argument that the procedure expects, and
44
* set the remaining fields to NULL. Use the special values
45
* XmtRCallbackWidget and XmtRCallbackData to specify that the widget
46
* or call_data values are expected in a particular position.
47
* Also, use XmtRCallbackAppContext, XmtRCallbackWindow, XmtCallbackDisplay,
48
* to pass the app context, Window, and Display of the callback widget.
49
* Also, use XmtRCallbackUnused if the procedure has an unused argument--
50
* Xmt will always pass NULL for that arg.
52
* expected_args is a private field; leave it uninitialized.
54
* Procedures that return values should specify the type of the return
55
* value in return_type, or NULL if they don't return anything.
56
* return_type is currently unimplemented, so always specify NULL.
59
/* Only the first 2 are always required */
61
XmtProcedure function;
62
/* The expected arg. types and return value of the function */
63
StringConst argument_types[XmtMAX_PROCEDURE_ARGS];
64
StringConst return_type;
65
/* private state, not initialized */
70
* Special resource types that tell the callback converter to figure
71
* out the procedure argument from information it already has, not
72
* from a passed argument
74
#define XmtRCallbackWidget "XmtCallbackWidget"
75
#define XmtRCallbackData "XmtCallbackData"
76
#define XmtRCallbackAppContext "XmtCallbackAppContext"
77
#define XmtRCallbackWindow "XmtCallbackWindow"
78
#define XmtRCallbackDisplay "XmtCallbackDisplay"
79
#define XmtRCallbackUnused "XmtCallbackUnused"
83
#if NeedFunctionPrototypes
84
extern void XmtRegisterProcedures(XmtProcedureInfo *, Cardinal);
85
extern void XmtRegisterCallbackProcedure(StringConst, XtCallbackProc,
87
extern XmtProcedureInfo *XmtLookupProcedure(StringConst);
88
extern Boolean XmtCallbackCheckList(XtCallbackList, XmtProcedure);
89
extern void XmtRegisterXtProcedures(void);
90
extern void XmtRegisterUnixProcedures(void);
91
extern void XmtRegisterXmtProcedures(void);
93
extern void XmtRegisterProcedures();
94
extern void XmtRegisterCallbackProcedure();
95
extern XmtProcedureInfo *XmtLookupProcedure();
96
extern Boolean XmtCallbackCheckList();
97
extern void XmtRegisterXtProcedures();
98
extern void XmtRegisterUnixProcedures();
99
extern void XmtRegisterXmtProcedures();
102
#if NeedVarargsPrototypes
103
extern void XmtVaRegisterCallbackProcedures(StringConst,XtCallbackProc,
106
extern void XmtVaRegisterCallbackProcedures();
110
#endif /* _XmtProcedures_h */