annotate toolboxes/graph_visualisation/include/graphviz/gvc.h @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 /* $Id: gvc.h,v 1.65 2009/06/03 01:10:53 ellson Exp $ $Revision: 1.65 $ */
Daniel@0 2 /* vim:set shiftwidth=4 ts=8: */
Daniel@0 3
Daniel@0 4 /**********************************************************
Daniel@0 5 * This software is part of the graphviz package *
Daniel@0 6 * http://www.graphviz.org/ *
Daniel@0 7 * *
Daniel@0 8 * Copyright (c) 1994-2004 AT&T Corp. *
Daniel@0 9 * and is licensed under the *
Daniel@0 10 * Common Public License, Version 1.0 *
Daniel@0 11 * by AT&T Corp. *
Daniel@0 12 * *
Daniel@0 13 * Information and Software Systems Research *
Daniel@0 14 * AT&T Research, Florham Park NJ *
Daniel@0 15 **********************************************************/
Daniel@0 16
Daniel@0 17 #ifndef GVC_H
Daniel@0 18 #define GVC_H
Daniel@0 19
Daniel@0 20 #include "types.h"
Daniel@0 21 #include "gvplugin.h"
Daniel@0 22
Daniel@0 23 #ifdef __cplusplus
Daniel@0 24 extern "C" {
Daniel@0 25 #endif
Daniel@0 26
Daniel@0 27 #ifdef GVDLL
Daniel@0 28 #define extern __declspec(dllexport)
Daniel@0 29 #else
Daniel@0 30 #define extern
Daniel@0 31 #endif
Daniel@0 32
Daniel@0 33 /*visual studio*/
Daniel@0 34 #ifdef WIN32_DLL
Daniel@0 35 #ifndef GVC_EXPORTS
Daniel@0 36 #define extern __declspec(dllimport)
Daniel@0 37 #endif
Daniel@0 38 #endif
Daniel@0 39 /*end visual studio*/
Daniel@0 40
Daniel@0 41 /* misc */
Daniel@0 42 /* FIXME - this needs eliminating or renaming */
Daniel@0 43 extern void gvToggle(int);
Daniel@0 44
Daniel@0 45 /* set up a graphviz context */
Daniel@0 46 extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading);
Daniel@0 47
Daniel@0 48 /* set up a graphviz context - and init graph - retaining old API */
Daniel@0 49 extern GVC_t *gvContext(void);
Daniel@0 50 /* set up a graphviz context - and init graph - with builtins */
Daniel@0 51 extern GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading);
Daniel@0 52
Daniel@0 53 /* get information associated with a graphviz context */
Daniel@0 54 extern char **gvcInfo(GVC_t*);
Daniel@0 55 extern char *gvcVersion(GVC_t*);
Daniel@0 56 extern char *gvcBuildDate(GVC_t*);
Daniel@0 57
Daniel@0 58 /* parse command line args - minimally argv[0] sets layout engine */
Daniel@0 59 extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
Daniel@0 60 extern graph_t *gvNextInputGraph(GVC_t *gvc);
Daniel@0 61 extern graph_t *gvPluginsGraph(GVC_t *gvc);
Daniel@0 62
Daniel@0 63 /* Compute a layout using a specified engine */
Daniel@0 64 extern int gvLayout(GVC_t *gvc, graph_t *g, const char *engine);
Daniel@0 65
Daniel@0 66 /* Compute a layout using layout engine from command line args */
Daniel@0 67 extern int gvLayoutJobs(GVC_t *gvc, graph_t *g);
Daniel@0 68
Daniel@0 69 /* Render layout into string attributes of the graph */
Daniel@0 70 extern void attach_attrs(graph_t *g);
Daniel@0 71
Daniel@0 72 /* Parse an html string */
Daniel@0 73 #ifndef WITH_CGRAPH
Daniel@0 74 extern char *agstrdup_html(char *s);
Daniel@0 75 #endif
Daniel@0 76 extern int aghtmlstr(char *s);
Daniel@0 77
Daniel@0 78 /* Render layout in a specified format to an open FILE */
Daniel@0 79 extern int gvRender(GVC_t *gvc, graph_t *g, const char *format, FILE *out);
Daniel@0 80
Daniel@0 81 /* Render layout in a specified format to an open FILE */
Daniel@0 82 extern int gvRenderFilename(GVC_t *gvc, graph_t *g, const char *format, const char *filename);
Daniel@0 83
Daniel@0 84 /* Render layout in a specified format to an external context */
Daniel@0 85 extern int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context);
Daniel@0 86
Daniel@0 87 /* Render layout in a specified format to a malloc'ed string */
Daniel@0 88 extern int gvRenderData(GVC_t *gvc, graph_t *g, const char *format, char **result, unsigned int *length);
Daniel@0 89
Daniel@0 90 /* Render layout according to -T and -o options found by gvParseArgs */
Daniel@0 91 extern int gvRenderJobs(GVC_t *gvc, graph_t *g);
Daniel@0 92
Daniel@0 93 /* Clean up layout data structures - layouts are not nestable (yet) */
Daniel@0 94 extern int gvFreeLayout(GVC_t *gvc, graph_t *g);
Daniel@0 95
Daniel@0 96 /* Clean up graphviz context */
Daniel@0 97 extern int gvFreeContext(GVC_t *gvc);
Daniel@0 98
Daniel@0 99 /** Add a library from your user application
Daniel@0 100 * @param gvc Graphviz context to add library to
Daniel@0 101 * @param lib library to add
Daniel@0 102 */
Daniel@0 103 extern void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib);
Daniel@0 104
Daniel@0 105 #undef extern
Daniel@0 106
Daniel@0 107 #ifdef __cplusplus
Daniel@0 108 }
Daniel@0 109 #endif
Daniel@0 110
Daniel@0 111 #endif /* GVC_H */