From: ellson Date: Mon, 11 Jul 2005 18:35:25 +0000 (+0000) Subject: rename typedef: gv_plugin_t -> gvplugin_available_t X-Git-Tag: LAST_LIBGRAPH~32^2~7472 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57a0a419fd10346c4077678c35c42c79da6354fe;p=graphviz rename typedef: gv_plugin_t -> gvplugin_available_t rename typedef: gvplugin_type_t -> gvplugin_installed_t new typedefs: gvplugin_active_device_t gvplugin_active_render_t gvplugin_active_layout_t gvplugin_active_textlayout_t gvplugin_active_usershape_t --- diff --git a/lib/common/emit.c b/lib/common/emit.c index de775ba8d..55e5645ee 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -87,7 +87,7 @@ static void init_job_flags(GVJ_t * job, graph_t * g) { switch (job->output_lang) { case GVRENDER_PLUGIN: - job->flags = chkOrder(g) | job->render_features->flags; + job->flags = chkOrder(g) | job->render.features->flags; break; case POSTSCRIPT: job->flags = chkOrder(g) | GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES; @@ -1036,7 +1036,7 @@ static void init_job_margin(GVJ_t *job) /* set default margins depending on format */ switch (job->output_lang) { case GVRENDER_PLUGIN: - job->margin.x = job->margin.y = job->render_features->default_margin; + job->margin.x = job->margin.y = job->render.features->default_margin; break; case POSTSCRIPT: case PDF: case HPGL: case PCL: case MIF: case METAPOST: case FIG: case VTX: case ATTRIBUTED_DOT: @@ -1060,7 +1060,7 @@ static void init_job_dpi(GVJ_t *job, graph_t *g) /* set default margins depending on format */ switch (job->output_lang) { case GVRENDER_PLUGIN: - job->dpi = job->render_features->default_dpi; + job->dpi = job->render.features->default_dpi; break; case POSTSCRIPT: case SVG: diff --git a/lib/common/input.c b/lib/common/input.c index 9e020cef6..91acf440d 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -881,6 +881,6 @@ void config_codegen_builtins(GVC_t * gvc) 0, "cg", NULL, - (gvplugin_type_t *) p); + (gvplugin_installed_t *) p); #endif } diff --git a/lib/gvc/gvc.h b/lib/gvc/gvc.h index df6c12057..fe04f051e 100644 --- a/lib/gvc/gvc.h +++ b/lib/gvc/gvc.h @@ -40,8 +40,8 @@ extern "C" { extern boolean gvplugin_install(GVC_t * gvc, api_t api, char *typestr, int quality, char *packagename, char *path, - gvplugin_type_t * typeptr); - extern gv_plugin_t *gvplugin_load(GVC_t * gvc, api_t api, char *type); + gvplugin_installed_t * typeptr); + extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *type); extern gvplugin_library_t *gvplugin_library_load(char *path); extern const char *gvplugin_list(GVC_t * gvc, api_t api, char *str); extern api_t gvplugin_api(char *str); diff --git a/lib/gvc/gvcint.h b/lib/gvc/gvcint.h index 66f0bdf06..a60f9ed79 100644 --- a/lib/gvc/gvcint.h +++ b/lib/gvc/gvcint.h @@ -72,6 +72,38 @@ extern "C" { int flags; } gvdevice_features_t; + /* active plugin headers */ + typedef struct gvplugin_active_device_s { + gvdevice_engine_t *engine; + int id; + gvdevice_features_t *features; + } gvplugin_active_device_t; + + typedef struct gvplugin_active_layout_s { + gvlayout_engine_t *engine; + int id; + char *type; + } gvplugin_active_layout_t; + + typedef struct gvplugin_active_render_s { + gvrender_engine_t *engine; + int id; + gvrender_features_t *features; + char *type; + } gvplugin_active_render_t; + + typedef struct gvplugin_active_textlayout_s { + gvtextlayout_engine_t *engine; + int id; + char *type; + } gvplugin_active_textlayout_t; + + typedef struct gvplugin_active_usershape_s { + gvusershape_engine_t *engine; + int id; + char *type; + } gvplugin_active_usershape_t; + /* * gv_matrix_t: (compat with cairo_matrix_t) * @@ -92,13 +124,9 @@ extern "C" { FILE *output_file; int output_lang; - gvdevice_engine_t *device_engine; /* current device engine */ - int device_id; /* internal id of current device engine within plugin */ - gvdevice_features_t *device_features; /* features of current device */ + gvplugin_active_device_t device; + gvplugin_active_render_t render; - gvrender_engine_t *render_engine; /* current render engine */ - int render_id; /* internal id of current render engine within plugin */ - gvrender_features_t *render_features; /* features of current render */ #ifndef DISABLE_CODEGENS codegen_t *codegen; /* current codegen */ #endif @@ -157,12 +185,10 @@ extern "C" { void *window; /* display-specific data for gvrender plugin */ }; -/* gv_plugin_t is a descriptor for available plugins; - gvplugin_t is for installed plugins */ - typedef struct gv_plugin_s gv_plugin_t; + typedef struct gvplugin_available_s gvplugin_available_t; - struct gv_plugin_s { - gv_plugin_t *next; /* next plugin in linked list, or NULL */ + struct gvplugin_available_s { + gvplugin_available_t *next; /* next plugin in linked list, or NULL */ char *typestr; /* type string, e.g. "png" or "ps" */ int quality; /* programmer assigned quality ranking within type (+ve or -ve int) @@ -170,7 +196,7 @@ extern "C" { char *path; /* file path to library containing plugin, or NULL if builtin */ char *packagename; /* package name */ - gvplugin_type_t *typeptr; /* pointer to jumptable for plugin, + gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin, or NULL if not yet loaded */ }; @@ -196,17 +222,14 @@ extern "C" { /* plugins */ #define ELEM(x) +1 /* APIS expands to "+1 +1 ... +1" to give the number of APIs */ - gv_plugin_t *apis[ APIS ]; /* array of linked-list of plugins per api */ - gv_plugin_t *api[ APIS ]; /* array of current plugins per api */ + gvplugin_available_t *apis[ APIS ]; /* array of linked-list of plugins per api */ + gvplugin_available_t *api[ APIS ]; /* array of current plugins per api */ #undef ELEM - gvtextlayout_engine_t *textlayout_engine; /* current textlayout engine */ - gvusershape_engine_t *usershape_engine; /* current usershape engine */ - /* gvrender_begin_job() */ - char *layout_type; /* string name of layout type */ - gvlayout_engine_t *layout_engine; /* current layout engine */ - int layout_id; /* internal id of current layout */ + gvplugin_active_textlayout_t textlayout; + gvplugin_active_usershape_t usershape; + gvplugin_active_layout_t layout; char *graphname; /* name from graph */ GVJ_t *active_jobs; /* linked list of active jobs */ diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index 0d45b2f8e..c8c082067 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -181,7 +181,7 @@ static int gvconfig_plugin_install_from_config(GVC_t * gvc, char *s) static void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplugin_library_t *library) { gvplugin_api_t *apis; - gvplugin_type_t *types; + gvplugin_installed_t *types; int i; for (apis = library->apis; (types = apis->types); apis++) { @@ -195,7 +195,7 @@ static void gvconfig_plugin_install_from_library(GVC_t * gvc, char *path, gvplug static void gvconfig_write_library_config(char *path, gvplugin_library_t *library, FILE *f) { gvplugin_api_t *apis; - gvplugin_type_t *types; + gvplugin_installed_t *types; int i; fprintf(f, "%s %s {\n", path, library->packagename); diff --git a/lib/gvc/gvdevice.c b/lib/gvc/gvdevice.c index 12245b3ff..6d7a60103 100644 --- a/lib/gvc/gvdevice.c +++ b/lib/gvc/gvdevice.c @@ -37,8 +37,8 @@ int gvdevice_select(GVJ_t * job, char *str) { GVC_t *gvc = job->gvc; - gv_plugin_t *plugin; - gvplugin_type_t *typeptr; + gvplugin_available_t *plugin; + gvplugin_installed_t *typeptr; #ifndef DISABLE_CODEGENS codegen_info_t *cg_info; #endif @@ -53,10 +53,10 @@ int gvdevice_select(GVJ_t * job, char *str) } else { #endif typeptr = plugin->typeptr; - job->device_engine = (gvdevice_engine_t *) (typeptr->engine); - job->device_features = + job->device.engine = (gvdevice_engine_t *) (typeptr->engine); + job->device.features = (gvdevice_features_t *) (typeptr->features); - job->device_id = typeptr->id; + job->device.id = typeptr->id; return GVRENDER_PLUGIN; #ifndef DISABLE_CODEGENS } @@ -67,18 +67,18 @@ int gvdevice_select(GVJ_t * job, char *str) int gvdevice_features(GVJ_t * job) { - gvdevice_engine_t *gvde = job->device_engine; + gvdevice_engine_t *gvde = job->device.engine; int features = 0; if (gvde) - features = job->device_features->flags; + features = job->device.features->flags; return features; } void gvdevice_finalize(GVC_t * gvc) { GVJ_t *job = gvc->active_jobs; - gvdevice_engine_t *gvde = job->device_engine; + gvdevice_engine_t *gvde = job->device.engine; if (gvde) { if (gvde->finalize) diff --git a/lib/gvc/gvlayout.c b/lib/gvc/gvlayout.c index 3139d02d7..0636c3f7a 100644 --- a/lib/gvc/gvlayout.c +++ b/lib/gvc/gvlayout.c @@ -34,15 +34,15 @@ int gvlayout_select(GVC_t * gvc, char *layout) { - gv_plugin_t *plugin; - gvplugin_type_t *typeptr; + gvplugin_available_t *plugin; + gvplugin_installed_t *typeptr; plugin = gvplugin_load(gvc, API_layout, layout); if (plugin) { typeptr = plugin->typeptr; - gvc->layout_type = typeptr->type; - gvc->layout_engine = (gvlayout_engine_t *) (typeptr->engine); - gvc->layout_id = typeptr->id; + gvc->layout.type = typeptr->type; + gvc->layout.engine = (gvlayout_engine_t *) (typeptr->engine); + gvc->layout.id = typeptr->id; return GVRENDER_PLUGIN; } return NO_SUPPORT; @@ -50,7 +50,7 @@ int gvlayout_select(GVC_t * gvc, char *layout) void gvlayout_layout(GVC_t * gvc, graph_t * g) { - gvlayout_engine_t *gvle = gvc->layout_engine; + gvlayout_engine_t *gvle = gvc->layout.engine; if (gvle && gvle->layout) gvle->layout(g); @@ -58,7 +58,7 @@ void gvlayout_layout(GVC_t * gvc, graph_t * g) void gvlayout_cleanup(GVC_t * gvc, graph_t * g) { - gvlayout_engine_t *gvle = gvc->layout_engine; + gvlayout_engine_t *gvle = gvc->layout.engine; if (gvle && gvle->cleanup) gvle->cleanup(g); diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index afc5d4543..a28e152f9 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -69,9 +69,9 @@ char *gvplugin_api_name(api_t api) then, if qualities are the same, last install wins */ boolean gvplugin_install(GVC_t * gvc, api_t api, char *typestr, int quality, char *packagename, char *path, - gvplugin_type_t * typeptr) + gvplugin_installed_t * typeptr) { - gv_plugin_t *plugin, **pnext; + gvplugin_available_t *plugin, **pnext; if (api < 0) @@ -88,7 +88,7 @@ boolean gvplugin_install(GVC_t * gvc, api_t api, while (*pnext && strcmp(typestr, (*pnext)->typestr) == 0 && quality < (*pnext)->quality) pnext = &((*pnext)->next); - plugin = malloc(sizeof(gv_plugin_t)); + plugin = malloc(sizeof(gvplugin_available_t)); plugin->next = *pnext; *pnext = plugin; plugin->typestr = typestr; @@ -167,12 +167,12 @@ gvplugin_library_t *gvplugin_library_load(char *path) /* load a plugin of type=str where str can optionally contain a ":packagename" modifier */ -gv_plugin_t *gvplugin_load(GVC_t * gvc, api_t api, char *str) +gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *str) { - gv_plugin_t **pnext, *rv; + gvplugin_available_t **pnext, *rv; gvplugin_library_t *library; gvplugin_api_t *apis; - gvplugin_type_t *types; + gvplugin_installed_t *types; char *s, *p; int i; @@ -278,7 +278,7 @@ static const char *append_buf(char sep, char *str, boolean new) /* assemble a string list of available plugins */ const char *gvplugin_list(GVC_t * gvc, api_t api, char *str) { - gv_plugin_t **pnext, **plugin; + gvplugin_available_t **pnext, **plugin; const char *buf = NULL; char *s, *p, *typestr_last; boolean new = TRUE; diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index 5ed77c137..a9e0886b4 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -62,11 +62,11 @@ extern "C" { void *engine; /* pointer to the jump table for the plugin */ void *features; /* pointer to the feature description void* because type varies by api */ - } gvplugin_type_t; + } gvplugin_installed_t; typedef struct { api_t api; - gvplugin_type_t *types; + gvplugin_installed_t *types; } gvplugin_api_t; typedef struct { diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index a664fa7ea..1ff4b368a 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -47,8 +47,8 @@ extern char *canontoken(char *str); int gvrender_select(GVJ_t * job, char *str) { GVC_t *gvc = job->gvc; - gv_plugin_t *plugin; - gvplugin_type_t *typeptr; + gvplugin_available_t *plugin; + gvplugin_installed_t *typeptr; char *device; #ifndef DISABLE_CODEGENS codegen_info_t *cg_info; @@ -64,20 +64,20 @@ int gvrender_select(GVJ_t * job, char *str) } else { #endif typeptr = plugin->typeptr; - job->render_engine = (gvrender_engine_t *) (typeptr->engine); - job->render_features = + job->render.engine = (gvrender_engine_t *) (typeptr->engine); + job->render.features = (gvrender_features_t *) (typeptr->features); - job->render_id = typeptr->id; - device = job->render_features->device; + job->render.id = typeptr->id; + device = job->render.features->device; if (device) { plugin = gvplugin_load(gvc, API_device, device); if (! plugin) return NO_SUPPORT; typeptr = plugin->typeptr; - job->device_engine = (gvdevice_engine_t *) (typeptr->engine); - job->device_features = + job->device.engine = (gvdevice_engine_t *) (typeptr->engine); + job->device.features = (gvdevice_features_t *) (typeptr->features); - job->device_id = typeptr->id; + job->device.id = typeptr->id; } return GVRENDER_PLUGIN; #ifndef DISABLE_CODEGENS @@ -89,11 +89,11 @@ int gvrender_select(GVJ_t * job, char *str) int gvrender_features(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; int features = 0; if (gvre) { - features = job->render_features->flags; + features = job->render.features->flags; } #ifndef DISABLE_CODEGENS else { @@ -115,7 +115,7 @@ int gvrender_features(GVJ_t * job) void gvrender_begin_job(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre) { if (gvre->begin_job) @@ -134,7 +134,7 @@ void gvrender_begin_job(GVJ_t * job) void gvrender_end_job(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_job) gvre->end_job(job); @@ -158,7 +158,7 @@ static pointf gvrender_ptf(GVJ_t *job, pointf p) { pointf rv; - if (job->render_features->flags & GVRENDER_DOES_TRANSFORM) + if (job->render.features->flags & GVRENDER_DOES_TRANSFORM) return p; if (job->rotation) { @@ -204,7 +204,7 @@ static void gvrender_resolve_color(gvrender_features_t * features, void gvrender_begin_graph(GVJ_t * job, graph_t * g) { GVC_t *gvc = job->gvc; - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; char *str; double sx, sy; @@ -251,7 +251,7 @@ void gvrender_begin_graph(GVJ_t * job, graph_t * g) /* background color */ if (((str = agget(g, "bgcolor")) != 0) && str[0]) { - gvrender_resolve_color(job->render_features, str, + gvrender_resolve_color(job->render.features, str, &(gvc->bgcolor)); if (gvre->resolve_color) gvre->resolve_color(job, &(gvc->bgcolor)); @@ -291,7 +291,7 @@ fprintf(stderr,"pb = %d,%d %d,%d\n", void gvrender_end_graph(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_graph) gvre->end_graph(job); @@ -308,7 +308,7 @@ void gvrender_end_graph(GVJ_t * job) void gvrender_begin_page(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->begin_page) gvre->begin_page(job); @@ -328,7 +328,7 @@ void gvrender_begin_page(GVJ_t * job) void gvrender_end_page(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_page) gvre->end_page(job); @@ -344,7 +344,7 @@ void gvrender_end_page(GVJ_t * job) void gvrender_begin_layer(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->begin_layer) gvre->begin_layer(job, job->gvc->layerIDs[job->layerNum], job->layerNum, job->numLayers); @@ -360,7 +360,7 @@ void gvrender_begin_layer(GVJ_t * job) void gvrender_end_layer(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_layer) gvre->end_layer(job); @@ -376,7 +376,7 @@ void gvrender_end_layer(GVJ_t * job) void gvrender_begin_cluster(GVJ_t * job, graph_t * sg) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; job->sg = sg; /* set current cluster graph object */ #ifndef DISABLE_CODEGENS @@ -396,7 +396,7 @@ void gvrender_begin_cluster(GVJ_t * job, graph_t * sg) void gvrender_end_cluster(GVJ_t * job, graph_t *g) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_cluster) gvre->end_cluster(job); @@ -414,7 +414,7 @@ void gvrender_end_cluster(GVJ_t * job, graph_t *g) void gvrender_begin_nodes(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->begin_nodes) gvre->begin_nodes(job); @@ -430,7 +430,7 @@ void gvrender_begin_nodes(GVJ_t * job) void gvrender_end_nodes(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_nodes) gvre->end_nodes(job); @@ -446,7 +446,7 @@ void gvrender_end_nodes(GVJ_t * job) void gvrender_begin_edges(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->begin_edges) gvre->begin_edges(job); @@ -462,7 +462,7 @@ void gvrender_begin_edges(GVJ_t * job) void gvrender_end_edges(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_edges) gvre->end_edges(job); @@ -478,7 +478,7 @@ void gvrender_end_edges(GVJ_t * job) void gvrender_begin_node(GVJ_t * job, node_t * n) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; #ifndef DISABLE_CODEGENS Obj = NODE; @@ -498,7 +498,7 @@ void gvrender_begin_node(GVJ_t * job, node_t * n) void gvrender_end_node(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_node) gvre->end_node(job); @@ -516,7 +516,7 @@ void gvrender_end_node(GVJ_t * job) void gvrender_begin_edge(GVJ_t * job, edge_t * e) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; #ifndef DISABLE_CODEGENS Obj = EDGE; @@ -538,7 +538,7 @@ void gvrender_begin_edge(GVJ_t * job, edge_t * e) void gvrender_end_edge(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_edge) gvre->end_edge(job); @@ -557,7 +557,7 @@ void gvrender_end_edge(GVJ_t * job) void gvrender_begin_context(GVJ_t * job) { GVC_t *gvc = job->gvc; - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre) { (gvc->SP)++; @@ -578,7 +578,7 @@ void gvrender_begin_context(GVJ_t * job) void gvrender_end_context(GVJ_t * job) { GVC_t *gvc = job->gvc; - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre) { gvc->SP--; @@ -598,7 +598,7 @@ void gvrender_end_context(GVJ_t * job) void gvrender_begin_anchor(GVJ_t * job, char *href, char *tooltip, char *target) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->begin_anchor) gvre->begin_anchor(job, href, tooltip, target); @@ -614,7 +614,7 @@ void gvrender_begin_anchor(GVJ_t * job, char *href, char *tooltip, void gvrender_end_anchor(GVJ_t * job) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->end_anchor) gvre->end_anchor(job); @@ -630,7 +630,7 @@ void gvrender_end_anchor(GVJ_t * job) void gvrender_set_font(GVJ_t * job, char *fontname, double fontsize) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre) { job->style->fontfam = fontname; @@ -648,7 +648,7 @@ void gvrender_set_font(GVJ_t * job, char *fontname, double fontsize) void gvrender_textline(GVJ_t * job, pointf p, textline_t * line) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (line->str && line->str[0]) { if (gvre && gvre->textline) { @@ -671,11 +671,11 @@ void gvrender_textline(GVJ_t * job, pointf p, textline_t * line) void gvrender_set_pencolor(GVJ_t * job, char *name) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; color_t *color = &(job->style->pencolor); if (gvre) { - gvrender_resolve_color(job->render_features, name, color); + gvrender_resolve_color(job->render.features, name, color); if (gvre->resolve_color) gvre->resolve_color(job, color); } @@ -691,11 +691,11 @@ void gvrender_set_pencolor(GVJ_t * job, char *name) void gvrender_set_fillcolor(GVJ_t * job, char *name) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; color_t *color = &(job->style->fillcolor); if (gvre) { - gvrender_resolve_color(job->render_features, name, color); + gvrender_resolve_color(job->render.features, name, color); if (gvre->resolve_color) gvre->resolve_color(job, color); } @@ -711,7 +711,7 @@ void gvrender_set_fillcolor(GVJ_t * job, char *name) void gvrender_set_style(GVJ_t * job, char **s) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; char *line, *p; gvstyle_t *style = job->style; @@ -755,7 +755,7 @@ void gvrender_set_style(GVJ_t * job, char **s) void gvrender_ellipse(GVJ_t * job, point p, int rx, int ry, int filled) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->ellipse) { if (job->style->pen != PEN_NONE) { @@ -787,7 +787,7 @@ void gvrender_ellipse(GVJ_t * job, point p, int rx, int ry, int filled) void gvrender_polygon(GVJ_t * job, point * A, int n, int filled) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->polygon) { if (job->style->pen != PEN_NONE) { @@ -817,7 +817,7 @@ void gvrender_polygon(GVJ_t * job, point * A, int n, int filled) void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n, int arrow_at_start, int arrow_at_end, int filled) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->beziercurve) { if (job->style->pen != PEN_NONE) { @@ -858,7 +858,7 @@ void gvrender_beziercurve(GVJ_t * job, pointf * AF, int n, void gvrender_polyline(GVJ_t * job, point * A, int n) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (gvre && gvre->polyline) { if (job->style->pen != PEN_NONE) { @@ -887,7 +887,7 @@ void gvrender_polyline(GVJ_t * job, point * A, int n) void gvrender_comment(GVJ_t * job, char *str) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; if (!str || !str[0]) return; @@ -908,7 +908,7 @@ void gvrender_comment(GVJ_t * job, char *str) void gvrender_user_shape(GVJ_t * job, char *name, point * A, int n, int filled) { - gvrender_engine_t *gvre = job->render_engine; + gvrender_engine_t *gvre = job->render.engine; /* temporary hack until client API is FP */ static pointf *AF; diff --git a/lib/gvc/gvtextlayout.c b/lib/gvc/gvtextlayout.c index 9d53d44c9..6cf223d7e 100644 --- a/lib/gvc/gvtextlayout.c +++ b/lib/gvc/gvtextlayout.c @@ -33,13 +33,13 @@ int gvtextlayout_select(GVC_t * gvc, char *textlayout) { - gv_plugin_t *plugin; - gvplugin_type_t *typeptr; + gvplugin_available_t *plugin; + gvplugin_installed_t *typeptr; plugin = gvplugin_load(gvc, API_textlayout, textlayout); if (plugin) { typeptr = plugin->typeptr; - gvc->textlayout_engine = (gvtextlayout_engine_t *) (typeptr->engine); + gvc->textlayout.engine = (gvtextlayout_engine_t *) (typeptr->engine); return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */ } return NO_SUPPORT; @@ -47,7 +47,7 @@ int gvtextlayout_select(GVC_t * gvc, char *textlayout) double gvtextlayout_width(GVC_t *gvc, textline_t *textline, char *fontname, double fontsize, char *fontpath) { - gvtextlayout_engine_t *gvte = gvc->textlayout_engine; + gvtextlayout_engine_t *gvte = gvc->textlayout.engine; if (gvte && gvte->width) { gvte->width(textline, fontname, fontsize, fontpath); diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 6044ba5cd..064658163 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -33,13 +33,13 @@ int gvusershape_select(GVC_t * gvc, char *usershape) { - gv_plugin_t *plugin; - gvplugin_type_t *typeptr; + gvplugin_available_t *plugin; + gvplugin_installed_t *typeptr; plugin = gvplugin_load(gvc, API_usershape, usershape); if (plugin) { typeptr = plugin->typeptr; - gvc->usershape_engine = (gvusershape_engine_t *) (typeptr->engine); + gvc->usershape.engine = (gvusershape_engine_t *) (typeptr->engine); return GVRENDER_PLUGIN; /* FIXME - need more suitable success code */ } return NO_SUPPORT; diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index ad0f52c87..87cc8b82e 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -1646,7 +1646,7 @@ int Tcldot_Init(Tcl_Interp * interp) /* additional codegens */ for (p = cg; p->name; ++p) gvplugin_install(gvc, API_render, p->name, 0, "cg", NULL, - (gvplugin_type_t *) p); + (gvplugin_installed_t *) p); #ifndef TCLOBJ Tcl_CreateCommand(interp, "dotnew", dotnew,