if (job->output_file) {
if (gvc->viewNum > 0) {
gvrender_end_job(job);
- gvdevice_end_job(job);
emit_once_reset();
gvc->viewNum = 0;
}
init_job_viewport(job, g);
init_job_pagination(job, g);
- gvdevice_begin_job(job);
gvrender_begin_job(job);
switch (job->output_lang) {
init_bb_node(g, n);
}
+extern gvevent_key_binding_t gvevent_key_binding[];
+extern int gvevent_key_binding_size;
+
void emit_jobs (GVC_t * gvc, graph_t * g)
{
GVJ_t *job;
init_layering(gvc, g);
init_bb(g);
+ gvc->keybindings = gvevent_key_binding;
+ gvc->numkeys = gvevent_key_binding_size;
+
/* gvc->active_jobs = NULL; acive job sets can straddle multiple input graphs */
for (job = gvrender_first_job(gvc); job; job = gvrender_next_job(gvc)) {
job->g = g;
/* clear active list */
gvc->active_jobs = NULL;
}
- if (! gvc->active_jobs)
- gvdevice_initialize(gvc);
/* insert job in active list */
job->next_active = gvc->active_jobs;
gv_plugin_t *api[ APIS ]; /* array of current plugins per api */
#undef ELEM
- void *display; /* display-specific data for gvdisplay plugin */
-
gvtextlayout_engine_t *textlayout_engine; /* current text_layout engine */
/* gvrender_begin_job() */
/* render defaults set from graph */
color_t bgcolor; /* background color */
+
+ /* keybindings for keyboard events */
+ gvevent_key_binding_t *keybindings;
+ int numkeys;
+ void *keycodes;
};
#ifdef __cplusplus
return features;
}
-extern gvevent_key_binding_t gvevent_key_binding[];
-extern int gvevent_key_binding_size;
-
-void gvdevice_initialize(GVC_t * gvc)
-{
- GVJ_t *job = gvc->job;
- gvdevice_engine_t *gvde = job->device_engine;
-
- if (gvde && gvde->initialize)
- gvde->initialize(gvc, gvevent_key_binding, gvevent_key_binding_size);
-}
-
void gvdevice_finalize(GVC_t * gvc)
{
GVJ_t *job = gvc->active_jobs;
}
#endif
}
-
-void gvdevice_begin_job(GVJ_t * job)
-{
- gvdevice_engine_t *gvde = job->device_engine;
-
- if (gvde) {
- if (gvde->begin_job)
- gvde->begin_job(job);
- }
-#if 0
-#ifndef DISABLE_CODEGENS
- else {
- codegen_t *cg = job->codegen;
-
- if (cg && cg->begin_job)
- cg->begin_job(job->output_file, job->g, job->gvc->lib, job->gvc->user,
- job->gvc->info, job->pagesArraySize);
- }
-#endif
-#endif
-}
-
-void gvdevice_end_job(GVJ_t * job)
-{
- gvdevice_engine_t *gvde = job->device_engine;
-
- if (gvde && gvde->end_job)
- gvde->end_job(job);
-#if 0
-#ifndef DISABLE_CODEGENS
- else {
- codegen_t *cg = job->codegen;
-
- if (cg && cg->end_job)
- cg->end_job();
- }
-#endif
-#endif
- job->gvc->lib = NULL;
-}
#endif
struct gvdevice_engine_s {
- void (*initialize) (GVC_t * gvc, gvevent_key_binding_t *keybindings, int numkeys);
void (*finalize) (GVC_t * gvc);
- void (*begin_job) (GVJ_t * job);
- void (*end_job) (GVJ_t * job);
};
/* callbacks */