Graphviz 13.0.0~dev.20250402.0402
Loading...
Searching...
No Matches
gvcint.h
Go to the documentation of this file.
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/* Common header used by both clients and plugins */
12
13#pragma once
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include "cdt.h"
20#include "gvcommon.h"
21#include "gvcjob.h"
22#include "gvplugin.h"
23#include "color.h"
24#include <stdbool.h>
25
26#ifdef GVDLL
27#ifdef GVC_EXPORTS
28#define GVCINT_API __declspec(dllexport)
29#else
30#define GVCINT_API __declspec(dllimport)
31#endif
32#endif
33
34#ifndef GVCINT_API
35#define GVCINT_API /* nothing */
36#endif
37
38 /* active plugin headers */
45
51
53
59
61 gvplugin_available_t *next; /* next plugin in linked list, or NULL */
62 char *typestr; /* type string, e.g. "png" or "ps" */
63 int quality; /* Programmer assigned quality ranking within type (+ve or -ve int).
64 First implementation of type should be given "0" quality */
65 gvplugin_package_t *package; /* details of library containing plugin */
66 gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin,
67 or NULL if not yet loaded */
68 };
69
70 struct GVG_s {
71 GVC_t *gvc; /* parent gvc */
72 GVG_t *next; /* next gvg in list */
73
74 char *input_filename; /* or NULL if stdin */
75 int graph_index; /* index of graph within input_file */
77 };
78
79#define MAXNEST 4
80
81 struct GVC_s {
83
86
87 /* gvParseArgs */
88 char **input_filenames; /* null terminated array of input filenames */
89 int fidx; /* index of input_filenames to be processed next */
90
91 /* gvNextInputGraph() */
92 GVG_t *gvgs; /* linked list of graphs */
93 GVG_t *gvg; /* current graph */
94
95 /* plugins */
96#define ELEM(x) +1
97 /* APIS expands to "+1 +1 ... +1" to give the number of APIs */
98 gvplugin_available_t *apis[ APIS ]; /* array of linked-list of plugins per api */
99 gvplugin_available_t *api[ APIS ]; /* array of current plugins per api */
100#undef ELEM
101 gvplugin_package_t *packages; /* list of available packages */
102
103 /* externally provided write() displine */
104 size_t (*write_fn) (GVJ_t *job, const char *s, size_t len);
105
106 /* fonts and textlayout */
109 gvplugin_active_textlayout_t textlayout; /* always use best avail for all jobs */
110// void (*free_layout) (void *layout); /* function for freeing layouts (mostly used by pango) */
111
112/* FIXME - everything below should probably move to GVG_t */
113
114 /* gvrender_config() */
115 GVJ_t *jobs; /* linked list of jobs */
116 GVJ_t *job; /* current job */
117
118 graph_t *g; /* current graph */
119
120 /* gvrender_begin_job() */
122
123 char *graphname; /* name from graph */
124 GVJ_t *active_jobs; /* linked list of active jobs */
125
126 /* pagination */
127 char *pagedir; /* pagination order */
128 pointf margin; /* margins in graph units */
129 pointf pad; /* pad in graph units */
130 pointf pageSize; /* pageSize in graph units, not including margins */
131 point pb; /* page size - including margins (inches) */
132 boxf bb; /* graph bb in graph units, not including margins */
133 int rotation; /* rotation - 0 = portrait, 90 = landscape */
135
136 /* layers */
137 char *layerDelims; /* delimiters in layer names */
138 char *layerListDelims; /* delimiters between layer ranges */
139 char *layers; /* null delimited list of layer names */
140 char **layerIDs; /* array of layer names */
141 int numLayers; /* number of layers */
143
144 /* default font */
147
148 /* default line style */
150
151 /* render defaults set from graph */
152 gvcolor_t bgcolor; /* background color */
153
154 /* whether to mangle font names (at least in SVG), usually false */
156 };
157
160
161#ifdef _WIN32
162#define DIRSEP "\\"
163#else
164#define DIRSEP "/"
165#endif
166
167#undef GVCINT_API
168
169#ifdef __cplusplus
170}
171#endif
container data types API
static double len(glCompPoint p)
Definition glutils.c:150
#define APIS
Definition gvcext.h:26
GVCINT_API void gvFreeCloneGVC(GVC_t *)
Definition gvcontext.c:110
#define GVCINT_API
Definition gvcint.h:35
GVCINT_API GVC_t * gvCloneGVC(GVC_t *)
Definition gvcontext.c:98
struct gvplugin_active_layout_s gvplugin_active_layout_t
struct gvplugin_active_textlayout_s gvplugin_active_textlayout_t
graph or subgraph
Definition cgraph.h:424
Definition gvcint.h:81
int fidx
Definition gvcint.h:89
char * config_path
Definition gvcint.h:84
char * graphname
Definition gvcint.h:123
bool graph_sets_pageSize
Definition gvcint.h:134
char ** defaultlinestyle
Definition gvcint.h:149
GVG_t * gvgs
Definition gvcint.h:92
bool graph_sets_margin
Definition gvcint.h:134
bool config_found
Definition gvcint.h:85
GVJ_t * active_jobs
Definition gvcint.h:124
pointf pad
Definition gvcint.h:129
GVCOMMON_t common
Definition gvcint.h:82
double defaultfontsize
Definition gvcint.h:146
char * defaultfontname
Definition gvcint.h:145
GVG_t * gvg
Definition gvcint.h:93
bool graph_sets_pad
Definition gvcint.h:134
GVJ_t * jobs
Definition gvcint.h:115
char * layerListDelims
Definition gvcint.h:138
point pb
Definition gvcint.h:131
pointf pageSize
Definition gvcint.h:130
gvplugin_package_t * packages
Definition gvcint.h:101
char * layerDelims
Definition gvcint.h:137
int numLayers
Definition gvcint.h:141
char ** input_filenames
Definition gvcint.h:88
char * pagedir
Definition gvcint.h:127
gvplugin_available_t * apis[APIS]
Definition gvcint.h:98
pointf margin
Definition gvcint.h:128
gvplugin_active_textlayout_t textlayout
Definition gvcint.h:109
int rotation
Definition gvcint.h:133
gvplugin_active_layout_t layout
Definition gvcint.h:121
Dt_t * textfont_dt
Definition gvcint.h:108
gvcolor_t bgcolor
Definition gvcint.h:152
GVJ_t * job
Definition gvcint.h:116
size_t(* write_fn)(GVJ_t *job, const char *s, size_t len)
Definition gvcint.h:104
gvplugin_available_t * api[APIS]
Definition gvcint.h:99
boxf bb
Definition gvcint.h:132
graph_t * g
Definition gvcint.h:118
char * layers
Definition gvcint.h:139
char ** layerIDs
Definition gvcint.h:140
Dtdisc_t textfont_disc
Definition gvcint.h:107
int fontrenaming
Definition gvcint.h:155
int * layerlist
Definition gvcint.h:142
Definition gvcint.h:70
char * input_filename
Definition gvcint.h:74
GVG_t * next
Definition gvcint.h:72
int graph_index
Definition gvcint.h:75
GVC_t * gvc
Definition gvcint.h:71
graph_t * g
Definition gvcint.h:76
Definition geom.h:41
Definition cdt.h:100
const char * type
Definition gvcint.h:43
gvlayout_features_t * features
Definition gvcint.h:42
gvlayout_engine_t * engine
Definition gvcint.h:40
gvtextlayout_engine_t * engine
Definition gvcint.h:47
gvplugin_package_t * package
Definition gvcint.h:65
gvplugin_available_t * next
Definition gvcint.h:61
gvplugin_installed_t * typeptr
Definition gvcint.h:66
ingroup plugin_api
Definition gvplugin.h:35
gvplugin_package_t * next
Definition gvcint.h:55
Definition geom.h:27
Definition grammar.c:93