Daniel@0: /* $Id: gvplugin.h,v 1.31 2009/07/14 13:18:07 ellson Exp $ $Revision: 1.31 $ */ Daniel@0: /* vim:set shiftwidth=4 ts=8: */ Daniel@0: Daniel@0: /********************************************************** Daniel@0: * This software is part of the graphviz package * Daniel@0: * http://www.graphviz.org/ * Daniel@0: * * Daniel@0: * Copyright (c) 1994-2004 AT&T Corp. * Daniel@0: * and is licensed under the * Daniel@0: * Common Public License, Version 1.0 * Daniel@0: * by AT&T Corp. * Daniel@0: * * Daniel@0: * Information and Software Systems Research * Daniel@0: * AT&T Research, Florham Park NJ * Daniel@0: **********************************************************/ Daniel@0: Daniel@0: /* Header used by plugins */ Daniel@0: Daniel@0: #ifndef GVPLUGIN_H Daniel@0: #define GVPLUGIN_H Daniel@0: Daniel@0: #ifdef __cplusplus Daniel@0: extern "C" { Daniel@0: #endif Daniel@0: Daniel@0: #include "gvcext.h" Daniel@0: Daniel@0: /* Daniel@0: * Terminology: Daniel@0: * Daniel@0: * package - e.g. libgvplugin_cairo.so Daniel@0: * api - e.g. render Daniel@0: * type - e.g. "png", "ps" Daniel@0: */ Daniel@0: Daniel@0: typedef struct { Daniel@0: int id; /* an id that is only unique within a package Daniel@0: of plugins of the same api. Daniel@0: A renderer-type such as "png" in the cairo package Daniel@0: has an id that is different from the "ps" type Daniel@0: in the same package */ Daniel@0: const char *type; /* a string name, such as "png" or "ps" that Daniel@0: distinguishes different types withing the same Daniel@0: (renderer in this case) */ Daniel@0: int quality; /* an arbitrary integer used for ordering plugins of Daniel@0: the same type from different packages */ Daniel@0: void *engine; /* pointer to the jump table for the plugin */ Daniel@0: void *features; /* pointer to the feature description Daniel@0: void* because type varies by api */ Daniel@0: } gvplugin_installed_t; Daniel@0: Daniel@0: typedef struct { Daniel@0: api_t api; Daniel@0: gvplugin_installed_t *types; Daniel@0: } gvplugin_api_t; Daniel@0: Daniel@0: typedef struct { Daniel@0: char *packagename; /* used when this plugin is builtin and has Daniel@0: no pathname */ Daniel@0: gvplugin_api_t *apis; Daniel@0: } gvplugin_library_t; Daniel@0: Daniel@0: #ifdef __cplusplus Daniel@0: } Daniel@0: #endif Daniel@0: #endif /* GVPLUGIN_H */