1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/***************************************************************************
*cr
*cr (C) Copyright 1995-2006 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
***************************************************************************/
/***************************************************************************
* RCS INFORMATION:
*
* $RCSfile: vmdplugin.h,v $
* $Author: johns $ $Locker: $ $State: Exp $
* $Revision: 1.33 $ $Date: 2015/10/29 05:10:54 $
*
***************************************************************************/
/** @file
* This header must be included by every VMD plugin library. It defines the
* API for every plugin so that VMD can organize the plugins it finds.
*/
/*
* Preprocessor tricks to make it easier for us to redefine the names of
* functions when building static plugins.
*/
/**
* macro defining VMDPLUGIN if it hasn't already been set to the name of
* a static plugin that is being compiled. This is the catch-all case.
*/
/** concatenation macro, joins args x and y together as a single string */
/** concatenation macro, joins args x and y together as a single string */
/*
* macros to correctly define plugin function names depending on whether
* the plugin is being compiled for static linkage or dynamic loading.
* When compiled for static linkage, each plugin needs to have unique
* function names for all of its entry points. When compiled for dynamic
* loading, the plugins must name their entry points consistently so that
* the plugin loading mechanism can find the register, register_tcl, init,
* and fini routines via dlopen() or similar operating system interfaces.
*/
/*@{*/
/** Macro names entry points correctly for static linkage or dynamic loading */
/*@}*/
/** "WIN32" is defined on both WIN32 and WIN64 platforms... */
/**
* Only define DllMain for plugins, not in VMD or in statically linked plugins
* VMDPLUGIN_EXPORTS is only defined when compiling dynamically loaded plugins
*/
BOOL APIENTRY
/* VMDPLUGIN_EXPORTS */
/* ! STATIC_PLUGIN */
/** If we're not compiling on Windows, then this macro is defined empty */
/** define plugin linkage correctly for both C and C++ based plugins */
/* __cplusplus */
/*
* Plugin API functions start here
*/
/**
* Init routine: called the first time the library is loaded by the
* application and before any other API functions are referenced.
* Return 0 on success.
*/
VMDPLUGIN_EXTERN int ;
/**
* Macro for creating a struct header used in all plugin structures.
*
* This header should be placed at the top of every plugin API definition
* so that it can be treated as a subtype of the base plugin type.
*
* abiversion: Defines the ABI for the base plugin type (not for other plugins)
* type: A string descriptor of the plugin type.
* name: A name for the plugin.
* author: A string identifier, possibly including newlines.
* Major and minor version.
* is_reentrant: Whether this library can be run concurrently with itself.
*/
/**
* Typedef for generic plugin header, individual plugins can
* make their own structures as long as the header info remains
* the same as the generic plugin header, most easily done by
* using the vmdplugin_HEAD macro.
*/
typedef struct vmdplugin_t;
/**
* Use this macro to initialize the abiversion member of each plugin
*/
/*@{*/
/** Use this macro to indicate a plugin's thread-safety at registration time */
/*@}*/
/*@{*/
/** Error return code for use in the plugin registration and init functions */
/*@}*/
/**
* Function pointer typedef for register callback functions
*/
typedef int ;
/**
* Allow the library to register plugins with the application.
* The callback should be called using the passed-in void pointer, which
* should not be interpreted in any way by the library. Each vmdplugin_t
* pointer passed to the application should point to statically-allocated
* or heap-allocated memory and should never be later modified by the plugin.
* Applications must be permitted to retain only a copy of the the plugin
* pointer, without making any deep copy of the items in the struct.
*/
VMDPLUGIN_EXTERN int ;
/**
* Allow the library to register Tcl extensions.
* This API is optional; if found by dlopen, it will be called after first
* calling init and register.
*/
VMDPLUGIN_EXTERN int ;
/**
* The Fini method is called when the application will no longer use
* any plugins in the library.
*/
VMDPLUGIN_EXTERN int ;
/* VMD_PLUGIN_H */