1/* $Id$ $Revision$ */
2/* vim:set shiftwidth=4 ts=8: */
3
4/*************************************************************************
5 * Copyright (c) 2011 AT&T Intellectual Property
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Eclipse Public License v1.0
8 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 * Contributors: See CVS logs. Details at http://www.graphviz.org/
12 *************************************************************************/
13
14/* This is the public header for the callers of libgvc */
15
16#ifndef GVCPROC_H
17#define GVCPROC_H
18
19#define extern
20
21/* these are intended to be private entry points - see gvc.h for the public ones */
22
23/* configuration */
24
25 extern char *gvconfig_libdir(GVC_t * gvc);
26 extern void gvconfig(GVC_t * gvc, boolean rescan);
27 extern char *gvhostname(void);
28
29/* plugins */
30
31 extern boolean gvplugin_install(GVC_t * gvc, api_t api,
32 const char *typestr, int quality, gvplugin_package_t *package,
33 gvplugin_installed_t * typeptr);
34 extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, const char *type);
35 extern gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, char *path);
36 extern api_t gvplugin_api(char *str);
37 extern char * gvplugin_api_name(api_t api);
38 extern void gvplugin_write_status(GVC_t * gvc);
39 extern char *gvplugin_list(GVC_t * gvc, api_t api, const char *str);
40
41 extern Agraph_t * gvplugin_graph(GVC_t * gvc);
42
43/* job */
44
45 extern void gvjobs_output_filename(GVC_t * gvc, const char *name);
46 extern boolean gvjobs_output_langname(GVC_t * gvc, const char *name);
47 extern GVJ_t *gvjobs_first(GVC_t * gvc);
48 extern GVJ_t *gvjobs_next(GVC_t * gvc);
49 extern void gvjobs_delete(GVC_t * gvc);
50
51/* emit */
52 extern void gvemit_graph(GVC_t * gvc, graph_t * g);
53
54/* textlayout */
55
56 extern int gvtextlayout_select(GVC_t * gvc);
57 extern boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath);
58
59/* loadimage */
60 extern void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, boolean filled, const char *target);
61
62/* usershapes */
63 extern point gvusershape_size_dpi(usershape_t *us, pointf dpi);
64 extern point gvusershape_size(graph_t *g, char *name);
65 extern usershape_t *gvusershape_find(char *name);
66
67/* device */
68 extern int gvdevice_initialize(GVJ_t * job);
69 extern void gvdevice_format(GVJ_t * job);
70 extern void gvdevice_finalize(GVJ_t * job);
71
72/* render */
73
74 extern pointf gvrender_ptf(GVJ_t *job, pointf p);
75 extern pointf* gvrender_ptf_A(GVJ_t *job, pointf *af, pointf *AF, int n);
76
77 extern int gvrender_begin_job(GVJ_t * job);
78 extern void gvrender_end_job(GVJ_t * job);
79 extern int gvrender_select(GVJ_t * job, const char *lang);
80 extern int gvrender_features(GVJ_t * job);
81 extern void gvrender_begin_graph(GVJ_t * job, graph_t * g);
82 extern void gvrender_end_graph(GVJ_t * job);
83 extern void gvrender_begin_page(GVJ_t * job);
84 extern void gvrender_end_page(GVJ_t * job);
85 extern void gvrender_begin_layer(GVJ_t * job);
86 extern void gvrender_end_layer(GVJ_t * job);
87 extern void gvrender_begin_cluster(GVJ_t * job, graph_t * sg);
88 extern void gvrender_end_cluster(GVJ_t * job, graph_t *g);
89 extern void gvrender_begin_nodes(GVJ_t * job);
90 extern void gvrender_end_nodes(GVJ_t * job);
91 extern void gvrender_begin_edges(GVJ_t * job);
92 extern void gvrender_end_edges(GVJ_t * job);
93 extern void gvrender_begin_node(GVJ_t * job, node_t * n);
94 extern void gvrender_end_node(GVJ_t * job);
95 extern void gvrender_begin_edge(GVJ_t * job, edge_t * e);
96 extern void gvrender_end_edge(GVJ_t * job);
97 extern void gvrender_begin_anchor(GVJ_t * job,
98 char *href, char *tooltip, char *target, char *id);
99 extern void gvrender_end_anchor(GVJ_t * job);
100 extern void gvrender_begin_label(GVJ_t * job, label_type type);
101 extern void gvrender_end_label(GVJ_t * job);
102 extern void gvrender_textspan(GVJ_t * job, pointf p, textspan_t * span);
103 extern void gvrender_set_pencolor(GVJ_t * job, char *name);
104 extern void gvrender_set_penwidth(GVJ_t * job, double penwidth);
105 extern void gvrender_set_fillcolor(GVJ_t * job, char *name);
106 extern void gvrender_set_gradient_vals (GVJ_t * job, char *stopcolor, int angle, float frac);
107
108 extern void gvrender_set_style(GVJ_t * job, char **s);
109 extern void gvrender_ellipse(GVJ_t * job, pointf * AF, int n, int filled);
110 extern void gvrender_polygon(GVJ_t* job, pointf* af, int n, int filled);
111 extern void gvrender_box(GVJ_t * job, boxf BF, int filled);
112 extern void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n,
113 int arrow_at_start, int arrow_at_end, boolean filled);
114 extern void gvrender_polyline(GVJ_t * job, pointf * AF, int n);
115 extern void gvrender_comment(GVJ_t * job, char *str);
116 extern void gvrender_usershape(GVJ_t * job, char *name, pointf * AF, int n, boolean filled, char *imagescale, char *imagepos);
117
118/* layout */
119
120 extern int gvlayout_select(GVC_t * gvc, const char *str);
121 extern int gvFreeLayout(GVC_t * gvc, Agraph_t * g);
122 extern int gvLayoutJobs(GVC_t * gvc, Agraph_t * g);
123
124/* argvlist */
125 extern gv_argvlist_t *gvNEWargvlist(void);
126 extern void gv_argvlist_set_item(gv_argvlist_t *list, int index, char *item);
127 extern void gv_argvlist_reset(gv_argvlist_t *list);
128 extern void gv_argvlist_free(gv_argvlist_t *list);
129
130#undef extern
131
132#endif /* GVCPROC_H */
133