~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qmon/Xmt310/Xmt/Procedures.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Motif Tools Library, Version 3.1
 
3
 * $Id$
 
4
 * 
 
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.
 
10
 *
 
11
 * $Log$
 
12
 * Revision 1.1.1.1  2001/07/18 11:06:03  root
 
13
 * Initial checkin.
 
14
 *
 
15
 * Revision 1.2  2001/06/12 16:25:28  andre
 
16
 * *** empty log message ***
 
17
 *
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef _XmtProcedures_h
 
22
#define _XmtProcedures_h
 
23
 
 
24
/*
 
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.
 
29
 */
 
30
#define XmtMAX_PROCEDURE_ARGS 8
 
31
 
 
32
typedef XtPointer (*XmtProcedure) (
 
33
#if NeedFunctionPrototypes
 
34
                                   XtPointer, XtPointer, XtPointer,
 
35
                                   XtPointer, XtPointer, XtPointer,
 
36
                                   XtPointer, XtPointer
 
37
#endif
 
38
                                   );
 
39
/*
 
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.
 
51
 *
 
52
 * expected_args is a private field; leave it uninitialized.
 
53
 *
 
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.
 
57
 */
 
58
typedef struct {
 
59
    /* Only the first 2 are always required */
 
60
    StringConst name;
 
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 */
 
66
    int expected_args;
 
67
} XmtProcedureInfo;
 
68
 
 
69
/*
 
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
 
73
 */
 
74
#define XmtRCallbackWidget "XmtCallbackWidget"
 
75
#define XmtRCallbackData "XmtCallbackData"
 
76
#define XmtRCallbackAppContext "XmtCallbackAppContext"
 
77
#define XmtRCallbackWindow "XmtCallbackWindow"
 
78
#define XmtRCallbackDisplay "XmtCallbackDisplay"
 
79
#define XmtRCallbackUnused "XmtCallbackUnused"
 
80
 
 
81
 
 
82
_XFUNCPROTOBEGIN    
 
83
#if NeedFunctionPrototypes
 
84
extern void XmtRegisterProcedures(XmtProcedureInfo *, Cardinal);
 
85
extern void XmtRegisterCallbackProcedure(StringConst, XtCallbackProc,
 
86
                                         StringConst);
 
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);
 
92
#else
 
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();
 
100
#endif
 
101
 
 
102
#if NeedVarargsPrototypes
 
103
extern void XmtVaRegisterCallbackProcedures(StringConst,XtCallbackProc,
 
104
                                            StringConst,...);
 
105
#else
 
106
extern void XmtVaRegisterCallbackProcedures();
 
107
#endif
 
108
_XFUNCPROTOEND
 
109
 
 
110
#endif /* _XmtProcedures_h */