Provide flag from plugin device.
Eliminate cairox renderer variant.
{
switch (job->output_lang) {
case GVRENDER_PLUGIN:
- job->flags |= chkOrder(g) | job->render.features->flags;
+ job->flags |= chkOrder(g)
+ | job->render.features->flags
+ | job->device.features->flags;
break;
case VTX:
/* output sorted, i.e. all nodes then all edges */
/* if we already have an active job list and the device doesn't support mutiple output files, or we are about to write to a different output device */
firstjob = gvc->active_jobs;
if (firstjob
- && (!(firstjob->flags & GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES)
+ && (!(firstjob->flags & GVRENDER_DOES_MULTIGRAPHS)
|| (strcmp(job->output_langname,firstjob->output_langname)))) {
gvrender_end_job(firstjob);
gvrender_begin_job(job); /* FIXME? - semantics are unclear */
}
- if (! (job->flags & GVRENDER_X11_EVENTS)) {
+ if (! (job->flags & GVDEVICE_EVENTS)) {
/* Show_boxes is not defined, if at all,
* until splines are generated in dot
*/
#define EMIT_EDGE_SORTED (1<<4)
#define GVRENDER_DOES_ARROWS (1<<5)
#define GVRENDER_DOES_LAYERS (1<<6)
-#define GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES (1<<7)
+#define GVRENDER_DOES_MULTIGRAPHS (1<<7)
#define GVRENDER_DOES_TRUECOLOR (1<<8)
#define GVRENDER_Y_GOES_DOWN (1<<9)
-#define GVRENDER_X11_EVENTS (1<<10)
+#define GVDEVICE_EVENTS (1<<10)
#define GVRENDER_DOES_TRANSFORM (1<<11)
#define GVRENDER_DOES_LABELS (1<<12)
#define GVRENDER_DOES_MAPS (1<<13)
int flags;
} gvdevice_features_t;
- typedef struct {
- int flags;
- } gvformatter_features_t;
-
#define LAYOUT_USES_RANKDIR (1<<0)
- /* active plugin headers */
- typedef struct gvplugin_active_formatter_s {
- gvformatter_engine_t *engine;
- int id;
- gvformatter_features_t *features;
- } gvplugin_active_formatter_t;
-
typedef struct gvplugin_active_device_s {
gvdevice_engine_t *engine;
int id;
gvplugin_active_render_t render;
gvplugin_active_device_t device;
- gvplugin_active_formatter_t formatter;
gvplugin_active_loadimage_t loadimage;
gvdevice_callbacks_t *callbacks;
pointf device_dpi;
};
static gvrender_features_t psgen_features = {
- GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES
+ GVRENDER_DOES_MULTIGRAPHS
| GVRENDER_DOES_LAYERS
| GVRENDER_DOES_TRANSFORM
| GVRENDER_DOES_MAPS
return FALSE;
}
-static void gdk_pixbuf_formatter(GVJ_t * job, unsigned int width, unsigned int height, unsigned char *data)
+static void gdk_pixbuf_format(GVJ_t * job, unsigned int width, unsigned int height, unsigned char *data)
{
char *format_str = "";
GdkPixbuf *pixbuf;
static gvdevice_engine_t gdk_pixbuf_engine = {
NULL,
- gdk_pixbuf_formatter,
+ gdk_pixbuf_format,
NULL,
};
-static gvformatter_features_t gdk_pixbuf_features = {
+static gvdevice_features_t gdk_pixbuf_features = {
0, /* flags */
};
gtk_main();
}
+static gvdevice_features_t device_features_gtk = {
+ GVDEVICE_EVENTS,
+};
+
static gvdevice_engine_t device_engine_gtk = {
initialize_gtk,
NULL,
gvplugin_installed_t gvdevice_types_gtk[] = {
#ifdef HAVE_GTK
#ifdef CAIRO_HAS_XLIB_SURFACE
- {0, "gtk:cairox", 0, &device_engine_gtk, NULL},
+ {0, "gtk:cairox", 0, &device_engine_gtk, &device_features_gtk},
#endif
#endif
{0, NULL, 0, NULL, NULL}
};
-
};
static gvrender_features_t ming_features = {
- ( GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES
+ ( GVRENDER_DOES_MULTIGRAPHS
| GVRENDER_DOES_TRUECOLOR
| GVRENDER_Y_GOES_DOWN
// | GVRENDER_DOES_TRANSFORM
RGBA_DOUBLE, /* color_type */
"cairo", /* imageloader for usershapes */
};
-
-static gvrender_features_t cairogen_features_x = {
- GVRENDER_DOES_TRUECOLOR
- | GVRENDER_Y_GOES_DOWN
- | GVRENDER_DOES_TRANSFORM
- | GVRENDER_X11_EVENTS, /* flags */
- 0, /* default margin - points */
- 4., /* default pad - graph units */
- {0.,0.}, /* default page width, height - points */
- {72.,72.}, /* default dpi */
- 0, /* knowncolors */
- 0, /* sizeof knowncolors */
- RGBA_DOUBLE, /* color_type */
- "cairo", /* imageloader for usershapes */
-};
#endif
gvplugin_installed_t gvrender_pango_types[] = {
#ifdef HAVE_PANGOCAIRO
{FORMAT_CAIRO, "cairo", 10, &cairogen_engine, &cairogen_features},
- {FORMAT_CAIRO, "cairox", 10, &cairogen_engine, &cairogen_features_x},
#endif
{0, NULL, 0, NULL, NULL}
};
{FORMAT_SVG, "svg:cairo", -10, NULL, &cairogen_features_svg},
#endif
//#ifdef CAIRO_HAS_XCB_SURFACE
-// {FORMAT_XCB, "xcb:cairo", 0, NULL, &cairogen_features_x},
+// {FORMAT_XCB, "xcb:cairo", 0, NULL, &cairogen_features},
//#endif
//#ifdef CAIRO_HAS_SDL_SURFACE
-// {FORMAT_SDL, "sdl:cairo", 0, NULL, &cairogen_features_x},
+// {FORMAT_SDL, "sdl:cairo", 0, NULL, &cairogen_features},
//#endif
//#ifdef CAIRO_HAS_GLITZ_SURFACE
-// {FORMAT_GLITZ, "glitz:cairo", 0, NULL, &cairogen_features_x},
+// {FORMAT_GLITZ, "glitz:cairo", 0, NULL, &cairogen_features},
//#endif
//#ifdef CAIRO_HAS_QUARTZ_SURFACE
-// {FORMAT_QUARTZ, "quartz:cairo", 0, NULL, &cairogen_features_x},
+// {FORMAT_QUARTZ, "quartz:cairo", 0, NULL, &cairogen_features},
//#endif
//#ifdef CAIRO_HAS_WIN32_SURFACE
-// {FORMAT_WIN32, "win32:cairo", 0, NULL, &cairogen_features_x},
+// {FORMAT_WIN32, "win32:cairo", 0, NULL, &cairogen_features},
//#endif
#endif
{0, NULL, 0, NULL, NULL}
firstjob->keycodes = NULL;
}
+static gvdevice_features_t device_features_xlib = {
+ GVDEVICE_EVENTS,
+};
+
static gvdevice_engine_t device_engine_xlib = {
initialize_xlib,
NULL,
gvplugin_installed_t gvdevice_types_xlib[] = {
#ifdef CAIRO_HAS_XLIB_SURFACE
- {0, "xlib:cairox", 0, &device_engine_xlib, NULL},
+ {0, "xlib:cairox", 0, &device_engine_xlib, &device_features_xlib},
#endif
{0, NULL, 0, NULL, NULL}
};