From: John Ellson Date: Tue, 24 Jul 2012 22:06:09 +0000 (-0400) Subject: set WITH_CGRAPH in gvc.h X-Git-Tag: LAST_LIBGRAPH~32^2~369 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dfd8af6489b6dbf4658690509767cc43b7c7a72f;p=graphviz set WITH_CGRAPH in gvc.h --- diff --git a/configure.ac b/configure.ac index c8cc406ff..86acdd2b5 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/lib/Makefile.am b/lib/Makefile.am index 71d16f731..792a13424 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -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 diff --git a/lib/gvc/Makefile.am b/lib/gvc/Makefile.am index d5e3404e6..1c69ac787 100644 --- a/lib/gvc/Makefile.am +++ b/lib/gvc/Makefile.am @@ -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 index 000000000..4a3d162c7 --- /dev/null +++ b/lib/gvc/gvc.h.cgraph @@ -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 */ diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h.graph similarity index 99% rename from lib/gvc/gvc.h rename to lib/gvc/gvc.h.graph index d3b0edc89..f8c0a74cf 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h.graph @@ -14,6 +14,8 @@ #ifndef GVC_H #define GVC_H +#undef WITH_CGRAPH + #include "types.h" #include "gvplugin.h"