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
16
extern
"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 */
39
typedef
struct
gvplugin_active_layout_s
{
40
gvlayout_engine_t
*
engine
;
41
int
id
;
42
gvlayout_features_t
*
features
;
43
const
char
*
type
;
44
}
gvplugin_active_layout_t
;
45
46
typedef
struct
gvplugin_active_textlayout_s
{
47
gvtextlayout_engine_t
*
engine
;
48
int
id
;
49
char
*
type
;
50
}
gvplugin_active_textlayout_t
;
51
52
typedef
struct
gvplugin_package_s
gvplugin_package_t
;
53
54
struct
gvplugin_package_s
{
55
gvplugin_package_t
*
next
;
56
char
*
path
;
57
char
*
name
;
58
};
59
60
struct
gvplugin_available_s
{
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 */
76
graph_t
*
g
;
77
};
78
79
#define MAXNEST 4
80
81
struct
GVC_s
{
82
GVCOMMON_t
common
;
83
84
char
*
config_path
;
85
bool
config_found
;
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 */
107
Dtdisc_t
textfont_disc
;
108
Dt_t
*
textfont_dt
;
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() */
121
gvplugin_active_layout_t
layout
;
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 */
134
bool
graph_sets_pad
,
graph_sets_margin
,
graph_sets_pageSize
;
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 */
142
int
*
layerlist
;
143
144
/* default font */
145
char
*
defaultfontname
;
146
double
defaultfontsize
;
147
148
/* default line style */
149
char
**
defaultlinestyle
;
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 */
155
int
fontrenaming
;
156
};
157
158
GVCINT_API
GVC_t
*
gvCloneGVC
(
GVC_t
*);
159
GVCINT_API
void
gvFreeCloneGVC
(
GVC_t
*);
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
cdt.h
container data types API
color.h
len
static double len(glCompPoint p)
Definition
glutils.c:150
APIS
#define APIS
Definition
gvcext.h:26
gvFreeCloneGVC
GVCINT_API void gvFreeCloneGVC(GVC_t *)
Definition
gvcontext.c:110
GVCINT_API
#define GVCINT_API
Definition
gvcint.h:35
gvCloneGVC
GVCINT_API GVC_t * gvCloneGVC(GVC_t *)
Definition
gvcontext.c:98
gvplugin_active_layout_t
struct gvplugin_active_layout_s gvplugin_active_layout_t
gvplugin_active_textlayout_t
struct gvplugin_active_textlayout_s gvplugin_active_textlayout_t
gvcjob.h
gvcommon.h
gvplugin.h
Agraph_s
graph or subgraph
Definition
cgraph.h:424
GVCOMMON_s
Definition
gvcommon.h:19
GVC_s
Definition
gvcint.h:81
GVC_s::fidx
int fidx
Definition
gvcint.h:89
GVC_s::config_path
char * config_path
Definition
gvcint.h:84
GVC_s::graphname
char * graphname
Definition
gvcint.h:123
GVC_s::graph_sets_pageSize
bool graph_sets_pageSize
Definition
gvcint.h:134
GVC_s::defaultlinestyle
char ** defaultlinestyle
Definition
gvcint.h:149
GVC_s::gvgs
GVG_t * gvgs
Definition
gvcint.h:92
GVC_s::graph_sets_margin
bool graph_sets_margin
Definition
gvcint.h:134
GVC_s::config_found
bool config_found
Definition
gvcint.h:85
GVC_s::active_jobs
GVJ_t * active_jobs
Definition
gvcint.h:124
GVC_s::pad
pointf pad
Definition
gvcint.h:129
GVC_s::common
GVCOMMON_t common
Definition
gvcint.h:82
GVC_s::defaultfontsize
double defaultfontsize
Definition
gvcint.h:146
GVC_s::defaultfontname
char * defaultfontname
Definition
gvcint.h:145
GVC_s::gvg
GVG_t * gvg
Definition
gvcint.h:93
GVC_s::graph_sets_pad
bool graph_sets_pad
Definition
gvcint.h:134
GVC_s::jobs
GVJ_t * jobs
Definition
gvcint.h:115
GVC_s::layerListDelims
char * layerListDelims
Definition
gvcint.h:138
GVC_s::pb
point pb
Definition
gvcint.h:131
GVC_s::pageSize
pointf pageSize
Definition
gvcint.h:130
GVC_s::packages
gvplugin_package_t * packages
Definition
gvcint.h:101
GVC_s::layerDelims
char * layerDelims
Definition
gvcint.h:137
GVC_s::numLayers
int numLayers
Definition
gvcint.h:141
GVC_s::input_filenames
char ** input_filenames
Definition
gvcint.h:88
GVC_s::pagedir
char * pagedir
Definition
gvcint.h:127
GVC_s::apis
gvplugin_available_t * apis[APIS]
Definition
gvcint.h:98
GVC_s::margin
pointf margin
Definition
gvcint.h:128
GVC_s::textlayout
gvplugin_active_textlayout_t textlayout
Definition
gvcint.h:109
GVC_s::rotation
int rotation
Definition
gvcint.h:133
GVC_s::layout
gvplugin_active_layout_t layout
Definition
gvcint.h:121
GVC_s::textfont_dt
Dt_t * textfont_dt
Definition
gvcint.h:108
GVC_s::bgcolor
gvcolor_t bgcolor
Definition
gvcint.h:152
GVC_s::job
GVJ_t * job
Definition
gvcint.h:116
GVC_s::write_fn
size_t(* write_fn)(GVJ_t *job, const char *s, size_t len)
Definition
gvcint.h:104
GVC_s::api
gvplugin_available_t * api[APIS]
Definition
gvcint.h:99
GVC_s::bb
boxf bb
Definition
gvcint.h:132
GVC_s::g
graph_t * g
Definition
gvcint.h:118
GVC_s::layers
char * layers
Definition
gvcint.h:139
GVC_s::layerIDs
char ** layerIDs
Definition
gvcint.h:140
GVC_s::textfont_disc
Dtdisc_t textfont_disc
Definition
gvcint.h:107
GVC_s::fontrenaming
int fontrenaming
Definition
gvcint.h:155
GVC_s::layerlist
int * layerlist
Definition
gvcint.h:142
GVG_s
Definition
gvcint.h:70
GVG_s::input_filename
char * input_filename
Definition
gvcint.h:74
GVG_s::next
GVG_t * next
Definition
gvcint.h:72
GVG_s::graph_index
int graph_index
Definition
gvcint.h:75
GVG_s::gvc
GVC_t * gvc
Definition
gvcint.h:71
GVG_s::g
graph_t * g
Definition
gvcint.h:76
GVJ_s
Definition
gvcjob.h:262
boxf
Definition
geom.h:41
color_s
Definition
color.h:30
dt_s_
Definition
cdt.h:100
dtdisc_s_
Definition
cdt.h:85
gvlayout_engine_s
Definition
gvplugin_layout.h:24
gvlayout_features_t
Definition
types.h:619
gvplugin_active_layout_s
Definition
gvcint.h:39
gvplugin_active_layout_s::type
const char * type
Definition
gvcint.h:43
gvplugin_active_layout_s::features
gvlayout_features_t * features
Definition
gvcint.h:42
gvplugin_active_layout_s::engine
gvlayout_engine_t * engine
Definition
gvcint.h:40
gvplugin_active_layout_s::id
int id
Definition
gvcint.h:41
gvplugin_active_textlayout_s
Definition
gvcint.h:46
gvplugin_active_textlayout_s::engine
gvtextlayout_engine_t * engine
Definition
gvcint.h:47
gvplugin_active_textlayout_s::type
char * type
Definition
gvcint.h:49
gvplugin_active_textlayout_s::id
int id
Definition
gvcint.h:48
gvplugin_available_s
Definition
gvcint.h:60
gvplugin_available_s::quality
int quality
Definition
gvcint.h:63
gvplugin_available_s::package
gvplugin_package_t * package
Definition
gvcint.h:65
gvplugin_available_s::typestr
char * typestr
Definition
gvcint.h:62
gvplugin_available_s::next
gvplugin_available_t * next
Definition
gvcint.h:61
gvplugin_available_s::typeptr
gvplugin_installed_t * typeptr
Definition
gvcint.h:66
gvplugin_installed_t
ingroup plugin_api
Definition
gvplugin.h:35
gvplugin_package_s
Definition
gvcint.h:54
gvplugin_package_s::next
gvplugin_package_t * next
Definition
gvcint.h:55
gvplugin_package_s::name
char * name
Definition
gvcint.h:57
gvplugin_package_s::path
char * path
Definition
gvcint.h:56
gvtextlayout_engine_s
Definition
gvplugin_textlayout.h:26
point
Definition
geom.h:27
pointf_s
Definition
geom.h:29
s
Definition
grammar.c:93
lib
gvc
gvcint.h
Generated by
1.9.8