]> granicus.if.org Git - graphviz/commitdiff
adding infrastructure for a usershape plugin
authorellson <devnull@localhost>
Tue, 5 Jul 2005 19:21:46 +0000 (19:21 +0000)
committerellson <devnull@localhost>
Tue, 5 Jul 2005 19:21:46 +0000 (19:21 +0000)
configure.ac
lib/common/types.h
lib/gvc/gvplugin.h
lib/gvc/gvplugin_usershape.h [new file with mode: 0644]

index b1618039de518f2fd9dc7c25119499c700c04fcf..fd925fb30ebf897d74ea90582f8141bc41d7e4ec 100644 (file)
@@ -1510,6 +1510,7 @@ AC_CONFIG_FILES(Makefile
        lib/gvc/libgvc.pc
        plugin/Makefile
        plugin/layout/Makefile
+       plugin/usershape/Makefile
        cmd/Makefile
        cmd/dot/Makefile
        cmd/dot/dotneato-config
index 92cf0137086d4e94ea2bde0847a8fb531f96f547..c8c733b70dcfd75dc778c878e1c168235dfdd355 100644 (file)
@@ -39,6 +39,7 @@ extern "C" {
     typedef struct gvrender_engine_s gvrender_engine_t;
     typedef struct gvlayout_engine_s gvlayout_engine_t;
     typedef struct gvtextlayout_engine_s gvtextlayout_engine_t;
+    typedef struct gvusershape_engine_s gvusershape_engine_t;
 
     typedef struct htmllabel_t htmllabel_t;
 
index a1443c610dc3c6eeac706beec895e61a0b9ed576..5ed77c13789c159907d7e6fa20a26c29c5c697c9 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
  * The enumerated type is defined here.  The apis array is
  * inititialized in gvplugin.c by redefining ELEM and reinvoking APIS.
  */
-#define APIS ELEM(render) ELEM(layout) ELEM(textlayout) ELEM(device)
+#define APIS ELEM(render) ELEM(layout) ELEM(textlayout) ELEM(device) ELEM(usershape)
 
 #define ELEM(x) API_##x,
     typedef enum { APIS } api_t; /* API_render, API_layout, ... */
diff --git a/lib/gvc/gvplugin_usershape.h b/lib/gvc/gvplugin_usershape.h
new file mode 100644 (file)
index 0000000..c0707c9
--- /dev/null
@@ -0,0 +1,36 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+#ifndef GVUSERSHAPE_PLUGIN_H
+#define GVUSERSHAPE_PLUGIN_H
+
+#include "gvplugin.h"
+#include "gvcint.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    struct gvusershape_engine_s {
+       void *(*getshape) (char *name);
+       void (*freeshapes) (void);
+       point (*image_size) (graph_t * g, char *shapefile);
+    };
+
+#ifdef __cplusplus
+}
+#endif
+#endif                         /* GVUSERSHAPE_PLUGIN_H */