Sven Neumann <sven@gimp.org> Simon Budig <Simon.Budig@unix-ag.org> Garry

2000-06-01  Michael Natterer  <mitch@gimp.org>
	    Sven Neumann  <sven@gimp.org>
	    Simon Budig  <Simon.Budig@unix-ag.org>
	    Garry R. Osgood  <gosgood@idt.net>
	    Seth Burgess <sjburges@gimp.org>

	* libgimp/gimpchannel_pdb.[ch]
	* libgimp/gimpproceduraldb_pdb.[ch]
	* libgimp/gimpunit_pdb.[ch]: replaced with code based on
	files generated using pdbgen

	* libgimp/Makefile.am
	* libgimp/gimp.h
	* libgimp/gimp_pdb.h
	* libgimp/gimpchannel.[ch]
	* libgimp/gimpproceduraldb.[ch]: new files wrapping around the
	autogenerated PDB wrappers as found in *_pdb.[ch].

	* libgimp/gimpselection_pdb.h: minor change.

	* tools/pdbgen/pdb/procedural_db.pdb: made it create libgimp code

	* plug-ins/gap/gap_filter_pdb.c
	* plug-ins/script-fu/script-fu-console.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/xjt/xpdb_calls.c: gimp_query_procedure's signature
	is typesafe now.
This commit is contained in:
Michael Natterer 2000-06-01 17:34:56 +00:00 committed by Michael Natterer
parent d7b24953e4
commit 5f7e2a8d1c
27 changed files with 1100 additions and 847 deletions

View File

@ -1,3 +1,31 @@
2000-06-01 Michael Natterer <mitch@gimp.org>
Sven Neumann <sven@gimp.org>
Simon Budig <Simon.Budig@unix-ag.org>
Garry R. Osgood <gosgood@idt.net>
Seth Burgess <sjburges@gimp.org>
* libgimp/gimpchannel_pdb.[ch]
* libgimp/gimpproceduraldb_pdb.[ch]
* libgimp/gimpunit_pdb.[ch]: replaced with code based on
files generated using pdbgen
* libgimp/Makefile.am
* libgimp/gimp.h
* libgimp/gimp_pdb.h
* libgimp/gimpchannel.[ch]
* libgimp/gimpproceduraldb.[ch]: new files wrapping around the
autogenerated PDB wrappers as found in *_pdb.[ch].
* libgimp/gimpselection_pdb.h: minor change.
* tools/pdbgen/pdb/procedural_db.pdb: made it create libgimp code
* plug-ins/gap/gap_filter_pdb.c
* plug-ins/script-fu/script-fu-console.c
* plug-ins/script-fu/script-fu.c
* plug-ins/xjt/xpdb_calls.c: gimp_query_procedure's signature
is typesafe now.
2000-06-01 Michael Natterer <mitch@gimp.org>
Sven Neumann <sven@gimp.org>

View File

@ -149,6 +149,8 @@ libgimp_la_SOURCES = \
${PDB_WRAPPERS_H} \
gimpcolorspace.c \
gimpcolorspace.h \
gimpchannel.c \
gimpchannel.h \
gimpdrawable.c \
gimpdrawable.h \
gimpenv.c \
@ -169,6 +171,8 @@ libgimp_la_SOURCES = \
gimpparasiteio.h \
gimppixelrgn.c \
gimppixelrgn.h \
gimpproceduraldb.c \
gimpproceduraldb.h \
gimpprotocol.c \
gimpprotocol.h \
gimpselection.c \
@ -212,6 +216,7 @@ gimpinclude_HEADERS = \
gimp.h \
${PDB_WRAPPERS_H} \
gimpchainbutton.h \
gimpchannel.h \
gimpcolorbutton.h \
gimpcolordisplay.h \
gimpcolorselector.h \
@ -238,6 +243,7 @@ gimpinclude_HEADERS = \
gimppatheditor.h \
gimppixelrgn.h \
gimppixmap.h \
gimpproceduraldb.h \
gimpquerybox.h \
gimpselection.h \
gimpsignal.h \

View File

@ -27,6 +27,7 @@
#include <libgimp/gimpenums.h>
#include <libgimp/gimptypes.h>
#include <libgimp/gimpchannel.h>
#include <libgimp/gimpcolorspace.h>
#include <libgimp/gimpdrawable.h>
#include <libgimp/gimpfeatures.h>
@ -38,6 +39,7 @@
#include <libgimp/gimpmath.h>
#include <libgimp/gimpparasite.h>
#include <libgimp/gimppixelrgn.h>
#include <libgimp/gimpproceduraldb.h>
#include <libgimp/gimpselection.h>
#include <libgimp/gimptile.h>
#include <libgimp/gimpunit.h>

View File

@ -51,6 +51,6 @@
#include <libgimp/gimptexttool_pdb.h>
#include <libgimp/gimptools_pdb.h>
#include <libgimp/gimpundo_pdb.h>
#include <libgimp/gimpunit_pdb.h>
#endif /* __GIMP_PDB_H__ */

41
libgimp/gimpchannel.c Normal file
View File

@ -0,0 +1,41 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpchannel.c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "gimp.h"
gint32
gimp_channel_new (gint32 image_ID,
gchar *name,
guint width,
guint height,
gdouble opacity,
guchar *color)
{
return _gimp_channel_new (image_ID,
width,
height,
name,
opacity,
color[0],
color[1],
color[2]);
}

45
libgimp/gimpchannel.h Normal file
View File

@ -0,0 +1,45 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpchannel.h
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_CHANNEL_H__
#define __GIMP_CHANNEL_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gint32 gimp_channel_new (gint32 image_ID,
gchar *name,
guint width,
guint height,
gdouble opacity,
guchar *color);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_CHANNEL_H__ */

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpchannel_pdb.c
*
@ -11,7 +11,7 @@
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@ -19,20 +19,28 @@
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gint32
gimp_channel_new (gint32 image_ID,
gchar *name,
guint width,
guint height,
gdouble opacity,
guchar *color)
_gimp_channel_new (gint32 image_ID,
gint width,
gint height,
gchar *name,
gdouble opacity,
guchar red,
guchar green,
guchar blue)
{
GParam *return_vals;
gint nreturn_vals;
gint32 channel_ID;
gint32 channel_ID = -1;
guchar color[3];
color[0] = red;
color[1] = green;
color[2] = blue;
return_vals = gimp_run_procedure ("gimp_channel_new",
&nreturn_vals,
@ -44,7 +52,6 @@ gimp_channel_new (gint32 image_ID,
PARAM_COLOR, color,
PARAM_END);
channel_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
channel_ID = return_vals[1].data.d_channel;
@ -58,19 +65,19 @@ gimp_channel_copy (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint32 channel_copy_ID = -1;
return_vals = gimp_run_procedure ("gimp_channel_copy",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
channel_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
channel_ID = return_vals[1].data.d_channel;
channel_copy_ID = return_vals[1].data.d_channel;
gimp_destroy_params (return_vals, nreturn_vals);
return channel_ID;
return channel_copy_ID;
}
void
@ -87,6 +94,150 @@ gimp_channel_delete (gint32 channel_ID)
gimp_destroy_params (return_vals, nreturn_vals);
}
gchar *
gimp_channel_get_name (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *name = NULL;
return_vals = gimp_run_procedure ("gimp_channel_get_name",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
name = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return name;
}
void
gimp_channel_set_name (gint32 channel_ID,
gchar *name)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_name",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_STRING, name,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gboolean
gimp_channel_get_visible (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean visible = FALSE;
return_vals = gimp_run_procedure ("gimp_channel_get_visible",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
visible = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return visible;
}
void
gimp_channel_set_visible (gint32 channel_ID,
gboolean visible)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_visible",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_INT32, visible,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gboolean
gimp_channel_get_show_masked (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean show_masked = FALSE;
return_vals = gimp_run_procedure ("gimp_channel_get_show_masked",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
show_masked = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return show_masked;
}
void
gimp_channel_set_show_masked (gint32 channel_ID,
gboolean show_masked)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_show_masked",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_INT32, show_masked,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gdouble
gimp_channel_get_opacity (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gdouble opacity = 0;
return_vals = gimp_run_procedure ("gimp_channel_get_opacity",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
opacity = return_vals[1].data.d_float;
gimp_destroy_params (return_vals, nreturn_vals);
return opacity;
}
void
gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_opacity",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_FLOAT, opacity,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_channel_get_color (gint32 channel_ID,
guchar *red,
@ -111,69 +262,6 @@ gimp_channel_get_color (gint32 channel_ID,
gimp_destroy_params (return_vals, nreturn_vals);
}
gchar*
gimp_channel_get_name (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *name;
return_vals = gimp_run_procedure ("gimp_channel_get_name",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
name = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
name = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return name;
}
gdouble
gimp_channel_get_opacity (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gdouble opacity;
return_vals = gimp_run_procedure ("gimp_channel_get_opacity",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
opacity = 0.0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
opacity = return_vals[1].data.d_float;
gimp_destroy_params (return_vals, nreturn_vals);
return opacity;
}
gboolean
gimp_channel_get_visible (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean visible;
return_vals = gimp_run_procedure ("gimp_channel_get_visible",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
visible = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
visible = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return visible;
}
void
gimp_channel_set_color (gint32 channel_ID,
guchar red,
@ -197,109 +285,41 @@ gimp_channel_set_color (gint32 channel_ID,
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_channel_set_name (gint32 channel_ID,
gchar *name)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_name",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_STRING, name,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_opacity",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_FLOAT, opacity,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_channel_set_visible (gint32 channel_ID,
gboolean visible)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_visible",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_INT32, visible,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint
gimp_channel_get_show_masked (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint show_masked;
return_vals = gimp_run_procedure ("gimp_channel_get_show_masked",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
show_masked = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
show_masked = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return show_masked;
}
void
gimp_channel_set_show_masked (gint32 channel_ID,
gint show_masked)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_show_masked",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_INT32, show_masked,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_channel_get_tattoo (gint32 channel_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint tattoo;
gint tattoo = 0;
return_vals = gimp_run_procedure ("gimp_channel_get_tattoo",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_END);
tattoo = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
tattoo = return_vals[1].data.d_int32;
tattoo = return_vals[1].data.d_tattoo;
gimp_destroy_params (return_vals, nreturn_vals);
return tattoo;
}
void
gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_set_tattoo",
&nreturn_vals,
PARAM_CHANNEL, channel_ID,
PARAM_INT32, tattoo,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpchannel_pdb.h
*
@ -7,17 +7,19 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_CHANNEL_PDB_H__
#define __GIMP_CHANNEL_PDB_H__
@ -29,35 +31,39 @@ extern "C" {
/* For information look into the C source or the html documentation */
gint32 gimp_channel_new (gint32 image_ID,
gchar *name,
guint width,
guint height,
gdouble opacity,
guchar *color);
gint32 gimp_channel_copy (gint32 channel_ID);
void gimp_channel_delete (gint32 channel_ID);
void gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
guchar *blue);
gchar * gimp_channel_get_name (gint32 channel_ID);
gdouble gimp_channel_get_opacity (gint32 channel_ID);
gint gimp_channel_get_show_masked (gint32 channel_ID);
gboolean gimp_channel_get_visible (gint32 channel_ID);
void gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
guchar blue);
void gimp_channel_set_name (gint32 channel_ID,
gchar *name);
void gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity);
void gimp_channel_set_show_masked (gint32 channel_ID,
gint show_masked);
void gimp_channel_set_visible (gint32 channel_ID,
gboolean visible);
gint32 gimp_channel_get_tattoo (gint32 channel_ID);
gint32 _gimp_channel_new (gint32 image_ID,
gint width,
gint height,
gchar *name,
gdouble opacity,
guchar red,
guchar green,
guchar blue);
gint32 gimp_channel_copy (gint32 channel_ID);
void gimp_channel_delete (gint32 channel_ID);
gchar* gimp_channel_get_name (gint32 channel_ID);
void gimp_channel_set_name (gint32 channel_ID,
gchar *name);
gboolean gimp_channel_get_visible (gint32 channel_ID);
void gimp_channel_set_visible (gint32 channel_ID,
gboolean visible);
gboolean gimp_channel_get_show_masked (gint32 channel_ID);
void gimp_channel_set_show_masked (gint32 channel_ID,
gboolean show_masked);
gdouble gimp_channel_get_opacity (gint32 channel_ID);
void gimp_channel_set_opacity (gint32 channel_ID,
gdouble opacity);
void gimp_channel_get_color (gint32 channel_ID,
guchar *red,
guchar *green,
guchar *blue);
void gimp_channel_set_color (gint32 channel_ID,
guchar red,
guchar green,
guchar blue);
gint gimp_channel_get_tattoo (gint32 channel_ID);
void gimp_channel_set_tattoo (gint32 channel_ID,
gint tattoo);
#ifdef __cplusplus

View File

@ -63,31 +63,31 @@ typedef struct
GtkWidget *scrolled_win;
/* the currently selected procedure */
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
gint selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GParamDef *selected_params;
GParamDef *selected_return_vals;
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
GimpPDBProcType selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GimpParamDef *selected_params;
GimpParamDef *selected_return_vals;
void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals);
void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
} dbbrowser_t;
@ -115,18 +115,18 @@ GList * proc_table = NULL;
* console_entry != NULL => called from the script-fu-console
*/
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals))
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals))
{
dbbrowser_t* dbbrowser;

108
libgimp/gimpproceduraldb.c Normal file
View File

@ -0,0 +1,108 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpproceduraldb.c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "gimp.h"
gboolean
gimp_procedural_db_proc_info (gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
gchar **copyright,
gchar **date,
GimpPDBProcType *proc_type,
gint *num_args,
gint *num_values,
GimpParamDef **args,
GimpParamDef **return_vals)
{
gint i;
gboolean success = TRUE;
success = _gimp_procedural_db_proc_info (procedure,
blurb,
help,
author,
copyright,
date,
proc_type,
num_args,
num_values);
if (success)
{
*args = g_new (GimpParamDef, *num_args);
*return_vals = g_new (GimpParamDef, *num_values);
for (i = 0; i < *num_args; i++)
{
if (! gimp_procedural_db_proc_arg (procedure,
i,
&(*args)[i].type,
&(*args)[i].name,
&(*args)[i].description))
{
g_free (*args);
g_free (*return_vals);
return FALSE;
}
}
for (i = 0; i < *num_values; i++)
{
if (! gimp_procedural_db_proc_val (procedure,
i,
&(*return_vals)[i].type,
&(*return_vals)[i].name,
&(*return_vals)[i].description))
{
g_free (*args);
g_free (*return_vals);
return FALSE;
}
}
}
return success;
}
void
gimp_procedural_db_get_data (gchar *identifier,
gpointer data)
{
gint size;
_gimp_procedural_db_get_data (identifier,
&size,
data);
}
void
gimp_procedural_db_set_data (gchar *identifier,
gpointer data,
guint32 bytes)
{
_gimp_procedural_db_set_data (identifier,
bytes,
data);
}

View File

@ -0,0 +1,54 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpproceduraldb.h
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_PROCEDURAL_DB_H__
#define __GIMP_PROCEDURAL_DB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gboolean gimp_procedural_db_proc_info (gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
gchar **copyright,
gchar **date,
GimpPDBProcType *proc_type,
gint *num_args,
gint *num_values,
GimpParamDef **params,
GimpParamDef **return_vals);
void gimp_procedural_db_get_data (gchar *identifier,
gpointer data);
void gimp_procedural_db_set_data (gchar *identifier,
gpointer data,
guint32 length);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_PROCEDURAL_DB_H__ */

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpproceduraldb_pdb.c
*
@ -11,7 +11,7 @@
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@ -19,109 +19,57 @@
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_procedural_db_set_data (gchar *id,
gpointer data,
guint32 length)
gimp_procedural_db_dump (gchar *filename)
{
GimpParam *return_vals;
int nreturn_vals;
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_procedural_db_set_data",
return_vals = gimp_run_procedure ("gimp_procedural_db_dump",
&nreturn_vals,
PARAM_STRING, id,
PARAM_INT32, length,
PARAM_INT8ARRAY, data,
PARAM_STRING, filename,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
guint32
gimp_procedural_db_get_data_size (gchar *id)
{
GimpParam *return_vals;
gint nreturn_vals;
guint32 length;
return_vals = gimp_run_procedure ("gimp_procedural_db_get_data_size",
&nreturn_vals,
PARAM_STRING, id,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
length= return_vals[1].data.d_int32;
else
length= 0;
gimp_destroy_params (return_vals, nreturn_vals);
return length;
}
void
gimp_procedural_db_get_data (gchar *id,
gpointer data)
{
GimpParam *return_vals;
gint nreturn_vals;
gint length;
gchar *returned_data;
return_vals = gimp_run_procedure ("gimp_procedural_db_get_data",
&nreturn_vals,
PARAM_STRING, id,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
length = return_vals[1].data.d_int32;
returned_data = (gchar *) return_vals[2].data.d_int8array;
memcpy (data, returned_data, length);
}
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_procedural_db_query (gchar *name_regexp,
gchar *blurb_regexp,
gchar *help_regexp,
gchar *author_regexp,
gchar *copyright_regexp,
gchar *date_regexp,
gchar *proc_type_regexp,
gint *nprocs,
gimp_procedural_db_query (gchar *name,
gchar *blurb,
gchar *help,
gchar *author,
gchar *copyright,
gchar *date,
gchar *proc_type,
gint *num_matches,
gchar ***proc_names)
{
GimpParam *return_vals;
GParam *return_vals;
gint nreturn_vals;
gint i;
return_vals = gimp_run_procedure ("gimp_procedural_db_query",
&nreturn_vals,
PARAM_STRING, name_regexp,
PARAM_STRING, blurb_regexp,
PARAM_STRING, help_regexp,
PARAM_STRING, author_regexp,
PARAM_STRING, copyright_regexp,
PARAM_STRING, date_regexp,
PARAM_STRING, proc_type_regexp,
PARAM_STRING, name,
PARAM_STRING, blurb,
PARAM_STRING, help,
PARAM_STRING, author,
PARAM_STRING, copyright,
PARAM_STRING, date,
PARAM_STRING, proc_type,
PARAM_END);
*nprocs = 0;
*num_matches = 0;
*proc_names = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*nprocs = return_vals[1].data.d_int32;
*proc_names = g_new (gchar*, *nprocs);
for (i = 0; i < *nprocs; i++)
*num_matches = return_vals[1].data.d_int32;
*proc_names = g_new (gchar *, *num_matches);
for (i = 0; i < *num_matches; i++)
(*proc_names)[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
}
@ -129,125 +77,174 @@ gimp_procedural_db_query (gchar *name_regexp,
}
gboolean
gimp_procedural_db_proc_arg (gchar *proc_name,
gint nth_arg,
GimpParamDef *param)
_gimp_procedural_db_proc_info (gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
gchar **copyright,
gchar **date,
GimpPDBProcType *proc_type,
gint *num_args,
gint *num_values)
{
GimpParam *return_vals;
GParam *return_vals;
gint nreturn_vals;
gboolean success;
gboolean success = FALSE;
return_vals = gimp_run_procedure ("gimp_procedural_db_proc_info",
&nreturn_vals,
PARAM_STRING, procedure,
PARAM_END);
success = (return_vals[0].data.d_status == STATUS_SUCCESS);
if (success)
{
*blurb = g_strdup (return_vals[1].data.d_string);
*help = g_strdup (return_vals[2].data.d_string);
*author = g_strdup (return_vals[3].data.d_string);
*copyright = g_strdup (return_vals[4].data.d_string);
*date = g_strdup (return_vals[5].data.d_string);
*proc_type = return_vals[6].data.d_int32;
*num_args = return_vals[7].data.d_int32;
*num_values = return_vals[8].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gboolean
gimp_procedural_db_proc_arg (gchar *procedure,
gint arg_num,
GimpPDBArgType *arg_type,
gchar **arg_name,
gchar **arg_desc)
{
GParam *return_vals;
gint nreturn_vals;
gboolean success = FALSE;
return_vals = gimp_run_procedure ("gimp_procedural_db_proc_arg",
&nreturn_vals,
PARAM_STRING, proc_name,
PARAM_INT32, nth_arg,
PARAM_END);
PARAM_STRING, procedure,
PARAM_INT32, arg_num,
PARAM_END);
*arg_type = 0;
*arg_name = NULL;
*arg_desc = NULL;
success = (return_vals[0].data.d_status == STATUS_SUCCESS);
if (success)
{
param->type = return_vals[1].data.d_int32;
param->name = g_strdup (return_vals[2].data.d_string);
param->description = g_strdup (return_vals[3].data.d_string);
*arg_type = return_vals[1].data.d_int32;
*arg_name = g_strdup (return_vals[2].data.d_string);
*arg_desc = g_strdup (return_vals[3].data.d_string);
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gboolean
gimp_procedural_db_proc_val (gchar *proc_name,
gint nth_val,
GimpParamDef *param)
gimp_procedural_db_proc_val (gchar *procedure,
gint val_num,
GimpPDBArgType *val_type,
gchar **val_name,
gchar **val_desc)
{
GimpParam *return_vals;
GParam *return_vals;
gint nreturn_vals;
gboolean success;
gboolean success = FALSE;
return_vals = gimp_run_procedure ("gimp_procedural_db_proc_val",
&nreturn_vals,
PARAM_STRING, proc_name,
PARAM_INT32, nth_val,
PARAM_END);
PARAM_STRING, procedure,
PARAM_INT32, val_num,
PARAM_END);
*val_type = 0;
*val_name = NULL;
*val_desc = NULL;
success = (return_vals[0].data.d_status == STATUS_SUCCESS);
if (success)
{
param->type = return_vals[1].data.d_int32;
param->name = g_strdup (return_vals[2].data.d_string);
param->description = g_strdup (return_vals[3].data.d_string);
*val_type = return_vals[1].data.d_int32;
*val_name = g_strdup (return_vals[2].data.d_string);
*val_desc = g_strdup (return_vals[3].data.d_string);
}
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
gboolean
gimp_procedural_db_proc_info (gchar *proc_name,
gchar **proc_blurb,
gchar **proc_help,
gchar **proc_author,
gchar **proc_copyright,
gchar **proc_date,
gint *proc_type,
gint *nparams,
gint *nreturn_vals,
GimpParamDef **params,
GimpParamDef **return_vals)
void
_gimp_procedural_db_get_data (gchar *identifier,
gint *bytes,
guint8 **data)
{
GimpParam *ret_vals;
gint nret_vals;
gint i;
gboolean success = TRUE;
GParam *return_vals;
gint nreturn_vals;
ret_vals = gimp_run_procedure ("gimp_procedural_db_proc_info",
&nret_vals,
PARAM_STRING, proc_name,
PARAM_END);
return_vals = gimp_run_procedure ("gimp_procedural_db_get_data",
&nreturn_vals,
PARAM_STRING, identifier,
PARAM_END);
if (ret_vals[0].data.d_status == STATUS_SUCCESS)
*bytes = 0;
*data = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*proc_blurb = g_strdup (ret_vals[1].data.d_string);
*proc_help = g_strdup (ret_vals[2].data.d_string);
*proc_author = g_strdup (ret_vals[3].data.d_string);
*proc_copyright = g_strdup (ret_vals[4].data.d_string);
*proc_date = g_strdup (ret_vals[5].data.d_string);
*proc_type = ret_vals[6].data.d_int32;
*nparams = ret_vals[7].data.d_int32;
*nreturn_vals = ret_vals[8].data.d_int32;
*params = g_new (GimpParamDef, *nparams);
*return_vals = g_new (GimpParamDef, *nreturn_vals);
for (i = 0; i < *nparams; i++)
{
if (! gimp_procedural_db_proc_arg (proc_name, i, &(*params)[i]))
{
g_free (*params);
g_free (*return_vals);
gimp_destroy_params (ret_vals, nret_vals);
return FALSE;
}
}
for (i = 0; i < *nreturn_vals; i++)
{
if (! gimp_procedural_db_proc_val (proc_name, i, &(*return_vals)[i]))
{
g_free (*params);
g_free (*return_vals);
gimp_destroy_params (ret_vals, nret_vals);
return FALSE;
}
}
*bytes = return_vals[1].data.d_int32;
*data = g_new (guint8, *bytes);
memcpy (*data, return_vals[2].data.d_int8array,
*bytes * sizeof (guint8));
}
else
success = FALSE;
gimp_destroy_params (ret_vals, nret_vals);
return success;
gimp_destroy_params (return_vals, nreturn_vals);
}
gint
gimp_procedural_db_get_data_size (gchar *identifier)
{
GParam *return_vals;
gint nreturn_vals;
gint bytes = 0;
return_vals = gimp_run_procedure ("gimp_procedural_db_get_data_size",
&nreturn_vals,
PARAM_STRING, identifier,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
bytes = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return bytes;
}
void
_gimp_procedural_db_set_data (gchar *identifier,
gint bytes,
guint8 *data)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_procedural_db_set_data",
&nreturn_vals,
PARAM_STRING, identifier,
PARAM_INT32, bytes,
PARAM_INT8ARRAY, data,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpproceduraldb_pdb.h
*
@ -7,17 +7,19 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_PROCEDURAL_DB_PDB_H__
#define __GIMP_PROCEDURAL_DB_PDB_H__
@ -29,69 +31,46 @@ extern "C" {
/* For information look into the C source or the html documentation */
/* Specify a range of data to be associated with 'id'.
* The data will exist for as long as the main gimp
* application is running.
*/
void gimp_procedural_db_set_data (gchar *id,
gpointer data,
guint32 length);
/* Retrieve the piece of data stored within the main
* gimp application specified by 'id'. The data is
* stored in the supplied buffer. Make sure enough
* space is allocated.
*/
void gimp_procedural_db_get_data (gchar *id,
gpointer data);
void gimp_procedural_db_dump (gchar *filename);
void gimp_procedural_db_query (gchar *name,
gchar *blurb,
gchar *help,
gchar *author,
gchar *copyright,
gchar *date,
gchar *proc_type,
gint *num_matches,
gchar ***proc_names);
gboolean _gimp_procedural_db_proc_info (gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
gchar **copyright,
gchar **date,
GimpPDBProcType *proc_type,
gint *num_args,
gint *num_values);
gboolean gimp_procedural_db_proc_arg (gchar *procedure,
gint arg_num,
GimpPDBArgType *arg_type,
gchar **arg_name,
gchar **arg_desc);
gboolean gimp_procedural_db_proc_val (gchar *procedure,
gint val_num,
GimpPDBArgType *val_type,
gchar **val_name,
gchar **val_desc);
void _gimp_procedural_db_get_data (gchar *identifier,
gint *bytes,
guint8 **data);
gint gimp_procedural_db_get_data_size (gchar *identifier);
void _gimp_procedural_db_set_data (gchar *identifier,
gint bytes,
guint8 *data);
/* Get the size in bytes of the data stored by a gimp_get_data
* id. As size of zero may indicate that there is no such
* identifier in the database.
*/
guint32 gimp_procedural_db_get_data_size (gchar *id);
/* Query the gimp application's procedural database.
* The arguments are regular expressions which select
* which procedure names will be returned in 'proc_names'.
*/
void gimp_procedural_db_query (gchar *name_regexp,
gchar *blurb_regexp,
gchar *help_regexp,
gchar *author_regexp,
gchar *copyright_regexp,
gchar *date_regexp,
gchar *proc_type_regexp,
gint *nprocs,
gchar ***proc_names);
gboolean gimp_procedural_db_proc_arg (gchar *proc_name,
gint nth_arg,
GimpParamDef *param);
gboolean gimp_procedural_db_proc_val (gchar *proc_name,
gint nth_val,
GimpParamDef *param);
/* Query the gimp application's procedural database
* regarding a particular procedure.
*/
gboolean gimp_procedural_db_proc_info (gchar *proc_name,
gchar **proc_blurb,
gchar **proc_help,
gchar **proc_author,
gchar **proc_copyright,
gchar **proc_date,
gint *proc_type,
gint *nparams,
gint *nreturn_vals,
GimpParamDef **params,
GimpParamDef **return_vals);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_PROCEDURAL_DB_PDB_H__ */

View File

@ -63,31 +63,31 @@ typedef struct
GtkWidget *scrolled_win;
/* the currently selected procedure */
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
gint selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GParamDef *selected_params;
GParamDef *selected_return_vals;
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
GimpPDBProcType selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GimpParamDef *selected_params;
GimpParamDef *selected_return_vals;
void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals);
void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
} dbbrowser_t;
@ -115,18 +115,18 @@ GList * proc_table = NULL;
* console_entry != NULL => called from the script-fu-console
*/
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals))
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals))
{
dbbrowser_t* dbbrowser;

View File

@ -32,7 +32,7 @@ extern "C" {
gboolean gimp_selection_bounds (gint32 image_ID,
gboolean *is_empty,
gboolean *none_empty,
gint *x1,
gint *y1,
gint *x2,

View File

@ -1,8 +1,7 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpunit_pdb.c
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -12,7 +11,7 @@
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@ -20,6 +19,8 @@
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
@ -28,20 +29,18 @@ _gimp_unit_get_number_of_units (void)
{
GParam *return_vals;
gint nreturn_vals;
gint number;
gint num_units = GIMP_UNIT_END;
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_units",
&nreturn_vals,
PARAM_END);
number = GIMP_UNIT_END;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
number = return_vals[1].data.d_int32;
num_units = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return number;
return num_units;
}
gint
@ -49,20 +48,18 @@ _gimp_unit_get_number_of_built_in_units (void)
{
GParam *return_vals;
gint nreturn_vals;
gint number;
gint num_units = GIMP_UNIT_END;
return_vals = gimp_run_procedure ("gimp_unit_get_number_of_built_in_units",
&nreturn_vals,
PARAM_END);
&nreturn_vals,
PARAM_END);
number = GIMP_UNIT_END;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
number = return_vals[1].data.d_int32;
num_units = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return number;
return num_units;
}
GimpUnit
@ -76,58 +73,49 @@ _gimp_unit_new (gchar *identifier,
{
GParam *return_vals;
gint nreturn_vals;
GimpUnit unit;
GimpUnit unit_ID = GIMP_UNIT_INCH;
return_vals = gimp_run_procedure ("gimp_unit_new",
&nreturn_vals,
PARAM_STRING, identifier,
PARAM_FLOAT, factor,
PARAM_INT32, digits,
PARAM_FLOAT, factor,
PARAM_INT32, digits,
PARAM_STRING, symbol,
PARAM_STRING, abbreviation,
PARAM_STRING, singular,
PARAM_STRING, plural,
PARAM_END);
unit = GIMP_UNIT_INCH;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
unit = return_vals[1].data.d_int32;
unit_ID = return_vals[1].data.d_unit;
gimp_destroy_params (return_vals, nreturn_vals);
return unit;
return unit_ID;
}
gboolean
_gimp_unit_get_deletion_flag (GimpUnit unit)
_gimp_unit_get_deletion_flag (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean flag;
g_return_val_if_fail (unit >= GIMP_UNIT_PIXEL, TRUE);
if (unit < GIMP_UNIT_END)
return FALSE;
gboolean deletion_flag = TRUE;
return_vals = gimp_run_procedure ("gimp_unit_get_deletion_flag",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
flag = TRUE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
flag = return_vals[1].data.d_int32 ? TRUE : FALSE;
deletion_flag = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return flag;
return deletion_flag;
}
void
_gimp_unit_set_deletion_flag (GimpUnit unit,
_gimp_unit_set_deletion_flag (GimpUnit unit_ID,
gboolean deletion_flag)
{
GParam *return_vals;
@ -135,27 +123,45 @@ _gimp_unit_set_deletion_flag (GimpUnit unit,
return_vals = gimp_run_procedure ("gimp_unit_set_deletion_flag",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_INT32, deletion_flag,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gdouble
_gimp_unit_get_factor (GimpUnit unit)
gchar *
_gimp_unit_get_identifier (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *identifier = NULL;
gdouble factor;
return_vals = gimp_run_procedure ("gimp_unit_get_identifier",
&nreturn_vals,
PARAM_INT32, unit_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
identifier = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return identifier;
}
gdouble
_gimp_unit_get_factor (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gdouble factor = 1.0;
return_vals = gimp_run_procedure ("gimp_unit_get_factor",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
factor = 1.0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
factor = return_vals[1].data.d_float;
@ -165,19 +171,17 @@ _gimp_unit_get_factor (GimpUnit unit)
}
gint
_gimp_unit_get_digits (GimpUnit unit)
_gimp_unit_get_digits (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint digits;
gint digits = 2;
return_vals = gimp_run_procedure ("gimp_unit_get_digits",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
digits = 2; /* == gimp_unit_defs[GIMP_UNIT_INCH].digits */
if (return_vals[0].data.d_status == STATUS_SUCCESS)
digits = return_vals[1].data.d_int32;
@ -186,112 +190,82 @@ _gimp_unit_get_digits (GimpUnit unit)
return digits;
}
gchar *
_gimp_unit_get_identifier (GimpUnit unit)
{
GParam *return_vals;
gint nreturn_vals;
gchar *identifier;
return_vals = gimp_run_procedure ("gimp_unit_get_identifier",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_END);
identifier = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
identifier = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return identifier ? identifier : g_strdup ("");
}
gchar *
_gimp_unit_get_symbol (GimpUnit unit)
_gimp_unit_get_symbol (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *symbol;
gchar *symbol = NULL;
return_vals = gimp_run_procedure ("gimp_unit_get_symbol",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
symbol = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
symbol = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return symbol ? symbol : g_strdup ("");
return symbol;
}
gchar *
_gimp_unit_get_abbreviation (GimpUnit unit)
_gimp_unit_get_abbreviation (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *abbreviation;
gchar *abbreviation = NULL;
return_vals = gimp_run_procedure ("gimp_unit_get_abbreviation",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
abbreviation = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
abbreviation = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return abbreviation ? abbreviation : g_strdup ("");
return abbreviation;
}
gchar *
_gimp_unit_get_singular (GimpUnit unit)
_gimp_unit_get_singular (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *singular;
gchar *singular = NULL;
return_vals = gimp_run_procedure ("gimp_unit_get_singular",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
singular = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
singular = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return singular ? singular : g_strdup ("");
return singular;
}
gchar *
_gimp_unit_get_plural (GimpUnit unit)
_gimp_unit_get_plural (GimpUnit unit_ID)
{
GParam *return_vals;
gint nreturn_vals;
gchar *plural;
gchar *plural = NULL;
return_vals = gimp_run_procedure ("gimp_unit_get_plural",
&nreturn_vals,
PARAM_INT32, unit,
PARAM_INT32, unit_ID,
PARAM_END);
plural = NULL;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
plural = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return plural ? plural : g_strdup ("");
return plural;
}

View File

@ -1,8 +1,7 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpunit_pdb.h
* Copyright (C) 1999-2000 Michael Natterer <mitch@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,6 +19,8 @@
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_UNIT_PDB_H__
#define __GIMP_UNIT_PDB_H__
@ -30,31 +31,25 @@ extern "C" {
/* For information look into the C source or the html documentation */
gint _gimp_unit_get_number_of_units (void);
gint _gimp_unit_get_number_of_built_in_units (void);
GimpUnit _gimp_unit_new (gchar *identifier,
gdouble factor,
gint digits,
gchar *symbol,
gchar *abbreviation,
gchar *singular,
gchar *plural);
gboolean _gimp_unit_get_deletion_flag (GimpUnit unit);
void _gimp_unit_set_deletion_flag (GimpUnit unit,
gboolean deletion_flag);
gdouble _gimp_unit_get_factor (GimpUnit unit);
gint _gimp_unit_get_digits (GimpUnit unit);
gchar * _gimp_unit_get_identifier (GimpUnit unit);
gchar * _gimp_unit_get_symbol (GimpUnit unit);
gchar * _gimp_unit_get_abbreviation (GimpUnit unit);
gchar * _gimp_unit_get_singular (GimpUnit unit);
gchar * _gimp_unit_get_plural (GimpUnit unit);
gint _gimp_unit_get_number_of_units (void);
gint _gimp_unit_get_number_of_built_in_units (void);
GimpUnit _gimp_unit_new (gchar *identifier,
gdouble factor,
gint digits,
gchar *symbol,
gchar *abbreviation,
gchar *singular,
gchar *plural);
gboolean _gimp_unit_get_deletion_flag (GimpUnit unit_ID);
void _gimp_unit_set_deletion_flag (GimpUnit unit_ID,
gboolean deletion_flag);
gchar* _gimp_unit_get_identifier (GimpUnit unit_ID);
gdouble _gimp_unit_get_factor (GimpUnit unit_ID);
gint _gimp_unit_get_digits (GimpUnit unit_ID);
gchar* _gimp_unit_get_symbol (GimpUnit unit_ID);
gchar* _gimp_unit_get_abbreviation (GimpUnit unit_ID);
gchar* _gimp_unit_get_singular (GimpUnit unit_ID);
gchar* _gimp_unit_get_plural (GimpUnit unit_ID);
#ifdef __cplusplus

View File

@ -63,31 +63,31 @@ typedef struct
GtkWidget *scrolled_win;
/* the currently selected procedure */
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
gint selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GParamDef *selected_params;
GParamDef *selected_return_vals;
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
GimpPDBProcType selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GimpParamDef *selected_params;
GimpParamDef *selected_return_vals;
void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals);
void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
} dbbrowser_t;
@ -115,18 +115,18 @@ GList * proc_table = NULL;
* console_entry != NULL => called from the script-fu-console
*/
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals))
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals))
{
dbbrowser_t* dbbrowser;

View File

@ -24,15 +24,15 @@
#include <gtk/gtk.h>
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals));
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals));

View File

@ -63,31 +63,31 @@ typedef struct
GtkWidget *scrolled_win;
/* the currently selected procedure */
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
gint selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GParamDef *selected_params;
GParamDef *selected_return_vals;
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
GimpPDBProcType selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GimpParamDef *selected_params;
GimpParamDef *selected_return_vals;
void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals);
void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
} dbbrowser_t;
@ -115,18 +115,18 @@ GList * proc_table = NULL;
* console_entry != NULL => called from the script-fu-console
*/
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals))
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals))
{
dbbrowser_t* dbbrowser;

View File

@ -24,15 +24,15 @@
#include <gtk/gtk.h>
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals));
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals));

View File

@ -63,31 +63,31 @@ typedef struct
GtkWidget *scrolled_win;
/* the currently selected procedure */
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
gint selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GParamDef *selected_params;
GParamDef *selected_return_vals;
gchar *selected_proc_name;
gchar *selected_scheme_proc_name;
gchar *selected_proc_blurb;
gchar *selected_proc_help;
gchar *selected_proc_author;
gchar *selected_proc_copyright;
gchar *selected_proc_date;
GimpPDBProcType selected_proc_type;
gint selected_nparams;
gint selected_nreturn_vals;
GimpParamDef *selected_params;
GimpParamDef *selected_return_vals;
void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals);
void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
} dbbrowser_t;
@ -115,18 +115,18 @@ GList * proc_table = NULL;
* console_entry != NULL => called from the script-fu-console
*/
GtkWidget *
gimp_db_browser (void (* apply_callback) (gchar *selected_proc_name,
gchar *selected_scheme_proc_name,
gchar *selected_proc_blurb,
gchar *selected_proc_help,
gchar *selected_proc_author,
gchar *selected_proc_copyright,
gchar *selected_proc_date,
gint selected_proc_type,
gint selected_nparams,
gint selected_nreturn_vals,
GParamDef *selected_params,
GParamDef *selected_return_vals))
gimp_db_browser (void (* apply_callback) (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals))
{
dbbrowser_t* dbbrowser;

View File

@ -73,23 +73,21 @@ static gint32 g_current_image_id;
gint p_call_plugin(char *plugin_name, gint32 image_id, gint32 layer_id, GRunModeType run_mode)
{
GDrawable *l_drawable;
GParam *l_ret_params;
GParam *l_argv;
gint l_retvals;
int l_idx;
int l_nparams;
int l_nreturn_vals;
int l_proc_type;
char *l_proc_blurb;
char *l_proc_help;
char *l_proc_author;
char *l_proc_copyright;
char *l_proc_date;
GParamDef *l_params;
GParamDef *l_return_vals;
GimpDrawable *l_drawable;
GimpParam *l_ret_params;
GimpParam *l_argv;
gint l_retvals;
gint l_idx;
gint l_nparams;
gint l_nreturn_vals;
GimpPDBProcType l_proc_type;
gchar *l_proc_blurb;
gchar *l_proc_help;
gchar *l_proc_author;
gchar *l_proc_copyright;
gchar *l_proc_date;
GimpParamDef *l_params;
GimpParamDef *l_return_vals;
l_drawable = gimp_drawable_get(layer_id); /* use the background layer */
@ -262,16 +260,16 @@ void p_set_data(char *key, gint plugin_data_len)
gint p_procedure_available(char *proc_name, t_proc_type ptype)
{
int l_nparams;
int l_nreturn_vals;
int l_proc_type;
char *l_proc_blurb;
char *l_proc_help;
char *l_proc_author;
char *l_proc_copyright;
char *l_proc_date;
GParamDef *l_params;
GParamDef *l_return_vals;
gint l_nparams;
gint l_nreturn_vals;
GimpPDBProcType l_proc_type;
gchar *l_proc_blurb;
gchar *l_proc_help;
gchar *l_proc_author;
gchar *l_proc_copyright;
gchar *l_proc_date;
GimpParamDef *l_params;
GimpParamDef *l_return_vals;
gint l_rc;
l_rc = 0;
@ -279,17 +277,17 @@ gint p_procedure_available(char *proc_name, t_proc_type ptype)
/* Query the gimp application's procedural database
* regarding a particular procedure.
*/
if(gimp_query_procedure (proc_name,
&l_proc_blurb,
&l_proc_help,
&l_proc_author,
&l_proc_copyright,
&l_proc_date,
&l_proc_type,
&l_nparams,
&l_nreturn_vals,
&l_params,
&l_return_vals))
if (gimp_query_procedure (proc_name,
&l_proc_blurb,
&l_proc_help,
&l_proc_author,
&l_proc_copyright,
&l_proc_date,
&l_proc_type,
&l_nparams,
&l_nreturn_vals,
&l_params,
&l_return_vals))
{
/* procedure found in PDB */
if(gap_debug) fprintf(stderr, "DEBUG: found in PDB %s\n", proc_name);

View File

@ -342,18 +342,18 @@ script_fu_close_callback (GtkWidget *widget,
}
void
apply_callback (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
int proc_type,
int nparams,
int nreturn_vals,
GParamDef *params,
GParamDef *return_vals )
apply_callback (gchar *proc_name,
gchar *scheme_proc_name,
gchar *proc_blurb,
gchar *proc_help,
gchar *proc_author,
gchar *proc_copyright,
gchar *proc_date,
GimpPDBProcType proc_type,
gint nparams,
gint nreturn_vals,
GimpParamDef *params,
GimpParamDef *return_vals)
{
gint i;
GString *text;

View File

@ -296,21 +296,21 @@ init_gimp (void)
static void
init_procedures (void)
{
gchar **proc_list;
gchar *proc_name;
gchar *arg_name;
gchar *proc_blurb;
gchar *proc_help;
gchar *proc_author;
gchar *proc_copyright;
gchar *proc_date;
gint proc_type;
gint nparams;
gint nreturn_vals;
GParamDef *params;
GParamDef *return_vals;
gint num_procs;
gint i;
gchar **proc_list;
gchar *proc_name;
gchar *arg_name;
gchar *proc_blurb;
gchar *proc_help;
gchar *proc_author;
gchar *proc_copyright;
gchar *proc_date;
GimpPDBProcType proc_type;
gint nparams;
gint nreturn_vals;
GimpParamDef *params;
GimpParamDef *return_vals;
gint num_procs;
gint i;
/* register the database execution procedure */
init_lsubr ("gimp-proc-db-call", marshall_proc_db_call);
@ -486,29 +486,29 @@ lprin1s (LISP exp,
static LISP
marshall_proc_db_call (LISP a)
{
GParam *args;
GParam *values = NULL;
int nvalues;
char *proc_name;
char *proc_blurb;
char *proc_help;
char *proc_author;
char *proc_copyright;
char *proc_date;
int proc_type;
int nparams;
int nreturn_vals;
GParamDef *params;
GParamDef *return_vals;
char error_str[256];
int i;
int success = TRUE;
LISP color_list;
LISP intermediate_val;
LISP return_val = NIL;
char *string;
int string_len;
LISP a_saved;
GimpParam *args;
GimpParam *values = NULL;
gint nvalues;
gchar *proc_name;
gchar *proc_blurb;
gchar *proc_help;
gchar *proc_author;
gchar *proc_copyright;
gchar *proc_date;
GimpPDBProcType proc_type;
gint nparams;
gint nreturn_vals;
GimpParamDef *params;
GimpParamDef *return_vals;
gchar error_str[256];
gint i;
gint success = TRUE;
LISP color_list;
LISP intermediate_val;
LISP return_val = NIL;
gchar *string;
gint string_len;
LISP a_saved;
/* Save a in case it is needed for an error message. */
a_saved = a;

View File

@ -57,16 +57,16 @@ extern gint xjt_debug;
gint p_procedure_available(gchar *proc_name)
{
int l_nparams;
int l_nreturn_vals;
int l_proc_type;
int l_nparams;
int l_nreturn_vals;
GimpPDBProcType l_proc_type;
gchar *l_proc_blurb;
gchar *l_proc_help;
gchar *l_proc_author;
gchar *l_proc_copyright;
gchar *l_proc_date;
GParamDef *l_params;
GParamDef *l_return_vals;
GimpParamDef *l_params;
GimpParamDef *l_return_vals;
gint l_rc;
l_rc = 0;

View File

@ -587,7 +587,7 @@ CODE
procedural_db_proc_arg procedural_db_proc_val
procedural_db_get_data procedural_db_get_data_size
procedural_db_set_data);
%exports = (app => [@procs], lib => [@procs[1..2, 5..7]]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Procedural database';