From 7d0bfe191cbf2962a737fcebb7ee334403cc9f4c Mon Sep 17 00:00:00 2001 From: Dom Lachowicz Date: Tue, 18 Mar 2003 00:26:49 +0000 Subject: [PATCH] rsvg can now be used as a gimp plugin --- plug-ins/common/svg.c | 47 +++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/plug-ins/common/svg.c b/plug-ins/common/svg.c index 9efb9e7aad..505b0589a9 100644 --- a/plug-ins/common/svg.c +++ b/plug-ins/common/svg.c @@ -28,11 +28,11 @@ #include #include -#include -#include "libgimp/stdplugins-intl.h" +#include + +/* TODO: remove me, initialize gimp i18n services */ +#define _(String) (String) -/* Declare local functions. - */ static void query (void); static void run (gchar *name, gint nparams, @@ -43,13 +43,24 @@ static gint32 load_image (gchar *filename, GimpRunMode runmode, gboolean preview); +GimpPlugInInfo PLUG_IN_INFO = { + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query_proc */ + run, /* run_proc */ +}; + MAIN () +/* + * 'query()' - Respond to a plug-in query... + */ static void query (void) { static GimpParamDef load_args[] = { + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, { GIMP_PDB_STRING, "filename", "The name of the file to load" }, { GIMP_PDB_STRING, "raw_filename", "The name of the file to load" } }; @@ -59,11 +70,11 @@ query (void) }; gimp_install_procedure ("file_svg_load", - "loads files in the SVG file format", - "loads files in the SVG file format", - "Dom Lachowicz", - "Dom Lachowicz", - "2002", + "Loads files in the SVG file format", + "Loads files in the SVG file format", + "Dom Lachowicz ", + "Dom Lachowicz ", + "(c) 2003 - " VERSION, "/SVG", NULL, GIMP_PLUGIN, @@ -72,15 +83,13 @@ query (void) load_args, load_return_vals); gimp_register_magic_load_handler ("file_svg_load", - "svg", - "", + "svg", "", "0,string,