From 45f08a78a44545975e7bcb332dda6e56cd9efd84 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 5 Jul 2005 19:21:46 +0000 Subject: [PATCH] adding infrastructure for a usershape plugin --- configure.ac | 1 + lib/common/types.h | 1 + lib/gvc/gvplugin.h | 2 +- lib/gvc/gvplugin_usershape.h | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lib/gvc/gvplugin_usershape.h diff --git a/configure.ac b/configure.ac index b1618039d..fd925fb30 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/lib/common/types.h b/lib/common/types.h index 92cf01370..c8c733b70 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -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; diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index a1443c610..5ed77c137 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -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 index 000000000..c0707c921 --- /dev/null +++ b/lib/gvc/gvplugin_usershape.h @@ -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 */ -- 2.40.0