Commit 1dac2783 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/pdb/Makefile.am new files containing the functions operating on *one*

2006-03-31  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/gimpprocedure.[ch]: new files containing the functions
	operating on *one* procedure. Factored out of procedural_db.[ch]
	and renamed to gimp_procedure_foo().

	* app/pdb/procedural_db.[ch]: removed them here.

	* app/pdb/procedural-db-query.c
	* app/batch.c
	* app/actions/plug-in-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimppdbprogress.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-proc-def.[ch]
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-ins.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimppdbdialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/app.pl: changed #includes and function calls
	accordingly. No logic changed.

	* app/pdb/*_cmds.c: regenerated.
parent 5e969a4a
2006-03-31 Michael Natterer <mitch@gimp.org>
* app/pdb/Makefile.am
* app/pdb/gimpprocedure.[ch]: new files containing the functions
operating on *one* procedure. Factored out of procedural_db.[ch]
and renamed to gimp_procedure_foo().
* app/pdb/procedural_db.[ch]: removed them here.
* app/pdb/procedural-db-query.c
* app/batch.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/core/gimppdbprogress.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-proc-def.[ch]
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-ins.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimphelp.c
* app/widgets/gimppdbdialog.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/app.pl: changed #includes and function calls
accordingly. No logic changed.
* app/pdb/*_cmds.c: regenerated.
2006-03-31 Sven Neumann <sven@gimp.org>
* plug-ins/common/psd_save.c: applied a patch from Guillermo
......
......@@ -37,6 +37,8 @@
#include "plug-in/plug-in-run.h"
#include "plug-in/plug-in-proc-def.h"
#include "pdb/procedural_db.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h"
......@@ -64,7 +66,7 @@ plug_in_run_cmd_callback (GtkAction *action,
gpointer data)
{
Gimp *gimp;
ProcRecord *proc_rec;
ProcRecord *procedure;
Argument *args;
gint n_args = 0;
GimpDisplay *display = NULL;
......@@ -73,23 +75,23 @@ plug_in_run_cmd_callback (GtkAction *action,
if (! gimp)
return;
proc_rec = &proc_def->db_info;
procedure = &proc_def->db_info;
args = procedural_db_arguments (proc_rec);
args = gimp_procedure_get_arguments (procedure);
/* initialize the first argument */
g_value_set_int (&args[n_args].value, GIMP_RUN_INTERACTIVE);
n_args++;
switch (proc_rec->proc_type)
switch (procedure->proc_type)
{
case GIMP_EXTENSION:
break;
case GIMP_PLUGIN:
case GIMP_TEMPORARY:
if (proc_rec->num_args > n_args &&
proc_rec->args[n_args].type == GIMP_PDB_IMAGE)
if (procedure->num_args > n_args &&
procedure->args[n_args].type == GIMP_PDB_IMAGE)
{
display = action_data_get_display (data);
......@@ -98,8 +100,8 @@ plug_in_run_cmd_callback (GtkAction *action,
gimp_value_set_image (&args[n_args].value, display->image);
n_args++;
if (proc_rec->num_args > n_args &&
proc_rec->args[n_args].type == GIMP_PDB_DRAWABLE)
if (procedure->num_args > n_args &&
procedure->args[n_args].type == GIMP_PDB_DRAWABLE)
{
GimpDrawable *drawable;
......@@ -129,20 +131,20 @@ plug_in_run_cmd_callback (GtkAction *action,
/* run the plug-in procedure */
plug_in_run (gimp, gimp_get_user_context (gimp),
GIMP_PROGRESS (display),
proc_rec, args, n_args, FALSE, TRUE,
procedure, args, n_args, FALSE, TRUE,
display ? gimp_display_get_ID (display) : -1);
/* remember only "standard" plug-ins */
if (proc_rec->proc_type == GIMP_PLUGIN &&
proc_rec->num_args >= 3 &&
proc_rec->args[1].type == GIMP_PDB_IMAGE &&
proc_rec->args[2].type == GIMP_PDB_DRAWABLE)
if (procedure->proc_type == GIMP_PLUGIN &&
procedure->num_args >= 3 &&
procedure->args[1].type == GIMP_PDB_IMAGE &&
procedure->args[2].type == GIMP_PDB_DRAWABLE)
{
gimp_set_last_plug_in (gimp, proc_def);
}
error:
procedural_db_destroy_args (args, proc_rec->num_args, TRUE);
procedural_db_destroy_args (args, procedure->num_args, TRUE);
}
void
......
......@@ -40,6 +40,7 @@
#include "core/gimpstrokedesc.h"
#include "core/gimptoolinfo.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
#include "plug-in/plug-in-run.h"
......@@ -310,19 +311,19 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
gpointer data)
{
GimpImage *image;
ProcRecord *proc_rec;
ProcRecord *procedure;
Argument *args;
GimpDisplay *display;
return_if_no_image (image, data);
if (value)
proc_rec = procedural_db_lookup (image->gimp,
"plug-in-sel2path-advanced");
procedure = procedural_db_lookup (image->gimp,
"plug-in-sel2path-advanced");
else
proc_rec = procedural_db_lookup (image->gimp,
"plug-in-sel2path");
procedure = procedural_db_lookup (image->gimp,
"plug-in-sel2path");
if (! proc_rec)
if (! procedure)
{
g_message ("Selection to path procedure lookup failed.");
return;
......@@ -331,7 +332,7 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
display = gimp_context_get_display (action_data_get_context (data));
/* plug-in arguments as if called by <Image>/Filters/... */
args = procedural_db_arguments (proc_rec);
args = gimp_procedure_get_arguments (procedure);
g_value_set_enum (&args[0].value, GIMP_RUN_INTERACTIVE);
gimp_value_set_image (&args[1].value, image);
......@@ -339,10 +340,10 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
plug_in_run (image->gimp, action_data_get_context (data),
GIMP_PROGRESS (display),
proc_rec, args, 3 /* not proc_rec->num_args */,
procedure, args, 3 /* not procedure->num_args */,
FALSE, TRUE, display ? gimp_display_get_ID (display) : 0);
procedural_db_destroy_args (args, proc_rec->num_args, TRUE);
procedural_db_destroy_args (args, procedure->num_args, TRUE);
}
void
......
......@@ -31,6 +31,7 @@
#include "batch.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
#include "gimp-intl.h"
......@@ -132,7 +133,7 @@ batch_run_cmd (Gimp *gimp,
Argument *return_vals;
gint n_return_vals;
args = procedural_db_arguments (proc);
args = gimp_procedure_get_arguments (proc);
g_value_set_int (&args[0].value, run_mode);
......
......@@ -29,6 +29,7 @@
#include "core/gimpcontext.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
#include "gimppdbprogress.h"
......@@ -270,8 +271,7 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
retval = g_value_get_double (&return_vals[1].value);
}
if (return_vals)
procedural_db_destroy_args (return_vals, n_return_vals, TRUE);
procedural_db_destroy_args (return_vals, n_return_vals, TRUE);
progress->callback_busy = FALSE;
}
......
......@@ -56,6 +56,7 @@
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
#include "plug-in/plug-in.h"
......
......@@ -53,6 +53,7 @@
#include "core/gimpimagefile.h"
#include "core/gimpprogress.h"
#include "pdb/gimpprocedure.h"
#include "pdb/procedural_db.h"
#include "plug-in/plug-in.h"
......
......@@ -4,6 +4,10 @@ noinst_LIBRARIES = libapppdb.a
libapppdb_a_SOURCES = \
pdb-types.h \
\
gimpprocedure.c \
gimpprocedure.h \
\
procedural_db.c \
procedural_db.h \
procedural-db-query.c \
......
This diff is collapsed.
......@@ -24,6 +24,7 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimpprocedure.h"
#include "procedural_db.h"
#include "core/gimpparamspecs.h"
......@@ -42,111 +43,111 @@ register_brush_select_procs (Gimp *gimp)
/*
* brushes_popup
*/
procedure = procedural_db_init_proc (&brushes_popup_proc, 6, 0);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The callback PDB proc to call when brush selection is made",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("popup-title",
"popup title",
"Title to give the brush popup window",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("initial-brush",
"initial brush",
"The name of the brush to set as the first selected",
FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_FLOAT,
g_param_spec_double ("opacity",
"opacity",
"The initial opacity of the brush",
0, 100, 0,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("spacing",
"spacing",
"The initial spacing of the brush (if < 0 then use brush default spacing)",
G_MININT32, 1000, 0,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
procedure = gimp_procedure_init (&brushes_popup_proc, 6, 0);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The callback PDB proc to call when brush selection is made",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("popup-title",
"popup title",
"Title to give the brush popup window",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("initial-brush",
"initial brush",
"The name of the brush to set as the first selected",
FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_FLOAT,
g_param_spec_double ("opacity",
"opacity",
"The initial opacity of the brush",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("spacing",
"spacing",
"The initial spacing of the brush (if < 0 then use brush default spacing)",
G_MININT32, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* brushes_close_popup
*/
procedure = procedural_db_init_proc (&brushes_close_popup_proc, 1, 0);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this popup",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&brushes_close_popup_proc, 1, 0);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this popup",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* brushes_set_popup
*/
procedure = procedural_db_init_proc (&brushes_set_popup_proc, 5, 0);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this popup",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-name",
"brush name",
"The name of the brush to set as selected",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_FLOAT,
g_param_spec_double ("opacity",
"opacity",
"The initial opacity of the brush",
0, 100, 0,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("spacing",
"spacing",
"The initial spacing of the brush (if < 0 then use brush default spacing)",
G_MININT32, 1000, 0,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
procedure = gimp_procedure_init (&brushes_set_popup_proc, 5, 0);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this popup",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("brush-name",
"brush name",
"The name of the brush to set as selected",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_FLOAT,
g_param_spec_double ("opacity",
"opacity",
"The initial opacity of the brush",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("spacing",
"spacing",
"The initial spacing of the brush (if < 0 then use brush default spacing)",
G_MININT32, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_INT32,
g_param_spec_enum ("paint-mode",
"paint mode",
"The initial paint mode: { GIMP_NORMAL_MODE (0), GIMP_DISSOLVE_MODE (1), GIMP_BEHIND_MODE (2), GIMP_MULTIPLY_MODE (3), GIMP_SCREEN_MODE (4), GIMP_OVERLAY_MODE (5), GIMP_DIFFERENCE_MODE (6), GIMP_ADDITION_MODE (7), GIMP_SUBTRACT_MODE (8), GIMP_DARKEN_ONLY_MODE (9), GIMP_LIGHTEN_ONLY_MODE (10), GIMP_HUE_MODE (11), GIMP_SATURATION_MODE (12), GIMP_COLOR_MODE (13), GIMP_VALUE_MODE (14), GIMP_DIVIDE_MODE (15), GIMP_DODGE_MODE (16), GIMP_BURN_MODE (17), GIMP_HARDLIGHT_MODE (18), GIMP_SOFTLIGHT_MODE (19), GIMP_GRAIN_EXTRACT_MODE (20), GIMP_GRAIN_MERGE_MODE (21), GIMP_COLOR_ERASE_MODE (22) }",
GIMP_TYPE_LAYER_MODE_EFFECTS,
GIMP_NORMAL_MODE,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
}
......@@ -186,7 +187,7 @@ brushes_popup_invoker (ProcRecord *proc_record,
success = FALSE;
}
return procedural_db_return_values (proc_record, success);
return gimp_procedure_get_return_values (proc_record, success);
}
static ProcRecord brushes_popup_proc =
......@@ -225,7 +226,7 @@ brushes_close_popup_invoker (ProcRecord *proc_record,
success = FALSE;
}
return procedural_db_return_values (proc_record, success);
return gimp_procedure_get_return_values (proc_record, success);
}
static ProcRecord brushes_close_popup_proc =
......@@ -276,7 +277,7 @@ brushes_set_popup_invoker (ProcRecord *proc_record,
success = FALSE;
}
return procedural_db_return_values (proc_record, success);
return gimp_procedure_get_return_values (proc_record, success);
}
static ProcRecord brushes_set_popup_proc =
......
This diff is collapsed.
......@@ -25,6 +25,7 @@
#include <glib-object.h>
#include "pdb-types.h"
#include "gimpprocedure.h"
#include "procedural_db.h"
#include "core/gimpparamspecs.h"
......@@ -50,157 +51,157 @@ register_buffer_procs (Gimp *gimp)
/*
* buffers_get_list
*/
procedure = procedural_db_init_proc (&buffers_get_list_proc, 1, 2);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("filter",
"filter",
"An optional regular expression used to filter the list",
FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("num-buffers",
"num buffers",
"The number of buffers",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
procedural_db_add_return_value (procedure,
GIMP_PDB_STRINGARRAY,
g_param_spec_pointer ("buffer-list",
"buffer list",
"The list of buffer names",
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&buffers_get_list_proc, 1, 2);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("filter",
"filter",
"An optional regular expression used to filter the list",
FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("num-buffers",
"num buffers",
"The number of buffers",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
GIMP_PDB_STRINGARRAY,
g_param_spec_pointer ("buffer-list",
"buffer list",
"The list of buffer names",
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* buffer_rename
*/
procedure = procedural_db_init_proc (&buffer_rename_proc, 2, 1);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("new-name",
"new name",
"The buffer's new name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_return_value (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("real-name",
"real name",
"The real name given to the buffer",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&buffer_rename_proc, 2, 1);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("new-name",
"new name",
"The buffer's new name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("real-name",
"real name",
"The real name given to the buffer",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* buffer_delete
*/
procedure = procedural_db_init_proc (&buffer_delete_proc, 1, 0);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&buffer_delete_proc, 1, 0);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* buffer_get_width
*/
procedure = procedural_db_init_proc (&buffer_get_width_proc, 1, 1);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("width",
"width",
"The buffer width",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&buffer_get_width_proc, 1, 1);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("width",
"width",
"The buffer width",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* buffer_get_height
*/
procedure = procedural_db_init_proc (&buffer_get_height_proc, 1, 1);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
procedural_db_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("height",
"height",
"The buffer height",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
procedure = gimp_procedure_init (&buffer_get_height_proc, 1, 1);
gimp_procedure_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
GIMP_PDB_INT32,
g_param_spec_int ("height",
"height",
"The buffer height",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
procedural_db_register (gimp, procedure);
/*
* buffer_get_bytes
*/
procedure = procedural_db_init_proc (&buffer_get_bytes_proc, 1, 1);
procedural_db_add_argument (procedure,
GIMP_PDB_STRING,
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));