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