]> granicus.if.org Git - graphviz/commitdiff
set WITH_CGRAPH in gvc.h
authorJohn Ellson <ellson@research.att.com>
Tue, 24 Jul 2012 22:06:09 +0000 (18:06 -0400)
committerJohn Ellson <ellson@research.att.com>
Tue, 24 Jul 2012 22:06:09 +0000 (18:06 -0400)
configure.ac
lib/Makefile.am
lib/gvc/Makefile.am
lib/gvc/gvc.h.cgraph [new file with mode: 0644]
lib/gvc/gvc.h.graph [moved from lib/gvc/gvc.h with 99% similarity]

index c8cc406ffdb08b5e5a9ba528d934bc2953e839c2..86acdd2b54f2a90f98e3811a3e9aa1daf6788baa 100644 (file)
@@ -2874,6 +2874,12 @@ else
 fi
 AM_CONDITIONAL(WITH_CGRAPH, [test "x$use_cgraph" = "xYes"])
 
+if test "x$use_cgraph" = "xYes"; then
+  cp $(top_srcdir)lib/gvc/gvc.h.cgraph $(top_srcdir)lib/gvc/gvc.h
+else
+  cp $(top_srcdir)lib/gvc/gvc.h.graph $(top_srcdir)lib/gvc/gvc.h
+fi
+
 dnl -----------------------------------
 dnl ORTHO 
 
index 71d16f731439c6b9375c4842ac9a67165b87ca3c..792a1342471cf8ae78a9ab443907b6ee481243ac 100644 (file)
@@ -1,10 +1,9 @@
 # $Id$ $Revision$
 ## Process this file with automake to produce Makefile.in
 
-
 SUBDIRS = cdt graph cgraph pathplan sfio vmalloc ast \
        vpsc rbtree ortho sparse patchwork expr common \
        pack xdot label gvc ingraphs topfish glcomp \
        circogen dotgen dotgen2 fdpgen neatogen twopigen sfdpgen osage gvpr
 
-EXTRA_DIST = Makefile.old gvc.vcproj gvc.def
+EXTRA_DIST = Makefile.old gvc.vcproj gvc.def 
index d5e3404e674b2b5a4d3ed9c05834222d20d0abdb..1c69ac7875455443e345c6a4ed05db0676df090e 100644 (file)
@@ -72,6 +72,6 @@ libgvc_la_DEPENDENCIES = $(libgvc_C_la_DEPENDENCIES)
 gvc.3.pdf: $(srcdir)/gvc.3
        - @GROFF@ -Tps -man $(srcdir)/gvc.3 | @PS2PDF@ - - > gvc.3.pdf
 
-EXTRA_DIST = $(man_MANS) $(pdf_DATA) Makefile.old regex_win32.h regex_win32.c gvc.vcproj
+EXTRA_DIST = $(man_MANS) $(pdf_DATA) Makefile.old regex_win32.h regex_win32.c gvc.vcproj gvc.h.cgraph gvc.h.graph
 
 DISTCLEANFILES = $(pdf_DATA)
diff --git a/lib/gvc/gvc.h.cgraph b/lib/gvc/gvc.h.cgraph
new file mode 100644 (file)
index 0000000..4a3d162
--- /dev/null
@@ -0,0 +1,128 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/*************************************************************************
+ * Copyright (c) 2011 AT&T Intellectual Property 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: See CVS logs. Details at http://www.graphviz.org/
+ *************************************************************************/
+
+#ifndef                        GVC_H
+#define                        GVC_H
+
+#define WITH_CGRAPH 1
+
+#include "types.h"
+#include "gvplugin.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef GVDLL
+#define extern __declspec(dllexport)
+#else
+#define extern
+#endif
+
+/*visual studio*/
+#ifdef WIN32_DLL
+#ifndef GVC_EXPORTS
+#define extern __declspec(dllimport)
+#endif
+#endif
+/*end visual studio*/
+       
+/* misc */
+/* FIXME - this needs eliminating or renaming */
+extern void gvToggle(int);
+
+/* set up a graphviz context */
+extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading);
+
+/*  set up a graphviz context - and init graph - retaining old API */
+extern GVC_t *gvContext(void);
+/*  set up a graphviz context - and init graph - with builtins */
+extern GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading);
+
+/* get information associated with a graphviz context */
+extern char **gvcInfo(GVC_t*);
+extern char *gvcVersion(GVC_t*);
+extern char *gvcBuildDate(GVC_t*);
+
+/* parse command line args - minimally argv[0] sets layout engine */
+extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
+extern graph_t *gvNextInputGraph(GVC_t *gvc);
+extern graph_t *gvPluginsGraph(GVC_t *gvc);
+
+/* Compute a layout using a specified engine */
+extern int gvLayout(GVC_t *gvc, graph_t *g, const char *engine);
+
+/* Compute a layout using layout engine from command line args */
+extern int gvLayoutJobs(GVC_t *gvc, graph_t *g);
+
+/* Render layout into string attributes of the graph */
+extern void attach_attrs(graph_t *g);
+
+/* Parse an html string */
+#ifndef WITH_CGRAPH
+extern char *agstrdup_html(char *s);
+extern int aghtmlstr(char *s);
+#endif
+
+/* Render layout in a specified format to an open FILE */
+extern int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out);
+
+/* Render layout in a specified format to an open FILE */
+extern int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename);
+
+/* Render layout in a specified format to an external context */
+extern int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context);
+
+/* Render layout in a specified format to a malloc'ed string */
+extern int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length);
+
+/* Render layout according to -T and -o options found by gvParseArgs */
+extern int gvRenderJobs(GVC_t *gvc, graph_t *g);
+
+/* Clean up layout data structures - layouts are not nestable (yet) */
+extern int gvFreeLayout(GVC_t *gvc, graph_t *g);
+
+/* Clean up graphviz context */
+extern void gvFinalize(GVC_t *gvc);
+extern int gvFreeContext(GVC_t *gvc);
+
+/* Return list of plugins of type kind.
+ * kind would normally be "render" "layout" "textlayout" "device" "loadimage"
+ * The size of the list is stored in sz.
+ * The caller is responsible for freeing the storage. This involves
+ * freeing each item, then the list.
+ * Returns NULL on error, or if there are no plugins.
+ * In the former case, sz is unchanged; in the latter, sz = 0.
+ *
+ * At present, the str argument is unused, but may be used to modify
+ * the search as in gvplugin_list above.
+ */
+extern char** gvPluginList (GVC_t *gvc, char* kind, int* sz, char*);
+
+/** Add a library from your user application
+ * @param gvc Graphviz context to add library to
+ * @param lib library to add
+ */
+
+
+
+
+extern void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib);
+
+#undef extern
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif                 /* GVC_H */
similarity index 99%
rename from lib/gvc/gvc.h
rename to lib/gvc/gvc.h.graph
index d3b0edc896839b3c766a6d28e6e602b13468559d..f8c0a74cf582e1446f583ac7b1a7eec0cec3e1ac 100644 (file)
@@ -14,6 +14,8 @@
 #ifndef                        GVC_H
 #define                        GVC_H
 
+#undef WITH_CGRAPH
+
 #include "types.h"
 #include "gvplugin.h"