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