wolffd@0
|
1
|
wolffd@0
|
2 /* vim:set shiftwidth=4 ts=8: */
|
wolffd@0
|
3
|
wolffd@0
|
4 /**********************************************************
|
wolffd@0
|
5 * This software is part of the graphviz package *
|
wolffd@0
|
6 * http://www.graphviz.org/ *
|
wolffd@0
|
7 * *
|
wolffd@0
|
8 * Copyright (c) 1994-2004 AT&T Corp. *
|
wolffd@0
|
9 * and is licensed under the *
|
wolffd@0
|
10 * Common Public License, Version 1.0 *
|
wolffd@0
|
11 * by AT&T Corp. *
|
wolffd@0
|
12 * *
|
wolffd@0
|
13 * Information and Software Systems Research *
|
wolffd@0
|
14 * AT&T Research, Florham Park NJ *
|
wolffd@0
|
15 **********************************************************/
|
wolffd@0
|
16
|
wolffd@0
|
17 /* Common header used by both clients and plugins */
|
wolffd@0
|
18
|
wolffd@0
|
19 #ifndef GVCEXT_H
|
wolffd@0
|
20 #define GVCEXT_H
|
wolffd@0
|
21
|
wolffd@0
|
22 #ifdef __cplusplus
|
wolffd@0
|
23 extern "C" {
|
wolffd@0
|
24 #endif
|
wolffd@0
|
25
|
wolffd@0
|
26 /*
|
wolffd@0
|
27 * Define an apis array of name strings using an enumerated api_t as index.
|
wolffd@0
|
28 * The enumerated type is defined here. The apis array is
|
wolffd@0
|
29 * inititialized in gvplugin.c by redefining ELEM and reinvoking APIS.
|
wolffd@0
|
30 */
|
wolffd@0
|
31 #define APIS ELEM(render) ELEM(layout) ELEM(textlayout) ELEM(device) ELEM(loadimage)
|
wolffd@0
|
32
|
wolffd@0
|
33 /*
|
wolffd@0
|
34 * Define api_t using names based on the plugin names with API_ prefixed.
|
wolffd@0
|
35 */
|
wolffd@0
|
36 #define ELEM(x) API_##x,
|
wolffd@0
|
37 typedef enum { APIS _DUMMY_ELEM_=0 } api_t; /* API_render, API_layout, ... */
|
wolffd@0
|
38 /* Stupid but true: The sole purpose of "_DUMMY_ELEM_=0"
|
wolffd@0
|
39 * is to avoid a "," after the last element of the enum
|
wolffd@0
|
40 * because some compilers when using "-pedantic"
|
wolffd@0
|
41 * generate an error for about the dangling ","
|
wolffd@0
|
42 * but only if this header is used from a .cpp file!
|
wolffd@0
|
43 * Setting it to 0 makes sure that the enumeration
|
wolffd@0
|
44 * does not define an extra value. (It does however
|
wolffd@0
|
45 * define _DUMMY_ELEM_ as an enumeration symbol,
|
wolffd@0
|
46 * but its value duplicates that of the first
|
wolffd@0
|
47 * symbol in the enumeration - in this case "render".)
|
wolffd@0
|
48 */
|
wolffd@0
|
49
|
wolffd@0
|
50 /* One could wonder why trailing "," in:
|
wolffd@0
|
51 * int nums[]={1,2,3,};
|
wolffd@0
|
52 * is OK, but in:
|
wolffd@0
|
53 * typedef enum {a,b,c,} abc_t;
|
wolffd@0
|
54 * is not!!!
|
wolffd@0
|
55 */
|
wolffd@0
|
56 #undef ELEM
|
wolffd@0
|
57
|
wolffd@0
|
58 typedef struct GVJ_s GVJ_t;
|
wolffd@0
|
59 typedef struct GVC_s GVC_t;
|
wolffd@0
|
60
|
wolffd@0
|
61 typedef struct {
|
wolffd@0
|
62 const char *name;
|
wolffd@0
|
63 void* address;
|
wolffd@0
|
64 } lt_symlist_t;
|
wolffd@0
|
65
|
wolffd@0
|
66 typedef struct gvplugin_available_s gvplugin_available_t;
|
wolffd@0
|
67
|
wolffd@0
|
68 /*visual studio*/
|
wolffd@0
|
69 #ifdef WIN32_DLL
|
wolffd@0
|
70 #ifndef GVC_EXPORTS
|
wolffd@0
|
71 __declspec(dllimport) lt_symlist_t lt_preloaded_symbols[];
|
wolffd@0
|
72 #else
|
wolffd@0
|
73 __declspec(dllexport) lt_symlist_t lt_preloaded_symbols[];
|
wolffd@0
|
74 #endif
|
wolffd@0
|
75 #endif
|
wolffd@0
|
76 /*end visual studio*/
|
wolffd@0
|
77
|
wolffd@0
|
78
|
wolffd@0
|
79 #ifndef WIN32_DLL
|
wolffd@0
|
80 #if defined(GVDLL)
|
wolffd@0
|
81 __declspec(dllexport) lt_symlist_t lt_preloaded_symbols[];
|
wolffd@0
|
82 #else
|
wolffd@0
|
83 extern lt_symlist_t lt_preloaded_symbols[];
|
wolffd@0
|
84 #endif
|
wolffd@0
|
85 #endif
|
wolffd@0
|
86
|
wolffd@0
|
87
|
wolffd@0
|
88 #ifdef __cplusplus
|
wolffd@0
|
89 }
|
wolffd@0
|
90 #endif
|
wolffd@0
|
91
|
wolffd@0
|
92
|
wolffd@0
|
93
|
wolffd@0
|
94 #endif
|