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