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