wolffd@0
|
1 /* $Id: gvc.h,v 1.65 2009/06/03 01:10:53 ellson Exp $ $Revision: 1.65 $ */
|
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 #ifndef GVC_H
|
wolffd@0
|
18 #define GVC_H
|
wolffd@0
|
19
|
wolffd@0
|
20 #include "types.h"
|
wolffd@0
|
21 #include "gvplugin.h"
|
wolffd@0
|
22
|
wolffd@0
|
23 #ifdef __cplusplus
|
wolffd@0
|
24 extern "C" {
|
wolffd@0
|
25 #endif
|
wolffd@0
|
26
|
wolffd@0
|
27 #ifdef GVDLL
|
wolffd@0
|
28 #define extern __declspec(dllexport)
|
wolffd@0
|
29 #else
|
wolffd@0
|
30 #define extern
|
wolffd@0
|
31 #endif
|
wolffd@0
|
32
|
wolffd@0
|
33 /*visual studio*/
|
wolffd@0
|
34 #ifdef WIN32_DLL
|
wolffd@0
|
35 #ifndef GVC_EXPORTS
|
wolffd@0
|
36 #define extern __declspec(dllimport)
|
wolffd@0
|
37 #endif
|
wolffd@0
|
38 #endif
|
wolffd@0
|
39 /*end visual studio*/
|
wolffd@0
|
40
|
wolffd@0
|
41 /* misc */
|
wolffd@0
|
42 /* FIXME - this needs eliminating or renaming */
|
wolffd@0
|
43 extern void gvToggle(int);
|
wolffd@0
|
44
|
wolffd@0
|
45 /* set up a graphviz context */
|
wolffd@0
|
46 extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading);
|
wolffd@0
|
47
|
wolffd@0
|
48 /* set up a graphviz context - and init graph - retaining old API */
|
wolffd@0
|
49 extern GVC_t *gvContext(void);
|
wolffd@0
|
50 /* set up a graphviz context - and init graph - with builtins */
|
wolffd@0
|
51 extern GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading);
|
wolffd@0
|
52
|
wolffd@0
|
53 /* get information associated with a graphviz context */
|
wolffd@0
|
54 extern char **gvcInfo(GVC_t*);
|
wolffd@0
|
55 extern char *gvcVersion(GVC_t*);
|
wolffd@0
|
56 extern char *gvcBuildDate(GVC_t*);
|
wolffd@0
|
57
|
wolffd@0
|
58 /* parse command line args - minimally argv[0] sets layout engine */
|
wolffd@0
|
59 extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
|
wolffd@0
|
60 extern graph_t *gvNextInputGraph(GVC_t *gvc);
|
wolffd@0
|
61 extern graph_t *gvPluginsGraph(GVC_t *gvc);
|
wolffd@0
|
62
|
wolffd@0
|
63 /* Compute a layout using a specified engine */
|
wolffd@0
|
64 extern int gvLayout(GVC_t *gvc, graph_t *g, const char *engine);
|
wolffd@0
|
65
|
wolffd@0
|
66 /* Compute a layout using layout engine from command line args */
|
wolffd@0
|
67 extern int gvLayoutJobs(GVC_t *gvc, graph_t *g);
|
wolffd@0
|
68
|
wolffd@0
|
69 /* Render layout into string attributes of the graph */
|
wolffd@0
|
70 extern void attach_attrs(graph_t *g);
|
wolffd@0
|
71
|
wolffd@0
|
72 /* Parse an html string */
|
wolffd@0
|
73 #ifndef WITH_CGRAPH
|
wolffd@0
|
74 extern char *agstrdup_html(char *s);
|
wolffd@0
|
75 #endif
|
wolffd@0
|
76 extern int aghtmlstr(char *s);
|
wolffd@0
|
77
|
wolffd@0
|
78 /* Render layout in a specified format to an open FILE */
|
wolffd@0
|
79 extern int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out);
|
wolffd@0
|
80
|
wolffd@0
|
81 /* Render layout in a specified format to an open FILE */
|
wolffd@0
|
82 extern int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename);
|
wolffd@0
|
83
|
wolffd@0
|
84 /* Render layout in a specified format to an external context */
|
wolffd@0
|
85 extern int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context);
|
wolffd@0
|
86
|
wolffd@0
|
87 /* Render layout in a specified format to a malloc'ed string */
|
wolffd@0
|
88 extern int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length);
|
wolffd@0
|
89
|
wolffd@0
|
90 /* Render layout according to -T and -o options found by gvParseArgs */
|
wolffd@0
|
91 extern int gvRenderJobs(GVC_t *gvc, graph_t *g);
|
wolffd@0
|
92
|
wolffd@0
|
93 /* Clean up layout data structures - layouts are not nestable (yet) */
|
wolffd@0
|
94 extern int gvFreeLayout(GVC_t *gvc, graph_t *g);
|
wolffd@0
|
95
|
wolffd@0
|
96 /* Clean up graphviz context */
|
wolffd@0
|
97 extern int gvFreeContext(GVC_t *gvc);
|
wolffd@0
|
98
|
wolffd@0
|
99 /** Add a library from your user application
|
wolffd@0
|
100 * @param gvc Graphviz context to add library to
|
wolffd@0
|
101 * @param lib library to add
|
wolffd@0
|
102 */
|
wolffd@0
|
103 extern void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib);
|
wolffd@0
|
104
|
wolffd@0
|
105 #undef extern
|
wolffd@0
|
106
|
wolffd@0
|
107 #ifdef __cplusplus
|
wolffd@0
|
108 }
|
wolffd@0
|
109 #endif
|
wolffd@0
|
110
|
wolffd@0
|
111 #endif /* GVC_H */
|