typedef struct gvrender_job_s gvrender_job_t;
struct gvrender_job_s {
- gvrender_job_t *next;
+ gvrender_job_t *next; /* linked list of jobs */
+ gvrender_job_t *next_active; /* linked list of active jobs (e.g. multiple windows) */
char *output_filename;
char *output_langname;
FILE *output_file;
gvlayout_engine_t *layout_engine; /* current layout engine */
int layout_id; /* internal id of current layout */
char *graphname; /* name from graph */
+ gvrender_job_t *active_jobs; /* linked list of active jobs */
char **lib;
gvrender_job_t *job = gvc->job;
gvrender_engine_t *gvre = job->render_engine;
+ /* insert job in active list */
+ job->next_active = gvc->active_jobs;
+ gvc->active_jobs = job;
+
if (gvre) {
if (gvre->begin_job)
gvre->begin_job(job);
void gvrender_end_job(GVC_t * gvc)
{
- gvrender_job_t *job = gvc->job;
+ gvrender_job_t **pjob, *job = gvc->job;
gvrender_engine_t *gvre = job->render_engine;
if (gvre && gvre->end_job)
}
#endif
gvc->lib = NULL;
+
+ /* remove job from active list */
+ for (pjob = &(gvc->active_jobs); *pjob; pjob = &((*pjob)->next_active)) {
+ if (*pjob == job) {
+ *pjob = job->next_active;
+ job->next_active = NULL;
+ break;
+ }
+ }
}
/* font modifiers */