wolffd@0: /* $Id: gvc.h,v 1.65 2009/06/03 01:10:53 ellson Exp $ $Revision: 1.65 $ */ wolffd@0: /* vim:set shiftwidth=4 ts=8: */ wolffd@0: wolffd@0: /********************************************************** wolffd@0: * This software is part of the graphviz package * wolffd@0: * http://www.graphviz.org/ * wolffd@0: * * wolffd@0: * Copyright (c) 1994-2004 AT&T Corp. * wolffd@0: * and is licensed under the * wolffd@0: * Common Public License, Version 1.0 * wolffd@0: * by AT&T Corp. * wolffd@0: * * wolffd@0: * Information and Software Systems Research * wolffd@0: * AT&T Research, Florham Park NJ * wolffd@0: **********************************************************/ wolffd@0: wolffd@0: #ifndef GVC_H wolffd@0: #define GVC_H wolffd@0: wolffd@0: #include "types.h" wolffd@0: #include "gvplugin.h" wolffd@0: wolffd@0: #ifdef __cplusplus wolffd@0: extern "C" { wolffd@0: #endif wolffd@0: wolffd@0: #ifdef GVDLL wolffd@0: #define extern __declspec(dllexport) wolffd@0: #else wolffd@0: #define extern wolffd@0: #endif wolffd@0: wolffd@0: /*visual studio*/ wolffd@0: #ifdef WIN32_DLL wolffd@0: #ifndef GVC_EXPORTS wolffd@0: #define extern __declspec(dllimport) wolffd@0: #endif wolffd@0: #endif wolffd@0: /*end visual studio*/ wolffd@0: wolffd@0: /* misc */ wolffd@0: /* FIXME - this needs eliminating or renaming */ wolffd@0: extern void gvToggle(int); wolffd@0: wolffd@0: /* set up a graphviz context */ wolffd@0: extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading); wolffd@0: wolffd@0: /* set up a graphviz context - and init graph - retaining old API */ wolffd@0: extern GVC_t *gvContext(void); wolffd@0: /* set up a graphviz context - and init graph - with builtins */ wolffd@0: extern GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading); wolffd@0: wolffd@0: /* get information associated with a graphviz context */ wolffd@0: extern char **gvcInfo(GVC_t*); wolffd@0: extern char *gvcVersion(GVC_t*); wolffd@0: extern char *gvcBuildDate(GVC_t*); wolffd@0: wolffd@0: /* parse command line args - minimally argv[0] sets layout engine */ wolffd@0: extern int gvParseArgs(GVC_t *gvc, int argc, char **argv); wolffd@0: extern graph_t *gvNextInputGraph(GVC_t *gvc); wolffd@0: extern graph_t *gvPluginsGraph(GVC_t *gvc); wolffd@0: wolffd@0: /* Compute a layout using a specified engine */ wolffd@0: extern int gvLayout(GVC_t *gvc, graph_t *g, const char *engine); wolffd@0: wolffd@0: /* Compute a layout using layout engine from command line args */ wolffd@0: extern int gvLayoutJobs(GVC_t *gvc, graph_t *g); wolffd@0: wolffd@0: /* Render layout into string attributes of the graph */ wolffd@0: extern void attach_attrs(graph_t *g); wolffd@0: wolffd@0: /* Parse an html string */ wolffd@0: #ifndef WITH_CGRAPH wolffd@0: extern char *agstrdup_html(char *s); wolffd@0: #endif wolffd@0: extern int aghtmlstr(char *s); wolffd@0: wolffd@0: /* Render layout in a specified format to an open FILE */ wolffd@0: extern int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out); wolffd@0: wolffd@0: /* Render layout in a specified format to an open FILE */ wolffd@0: extern int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename); wolffd@0: wolffd@0: /* Render layout in a specified format to an external context */ wolffd@0: extern int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context); wolffd@0: wolffd@0: /* Render layout in a specified format to a malloc'ed string */ wolffd@0: extern int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length); wolffd@0: wolffd@0: /* Render layout according to -T and -o options found by gvParseArgs */ wolffd@0: extern int gvRenderJobs(GVC_t *gvc, graph_t *g); wolffd@0: wolffd@0: /* Clean up layout data structures - layouts are not nestable (yet) */ wolffd@0: extern int gvFreeLayout(GVC_t *gvc, graph_t *g); wolffd@0: wolffd@0: /* Clean up graphviz context */ wolffd@0: extern int gvFreeContext(GVC_t *gvc); wolffd@0: wolffd@0: /** Add a library from your user application wolffd@0: * @param gvc Graphviz context to add library to wolffd@0: * @param lib library to add wolffd@0: */ wolffd@0: extern void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib); wolffd@0: wolffd@0: #undef extern wolffd@0: wolffd@0: #ifdef __cplusplus wolffd@0: } wolffd@0: #endif wolffd@0: wolffd@0: #endif /* GVC_H */