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
16
extern
"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 */
38
typedef
struct
gvplugin_active_layout_s
{
39
gvlayout_engine_t
*
engine
;
40
int
id
;
41
gvlayout_features_t
*
features
;
42
const
char
*
type
;
43
}
gvplugin_active_layout_t
;
44
45
typedef
struct
gvplugin_active_textlayout_s
{
46
gvtextlayout_engine_t
*
engine
;
47
int
id
;
48
char
*
type
;
49
}
gvplugin_active_textlayout_t
;
50
51
typedef
struct
gvplugin_package_s
gvplugin_package_t
;
52
53
struct
gvplugin_package_s
{
54
gvplugin_package_t
*
next
;
55
char
*
path
;
56
char
*
name
;
57
};
58
59
struct
gvplugin_available_s
{
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 */
75
graph_t
*
g
;
76
};
77
78
#define MAXNEST 4
79
80
struct
GVC_s
{
81
GVCOMMON_t
common
;
82
83
char
*
config_path
;
84
bool
config_found
;
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 */
106
Dtdisc_t
textfont_disc
;
107
Dt_t
*
textfont_dt
;
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() */
120
gvplugin_active_layout_t
layout
;
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 */
133
bool
graph_sets_pad
,
graph_sets_margin
,
graph_sets_pageSize
;
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 */
141
int
*
layerlist
;
142
143
/* default font */
144
char
*
defaultfontname
;
145
double
defaultfontsize
;
146
147
/* default line style */
148
char
**
defaultlinestyle
;
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 */
154
int
fontrenaming
;
155
};
156
157
GVCINT_API
GVC_t
*
gvCloneGVC
(
GVC_t
*);
158
GVCINT_API
void
gvFreeCloneGVC
(
GVC_t
*);
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
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:34
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
Agraph_s
graph or subgraph
Definition
cgraph.h:425
GVCOMMON_s
Definition
gvcommon.h:19
GVC_s
Definition
gvcint.h:80
GVC_s::fidx
int fidx
Definition
gvcint.h:88
GVC_s::config_path
char * config_path
Definition
gvcint.h:83
GVC_s::graphname
char * graphname
Definition
gvcint.h:122
GVC_s::graph_sets_pageSize
bool graph_sets_pageSize
Definition
gvcint.h:133
GVC_s::defaultlinestyle
char ** defaultlinestyle
Definition
gvcint.h:148
GVC_s::gvgs
GVG_t * gvgs
Definition
gvcint.h:91
GVC_s::graph_sets_margin
bool graph_sets_margin
Definition
gvcint.h:133
GVC_s::config_found
bool config_found
Definition
gvcint.h:84
GVC_s::active_jobs
GVJ_t * active_jobs
Definition
gvcint.h:123
GVC_s::pad
pointf pad
Definition
gvcint.h:128
GVC_s::common
GVCOMMON_t common
Definition
gvcint.h:81
GVC_s::defaultfontsize
double defaultfontsize
Definition
gvcint.h:145
GVC_s::defaultfontname
char * defaultfontname
Definition
gvcint.h:144
GVC_s::gvg
GVG_t * gvg
Definition
gvcint.h:92
GVC_s::graph_sets_pad
bool graph_sets_pad
Definition
gvcint.h:133
GVC_s::jobs
GVJ_t * jobs
Definition
gvcint.h:114
GVC_s::layerListDelims
char * layerListDelims
Definition
gvcint.h:137
GVC_s::pb
point pb
Definition
gvcint.h:130
GVC_s::pageSize
pointf pageSize
Definition
gvcint.h:129
GVC_s::packages
gvplugin_package_t * packages
Definition
gvcint.h:100
GVC_s::layerDelims
char * layerDelims
Definition
gvcint.h:136
GVC_s::numLayers
int numLayers
Definition
gvcint.h:140
GVC_s::input_filenames
char ** input_filenames
Definition
gvcint.h:87
GVC_s::pagedir
char * pagedir
Definition
gvcint.h:126
GVC_s::apis
gvplugin_available_t * apis[APIS]
Definition
gvcint.h:97
GVC_s::margin
pointf margin
Definition
gvcint.h:127
GVC_s::textlayout
gvplugin_active_textlayout_t textlayout
Definition
gvcint.h:108
GVC_s::rotation
int rotation
Definition
gvcint.h:132
GVC_s::layout
gvplugin_active_layout_t layout
Definition
gvcint.h:120
GVC_s::textfont_dt
Dt_t * textfont_dt
Definition
gvcint.h:107
GVC_s::bgcolor
gvcolor_t bgcolor
Definition
gvcint.h:151
GVC_s::job
GVJ_t * job
Definition
gvcint.h:115
GVC_s::write_fn
size_t(* write_fn)(GVJ_t *job, const char *s, size_t len)
Definition
gvcint.h:103
GVC_s::api
gvplugin_available_t * api[APIS]
Definition
gvcint.h:98
GVC_s::bb
boxf bb
Definition
gvcint.h:131
GVC_s::g
graph_t * g
Definition
gvcint.h:117
GVC_s::layers
char * layers
Definition
gvcint.h:138
GVC_s::layerIDs
char ** layerIDs
Definition
gvcint.h:139
GVC_s::textfont_disc
Dtdisc_t textfont_disc
Definition
gvcint.h:106
GVC_s::fontrenaming
int fontrenaming
Definition
gvcint.h:154
GVC_s::layerlist
int * layerlist
Definition
gvcint.h:141
GVG_s
Definition
gvcint.h:69
GVG_s::input_filename
char * input_filename
Definition
gvcint.h:73
GVG_s::next
GVG_t * next
Definition
gvcint.h:71
GVG_s::graph_index
int graph_index
Definition
gvcint.h:74
GVG_s::gvc
GVC_t * gvc
Definition
gvcint.h:70
GVG_s::g
graph_t * g
Definition
gvcint.h:75
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:38
gvplugin_active_layout_s::type
const char * type
Definition
gvcint.h:42
gvplugin_active_layout_s::features
gvlayout_features_t * features
Definition
gvcint.h:41
gvplugin_active_layout_s::engine
gvlayout_engine_t * engine
Definition
gvcint.h:39
gvplugin_active_layout_s::id
int id
Definition
gvcint.h:40
gvplugin_active_textlayout_s
Definition
gvcint.h:45
gvplugin_active_textlayout_s::engine
gvtextlayout_engine_t * engine
Definition
gvcint.h:46
gvplugin_active_textlayout_s::type
char * type
Definition
gvcint.h:48
gvplugin_active_textlayout_s::id
int id
Definition
gvcint.h:47
gvplugin_available_s
Definition
gvcint.h:59
gvplugin_available_s::quality
int quality
Definition
gvcint.h:62
gvplugin_available_s::package
gvplugin_package_t * package
Definition
gvcint.h:64
gvplugin_available_s::typestr
char * typestr
Definition
gvcint.h:61
gvplugin_available_s::next
gvplugin_available_t * next
Definition
gvcint.h:60
gvplugin_available_s::typeptr
gvplugin_installed_t * typeptr
Definition
gvcint.h:65
gvplugin_installed_t
ingroup plugin_api
Definition
gvplugin.h:35
gvplugin_package_s
Definition
gvcint.h:53
gvplugin_package_s::next
gvplugin_package_t * next
Definition
gvcint.h:54
gvplugin_package_s::name
char * name
Definition
gvcint.h:56
gvplugin_package_s::path
char * path
Definition
gvcint.h:55
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