Debian Codegraph @

lib/gvc/gvplugin.h

raw
1 /// @file
2 /// @ingroup plugin_api
3 /// @defgroup plugin_api Plugin API
4 /// @ingroup public_apis
5 /// @{
6 /*************************************************************************
7 * Copyright (c) 2011 AT&T Intellectual Property
8 * All rights reserved. This program and the accompanying materials
9 * are made available under the terms of the Eclipse Public License v1.0
10 * which accompanies this distribution, and is available at
11 * https://www.eclipse.org/legal/epl-v10.html
12 *
13 * Contributors: Details at https://graphviz.org
14 *************************************************************************/
15
16 /* Header used by plugins */
17
18 #pragma once
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include "gvcext.h"
25
26 /*
27 * Terminology:
28 *
29 * package - e.g. libgvplugin_cairo.so
30 * api - e.g. render
31 * type - e.g. "png", "ps"
32 */
33
34 /// ingroup plugin_api
35 typedef struct {
36 int id; /* an id that is only unique within a package
37 of plugins of the same api.
38 A renderer-type such as "png" in the cairo package
39 has an id that is different from the "ps" type
40 in the same package */
41 const char *type; /* a string name, such as "png" or "ps" that
42 distinguishes different types within the same
43 (renderer in this case) */
44 int quality; /* an arbitrary integer used for ordering plugins of
45 the same type from different packages */
46 void *engine; /* pointer to the jump table for the plugin */
47 void *features; /* pointer to the feature description
48 void* because type varies by api */
49 } gvplugin_installed_t;
50
51 typedef struct {
52 api_t api;
53 gvplugin_installed_t *types;
54 } gvplugin_api_t;
55
56 typedef struct {
57 char *packagename; /* used when this plugin is builtin and has
58 no pathname */
59 gvplugin_api_t *apis;
60 } gvplugin_library_t;
61 /// @}
62
63 #ifdef __cplusplus
64 }
65 #endif