wolffd@0
|
1 /* $Id: gvplugin.h,v 1.31 2009/07/14 13:18:07 ellson Exp $ $Revision: 1.31 $ */
|
wolffd@0
|
2 /* vim:set shiftwidth=4 ts=8: */
|
wolffd@0
|
3
|
wolffd@0
|
4 /**********************************************************
|
wolffd@0
|
5 * This software is part of the graphviz package *
|
wolffd@0
|
6 * http://www.graphviz.org/ *
|
wolffd@0
|
7 * *
|
wolffd@0
|
8 * Copyright (c) 1994-2004 AT&T Corp. *
|
wolffd@0
|
9 * and is licensed under the *
|
wolffd@0
|
10 * Common Public License, Version 1.0 *
|
wolffd@0
|
11 * by AT&T Corp. *
|
wolffd@0
|
12 * *
|
wolffd@0
|
13 * Information and Software Systems Research *
|
wolffd@0
|
14 * AT&T Research, Florham Park NJ *
|
wolffd@0
|
15 **********************************************************/
|
wolffd@0
|
16
|
wolffd@0
|
17 /* Header used by plugins */
|
wolffd@0
|
18
|
wolffd@0
|
19 #ifndef GVPLUGIN_H
|
wolffd@0
|
20 #define GVPLUGIN_H
|
wolffd@0
|
21
|
wolffd@0
|
22 #ifdef __cplusplus
|
wolffd@0
|
23 extern "C" {
|
wolffd@0
|
24 #endif
|
wolffd@0
|
25
|
wolffd@0
|
26 #include "gvcext.h"
|
wolffd@0
|
27
|
wolffd@0
|
28 /*
|
wolffd@0
|
29 * Terminology:
|
wolffd@0
|
30 *
|
wolffd@0
|
31 * package - e.g. libgvplugin_cairo.so
|
wolffd@0
|
32 * api - e.g. render
|
wolffd@0
|
33 * type - e.g. "png", "ps"
|
wolffd@0
|
34 */
|
wolffd@0
|
35
|
wolffd@0
|
36 typedef struct {
|
wolffd@0
|
37 int id; /* an id that is only unique within a package
|
wolffd@0
|
38 of plugins of the same api.
|
wolffd@0
|
39 A renderer-type such as "png" in the cairo package
|
wolffd@0
|
40 has an id that is different from the "ps" type
|
wolffd@0
|
41 in the same package */
|
wolffd@0
|
42 const char *type; /* a string name, such as "png" or "ps" that
|
wolffd@0
|
43 distinguishes different types withing the same
|
wolffd@0
|
44 (renderer in this case) */
|
wolffd@0
|
45 int quality; /* an arbitrary integer used for ordering plugins of
|
wolffd@0
|
46 the same type from different packages */
|
wolffd@0
|
47 void *engine; /* pointer to the jump table for the plugin */
|
wolffd@0
|
48 void *features; /* pointer to the feature description
|
wolffd@0
|
49 void* because type varies by api */
|
wolffd@0
|
50 } gvplugin_installed_t;
|
wolffd@0
|
51
|
wolffd@0
|
52 typedef struct {
|
wolffd@0
|
53 api_t api;
|
wolffd@0
|
54 gvplugin_installed_t *types;
|
wolffd@0
|
55 } gvplugin_api_t;
|
wolffd@0
|
56
|
wolffd@0
|
57 typedef struct {
|
wolffd@0
|
58 char *packagename; /* used when this plugin is builtin and has
|
wolffd@0
|
59 no pathname */
|
wolffd@0
|
60 gvplugin_api_t *apis;
|
wolffd@0
|
61 } gvplugin_library_t;
|
wolffd@0
|
62
|
wolffd@0
|
63 #ifdef __cplusplus
|
wolffd@0
|
64 }
|
wolffd@0
|
65 #endif
|
wolffd@0
|
66 #endif /* GVPLUGIN_H */
|