Sven Neumann <sven@gimp.org>

2000-06-01  Michael Natterer  <mitch@gimp.org>
	    Sven Neumann  <sven@gimp.org>

	Completed the new file structure. Yet only few of the _pdb.[ch]
	files are based upon generated code and nothing is really
	autogenerated...

	* app/Makefile.am
	* app/gdisplay_cmds.c      -> app/display_cmds.c
	* app/gimage_cmds.c        -> app/image_cmds.c
	* app/gimage_mask_cmds.c   -> app/selection_cmds.c
	* app/internal_procs.c: related change

	* libgimp/Makefile.am
	* libgimp/gimp.h
	* libgimp/gimp_pdb.h
	* libgimp/gimpdisplay_pdb.[ch]
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimpselection_pdb.[ch]: replaced with code based on files
	generated using pdbgen

	* libgimp/gimpchannelops_pdb.[ch]
	* libgimp/gimpcolor_pdb.[ch]
	* libgimp/gimpedit_pdb.[ch]
	* libgimp/gimpfloatingsel_pdb.[ch]
	* libgimp/gimpgimprc_pdb.[ch]
	* libgimp/gimptexttool_pdb.[ch]
	* libgimp/gimptools_pdb.[ch]
	* libgimp/gimpundo_pdb.[ch]: new files based on generated code

	* libgimp/gimpgradientselect.[ch]
	* libgimp/gimpimage.[ch]
	* libgimp/gimpselection.[ch]: new files wrapping around the
	autogenerated PDB wrappers as found in *_pdb.[ch]. This is necessary
	since the number of parameters or their order is different from the
	PDP calls.

	* plug-ins/common/CEL.c: plugged memleak

	* plug-ins/common/aa.c: removed compiler warning

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl
	* tools/pdbgen/pdb/gdisplay.pdb     -> display.pdb
	* tools/pdbgen/pdb/gimage.pdb       -> image.pdb
	* tools/pdbgen/pdb/gimage_mask.pdb  -> selection.pdb

	* tools/pdbgen/pdb/channel_ops.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/text_tool.pdb
	* tools/pdbgen/pdb/tools.pdb
	* tools/pdbgen/pdb/undo.pdb: made them create libgimp code
This commit is contained in:
Michael Natterer 2000-06-01 12:20:13 +00:00 committed by Michael Natterer
parent 21651c253a
commit 6be23f70fa
62 changed files with 3730 additions and 2838 deletions

View File

@ -1,3 +1,59 @@
2000-06-01 Michael Natterer <mitch@gimp.org>
Sven Neumann <sven@gimp.org>
Completed the new file structure. Yet only few of the _pdb.[ch]
files are based upon generated code and nothing is really
autogenerated...
* app/Makefile.am
* app/gdisplay_cmds.c -> app/display_cmds.c
* app/gimage_cmds.c -> app/image_cmds.c
* app/gimage_mask_cmds.c -> app/selection_cmds.c
* app/internal_procs.c: related change
* libgimp/Makefile.am
* libgimp/gimp.h
* libgimp/gimp_pdb.h
* libgimp/gimpdisplay_pdb.[ch]
* libgimp/gimpimage_pdb.[ch]
* libgimp/gimpselection_pdb.[ch]: replaced with code based on files
generated using pdbgen
* libgimp/gimpchannelops_pdb.[ch]
* libgimp/gimpcolor_pdb.[ch]
* libgimp/gimpedit_pdb.[ch]
* libgimp/gimpfloatingsel_pdb.[ch]
* libgimp/gimpgimprc_pdb.[ch]
* libgimp/gimptexttool_pdb.[ch]
* libgimp/gimptools_pdb.[ch]
* libgimp/gimpundo_pdb.[ch]: new files based on generated code
* libgimp/gimpgradientselect.[ch]
* libgimp/gimpimage.[ch]
* libgimp/gimpselection.[ch]: new files wrapping around the
autogenerated PDB wrappers as found in *_pdb.[ch]. This is necessary
since the number of parameters or their order is different from the
PDP calls.
* plug-ins/common/CEL.c: plugged memleak
* plug-ins/common/aa.c: removed compiler warning
* tools/pdbgen/Makefile.am
* tools/pdbgen/groups.pl
* tools/pdbgen/pdb/gdisplay.pdb -> display.pdb
* tools/pdbgen/pdb/gimage.pdb -> image.pdb
* tools/pdbgen/pdb/gimage_mask.pdb -> selection.pdb
* tools/pdbgen/pdb/channel_ops.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/gimprc.pdb
* tools/pdbgen/pdb/text_tool.pdb
* tools/pdbgen/pdb/tools.pdb
* tools/pdbgen/pdb/undo.pdb: made them create libgimp code
2000-05-31 Michael Natterer <mitch@gimp.org>
Sven Neumann <sven@gimp.org>

View File

@ -121,6 +121,7 @@ gimp_SOURCES = \
dialog_handler.h \
disp_callbacks.c \
disp_callbacks.h \
display_cmds.c \
docindex.c \
docindex.h \
dodgeburn.c \
@ -168,17 +169,14 @@ gimp_SOURCES = \
gdisplay_color.h \
gdisplay_color_ui.c \
gdisplay_color_ui.h \
gdisplay_cmds.c \
gdisplay_ops.c \
gdisplay_ops.h \
general.c \
general.h \
gimage.c \
gimage.h \
gimage_cmds.c \
gimage_mask.c \
gimage_mask.h \
gimage_mask_cmds.c \
gimpbrush.c \
gimpbrush.h \
gimpbrushgenerated.c \
@ -246,6 +244,7 @@ gimp_SOURCES = \
histogram_tool.h \
hue_saturation.c \
hue_saturation.h \
image_cmds.c \
image_map.c \
image_map.h \
image_new.c \
@ -380,6 +379,7 @@ gimp_SOURCES = \
scroll.h \
selection.c \
selection.h \
selection_cmds.c \
selection_options.h \
session.h \
session.c \

View File

@ -27,7 +27,7 @@ static ProcRecord display_delete_proc;
static ProcRecord displays_flush_proc;
void
register_gdisplay_procs (void)
register_display_procs (void)
{
procedural_db_register (&display_new_proc);
procedural_db_register (&display_delete_proc);

View File

@ -99,7 +99,7 @@ static ProcRecord image_get_layer_by_tattoo_proc;
static ProcRecord image_get_channel_by_tattoo_proc;
void
register_gimage_procs (void)
register_image_procs (void)
{
procedural_db_register (&image_list_proc);
procedural_db_register (&image_new_proc);

View File

@ -33,18 +33,17 @@ void register_channel_procs (void);
void register_channel_ops_procs (void);
void register_color_procs (void);
void register_convert_procs (void);
void register_display_procs (void);
void register_drawable_procs (void);
void register_edit_procs (void);
void register_fileops_procs (void);
void register_floating_sel_procs (void);
void register_gdisplay_procs (void);
void register_gimage_procs (void);
void register_gimage_mask_procs (void);
void register_gimprc_procs (void);
void register_gradient_procs (void);
void register_gradient_select_procs (void);
void register_guides_procs (void);
void register_help_procs (void);
void register_image_procs (void);
void register_layer_procs (void);
void register_message_procs (void);
void register_misc_procs (void);
@ -55,6 +54,7 @@ void register_pattern_select_procs (void);
void register_patterns_procs (void);
void register_plug_in_procs (void);
void register_procedural_db_procs (void);
void register_selection_procs (void);
void register_text_tool_procs (void);
void register_tools_procs (void);
void register_undo_procs (void);
@ -83,72 +83,72 @@ internal_procs_init (void)
app_init_update_status (NULL, _("Convert"), 0.134);
register_convert_procs ();
app_init_update_status (NULL, _("Drawable procedures"), 0.143);
app_init_update_status (NULL, _("GDisplay procedures"), 0.143);
register_display_procs ();
app_init_update_status (NULL, _("Drawable procedures"), 0.152);
register_drawable_procs ();
app_init_update_status (NULL, _("Edit procedures"), 0.211);
app_init_update_status (NULL, _("Edit procedures"), 0.22);
register_edit_procs ();
app_init_update_status (NULL, _("File Operations"), 0.23);
app_init_update_status (NULL, _("File Operations"), 0.239);
register_fileops_procs ();
app_init_update_status (NULL, _("Floating selections"), 0.255);
app_init_update_status (NULL, _("Floating selections"), 0.264);
register_floating_sel_procs ();
app_init_update_status (NULL, _("GDisplay procedures"), 0.273);
register_gdisplay_procs ();
app_init_update_status (NULL, _("Image"), 0.283);
register_gimage_procs ();
app_init_update_status (NULL, _("Image mask"), 0.466);
register_gimage_mask_procs ();
app_init_update_status (NULL, _("Gimprc procedures"), 0.519);
app_init_update_status (NULL, _("Gimprc procedures"), 0.283);
register_gimprc_procs ();
app_init_update_status (NULL, _("Gradients"), 0.528);
app_init_update_status (NULL, _("Gradients"), 0.292);
register_gradient_procs ();
app_init_update_status (NULL, _("Gradient UI"), 0.543);
app_init_update_status (NULL, _("Gradient UI"), 0.307);
register_gradient_select_procs ();
app_init_update_status (NULL, _("Guide procedures"), 0.556);
app_init_update_status (NULL, _("Guide procedures"), 0.32);
register_guides_procs ();
app_init_update_status (NULL, _("Help procedures"), 0.575);
app_init_update_status (NULL, _("Help procedures"), 0.339);
register_help_procs ();
app_init_update_status (NULL, _("Layer"), 0.578);
app_init_update_status (NULL, _("Image"), 0.342);
register_image_procs ();
app_init_update_status (NULL, _("Layer"), 0.525);
register_layer_procs ();
app_init_update_status (NULL, _("Interface"), 0.674);
app_init_update_status (NULL, _("Interface"), 0.621);
register_message_procs ();
app_init_update_status (NULL, _("Miscellaneous"), 0.683);
app_init_update_status (NULL, _("Miscellaneous"), 0.63);
register_misc_procs ();
app_init_update_status (NULL, _("Palette"), 0.689);
app_init_update_status (NULL, _("Palette"), 0.637);
register_palette_procs ();
app_init_update_status (NULL, _("Parasite procedures"), 0.711);
app_init_update_status (NULL, _("Parasite procedures"), 0.658);
register_parasite_procs ();
app_init_update_status (NULL, _("Paths"), 0.748);
app_init_update_status (NULL, _("Paths"), 0.696);
register_paths_procs ();
app_init_update_status (NULL, _("Pattern UI"), 0.789);
app_init_update_status (NULL, _("Pattern UI"), 0.736);
register_pattern_select_procs ();
app_init_update_status (NULL, _("Patterns"), 0.798);
app_init_update_status (NULL, _("Patterns"), 0.745);
register_patterns_procs ();
app_init_update_status (NULL, _("Plug-in"), 0.811);
app_init_update_status (NULL, _("Plug-in"), 0.758);
register_plug_in_procs ();
app_init_update_status (NULL, _("Procedural database"), 0.829);
app_init_update_status (NULL, _("Procedural database"), 0.776);
register_procedural_db_procs ();
app_init_update_status (NULL, _("Image mask"), 0.801);
register_selection_procs ();
app_init_update_status (NULL, _("Text procedures"), 0.854);
register_text_tool_procs ();

View File

@ -44,7 +44,7 @@ static ProcRecord selection_load_proc;
static ProcRecord selection_save_proc;
void
register_gimage_mask_procs (void)
register_selection_procs (void)
{
procedural_db_register (&selection_bounds_proc);
procedural_db_register (&selection_value_proc);

View File

@ -24,6 +24,71 @@ EXTRA_DIST = \
lib_LTLIBRARIES = libgimp.la libgimpui.la
noinst_LIBRARIES = libgimpi.a
PDB_WRAPPERS_C = \
gimpbrushes_pdb.c \
gimpbrushselect_pdb.c \
gimpchannel_pdb.c \
gimpchannelops_pdb.c \
gimpcolor_pdb.c \
gimpconvert_pdb.c \
gimpdisplay_pdb.c \
gimpdrawable_pdb.c \
gimpedit_pdb.c \
gimpfileops_pdb.c \
gimpfloatingsel_pdb.c \
gimpgimprc_pdb.c \
gimpgradient_pdb.c \
gimpgradientselect_pdb.c \
gimpguides_pdb.c \
gimphelp_pdb.c \
gimpimage_pdb.c \
gimplayer_pdb.c \
gimpmessage_pdb.c \
gimppalette_pdb.c \
gimpparasite_pdb.c \
gimppatterns_pdb.c \
gimppatternselect_pdb.c \
gimpplugin_pdb.c \
gimpproceduraldb_pdb.c \
gimpselection_pdb.c \
gimptexttool_pdb.c \
gimptools_pdb.c \
gimpundo_pdb.c \
gimpunit_pdb.c
PDB_WRAPPERS_H = \
gimp_pdb.h \
gimpbrushes_pdb.h \
gimpbrushselect_pdb.h \
gimpchannel_pdb.h \
gimpchannelops_pdb.h \
gimpcolor_pdb.h \
gimpconvert_pdb.h \
gimpdisplay_pdb.h \
gimpdrawable_pdb.h \
gimpedit_pdb.h \
gimpfileops_pdb.h \
gimpfloatingsel_pdb.h \
gimpgimprc_pdb.h \
gimpgradient_pdb.h \
gimpgradientselect_pdb.h \
gimpguides_pdb.h \
gimphelp_pdb.h \
gimpimage_pdb.h \
gimplayer_pdb.h \
gimpmessage_pdb.h \
gimppalette_pdb.h \
gimpparasite_pdb.h \
gimppatterns_pdb.h \
gimppatternselect_pdb.h \
gimpplugin_pdb.h \
gimpproceduraldb_pdb.h \
gimpselection_pdb.h \
gimptexttool_pdb.h \
gimptools_pdb.h \
gimpundo_pdb.h \
gimpunit_pdb.h
libgimpi_a_SOURCES = \
gimpenv.c \
gimpenv.h \
@ -80,71 +145,35 @@ endif
libgimp_la_SOURCES = \
gimp.c \
gimp.h \
gimp_pdb.h \
gimpbrushes_pdb.c \
gimpbrushes_pdb.h \
gimpbrushselect_pdb.c \
gimpbrushselect_pdb.h \
gimpchannel_pdb.c \
gimpchannel_pdb.h \
${PDB_WRAPPERS_C} \
${PDB_WRAPPERS_H} \
gimpcolorspace.c \
gimpcolorspace.h \
gimpconvert_pdb.c \
gimpconvert_pdb.h \
gimpdisplay_pdb.c \
gimpdisplay_pdb.h \
gimpdrawable.c \
gimpdrawable.h \
gimpdrawable_pdb.c \
gimpdrawable_pdb.h \
gimpenv.c \
gimpenv.h \
gimpfileops_pdb.c \
gimpfileops_pdb.h \
gimpgradient_pdb.c \
gimpgradient_pdb.h \
gimpgradientselect_pdb.c \
gimpgradientselect_pdb.h \
gimpguides_pdb.c \
gimpguides_pdb.h \
gimpgradientselect.c \
gimpgradientselect.h \
gimphelp.c \
gimphelp_pdb.c \
gimphelp_pdb.h \
gimpimage_pdb.c \
gimpimage_pdb.h \
gimplayer_pdb.c \
gimplayer_pdb.h \
gimpimage.c \
gimpimage.h \
gimpmatrix.c \
gimpmatrix.h \
gimpmessage_pdb.c \
gimpmessage_pdb.h \
gimppalette_pdb.c \
gimpparasite.c \
gimpparasite.h \
gimpparasiteio.c \
gimpparasiteio.h \
gimpparasite_pdb.c \
gimpparasite_pdb.h \
gimppatterns_pdb.c \
gimppatterns_pdb.h \
gimppatternselect_pdb.c \
gimppatternselect_pdb.h \
gimppixelrgn.c \
gimppixelrgn.h \
gimpplugin_pdb.c \
gimpplugin_pdb.h \
gimpproceduraldb_pdb.c \
gimpproceduraldb_pdb.h \
gimpprotocol.c \
gimpprotocol.h \
gimpselection_pdb.c \
gimpselection_pdb.h \
gimpselection.c \
gimpselection.h \
gimpsignal.c \
gimpsignal.h \
gimptile.c \
gimptile.h \
gimpunit_pdb.c \
gimpunit_pdb.h \
gimpunit.c \
gimpunit.h \
gimputils.c \
@ -178,26 +207,7 @@ libgimpui_la_SOURCES = \
gimpinclude_HEADERS = \
gimp.h \
gimp_pdb.h \
gimpbrushes_pdb.h \
gimpbrushselect_pdb.h \
gimpchannel_pdb.h \
gimpconvert_pdb.h \
gimpdisplay_pdb.h \
gimpdrawable_pdb.h \
gimpfileops_pdb.h \
gimpgradient_pdb.h \
gimpgradientselect_pdb.h \
gimpguides_pdb.h \
gimphelp_pdb.h \
gimpimage_pdb.h \
gimplayer_pdb.h \
gimpmessage_pdb.h \
gimppalette_pdb.h \
gimpparasite_pdb.h \
gimpplugin_pdb.h \
gimpproceduraldb_pdb.h \
gimpselection_pdb.h \
${PDB_WRAPPERS_H} \
gimpchainbutton.h \
gimpcolorbutton.h \
gimpcolordisplay.h \
@ -211,7 +221,9 @@ gimpinclude_HEADERS = \
gimpexport.h \
gimpfeatures.h \
gimpfileselection.h \
gimpgradientselect.h \
gimphelpui.h \
gimpimage.h \
gimplimits.h \
gimpmath.h \
gimpmatrix.h \
@ -220,11 +232,10 @@ gimpinclude_HEADERS = \
gimpparasite.h \
gimpparasiteio.h \
gimppatheditor.h \
gimppatterns_pdb.h \
gimppatternselect_pdb.h \
gimppixelrgn.h \
gimppixmap.h \
gimpquerybox.h \
gimpselection.h \
gimpsignal.h \
gimpsizeentry.h \
gimptile.h \

View File

@ -1,6 +1,8 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimp.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

View File

@ -30,11 +30,14 @@
#include <libgimp/gimpcolorspace.h>
#include <libgimp/gimpdrawable.h>
#include <libgimp/gimpfeatures.h>
#include <libgimp/gimpgradientselect.h>
#include <libgimp/gimpenv.h>
#include <libgimp/gimpimage.h>
#include <libgimp/gimplimits.h>
#include <libgimp/gimpmath.h>
#include <libgimp/gimpparasite.h>
#include <libgimp/gimppixelrgn.h>
#include <libgimp/gimpselection.h>
#include <libgimp/gimptile.h>
#include <libgimp/gimpunit.h>
#include <libgimp/gimputils.h>
@ -71,6 +74,8 @@ extern "C" {
#define gimp_image_convert_grayscale gimp_convert_grayscale
#define gimp_image_convert_indexed gimp_convert_indexed
#define gimp_image_duplicate gimp_channel_ops_duplicate
#define gimp_drawable_offset gimp_channel_ops_offset
GIMPVAR guint gimp_major_version;
GIMPVAR guint gimp_minor_version;
@ -153,6 +158,7 @@ union _GimpParamData
gint32 d_selection;
gint32 d_boundary;
gint32 d_path;
gint32 d_unit;
GimpParasite d_parasite;
gint32 d_tattoo;
gint32 d_status;

View File

@ -25,10 +25,15 @@
#include <libgimp/gimpbrushes_pdb.h>
#include <libgimp/gimpbrushselect_pdb.h>
#include <libgimp/gimpchannel_pdb.h>
#include <libgimp/gimpchannelops_pdb.h>
#include <libgimp/gimpcolor_pdb.h>
#include <libgimp/gimpconvert_pdb.h>
#include <libgimp/gimpdisplay_pdb.h>
#include <libgimp/gimpdrawable_pdb.h>
#include <libgimp/gimpedit_pdb.h>
#include <libgimp/gimpfileops_pdb.h>
#include <libgimp/gimpfloatingsel_pdb.h>
#include <libgimp/gimpgimprc_pdb.h>
#include <libgimp/gimpgradient_pdb.h>
#include <libgimp/gimpgradientselect_pdb.h>
#include <libgimp/gimpguides_pdb.h>
@ -43,5 +48,9 @@
#include <libgimp/gimpproceduraldb_pdb.h>
#include <libgimp/gimpplugin_pdb.h>
#include <libgimp/gimpselection_pdb.h>
#include <libgimp/gimptexttool_pdb.h>
#include <libgimp/gimptools_pdb.h>
#include <libgimp/gimpundo_pdb.h>
#endif /* __GIMP_PDB_H__ */

View File

@ -0,0 +1,66 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpchannelops_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_channel_ops_offset (gint32 drawable_ID,
gboolean wrap_around,
GimpChannelOffsetType fill_type,
gint offset_x,
gint offset_y)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_channel_ops_offset",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, wrap_around,
PARAM_INT32, fill_type,
PARAM_INT32, offset_x,
PARAM_INT32, offset_y,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_channel_ops_duplicate (gint32 image_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint32 new_image_ID = -1;
return_vals = gimp_run_procedure ("gimp_channel_ops_duplicate",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
new_image_ID = return_vals[1].data.d_image;
gimp_destroy_params (return_vals, nreturn_vals);
return new_image_ID;
}

View File

@ -0,0 +1,46 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpchannelops_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_CHANNEL_OPS_PDB_H__
#define __GIMP_CHANNEL_OPS_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_channel_ops_offset (gint32 drawable_ID,
gboolean wrap_around,
GimpChannelOffsetType fill_type,
gint offset_x,
gint offset_y);
gint32 gimp_channel_ops_duplicate (gint32 image_ID);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_CHANNEL_OPS_PDB_H__ */

269
libgimp/gimpcolor_pdb.c Normal file
View File

@ -0,0 +1,269 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpcolor_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_brightness_contrast (gint32 drawable_ID,
gint brightness,
gint contrast)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_brightness_contrast",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, brightness,
PARAM_INT32, contrast,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_levels (gint32 drawable_ID,
GimpChannelLutType channel,
gint low_input,
gint high_input,
gdouble gamma,
gint low_output,
gint high_output)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_levels",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, channel,
PARAM_INT32, low_input,
PARAM_INT32, high_input,
PARAM_FLOAT, gamma,
PARAM_INT32, low_output,
PARAM_INT32, high_output,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_posterize (gint32 drawable_ID,
gint levels)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_posterize",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, levels,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_desaturate (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_desaturate",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_equalize (gint32 drawable_ID,
gboolean mask_only)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_equalize",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, mask_only,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_invert (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_invert",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_curves_spline (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_points,
guint8 *control_pts)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_curves_spline",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, channel,
PARAM_INT32, num_points,
PARAM_INT8ARRAY, control_pts,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_curves_explicit (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_bytes,
guint8 *curve)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_curves_explicit",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, channel,
PARAM_INT32, num_bytes,
PARAM_INT8ARRAY, curve,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_color_balance (gint32 drawable_ID,
GimpTransferMode transfer_mode,
gboolean preserve_lum,
gdouble cyan_red,
gdouble magenta_green,
gdouble yellow_blue)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_color_balance",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, transfer_mode,
PARAM_INT32, preserve_lum,
PARAM_FLOAT, cyan_red,
PARAM_FLOAT, magenta_green,
PARAM_FLOAT, yellow_blue,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_histogram (gint32 drawable_ID,
GimpChannelLutType channel,
gint start_range,
gint end_range,
gdouble *mean,
gdouble *std_dev,
gdouble *median,
gdouble *pixels,
gdouble *count,
gdouble *percentile)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_histogram",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, channel,
PARAM_INT32, start_range,
PARAM_INT32, end_range,
PARAM_END);
*mean = *std_dev = *median = *pixels = *count = *percentile = 0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*mean = return_vals[1].data.d_float;
*std_dev = return_vals[2].data.d_float;
*median = return_vals[3].data.d_float;
*pixels = return_vals[4].data.d_float;
*count = return_vals[5].data.d_float;
*percentile = return_vals[6].data.d_float;
}
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_hue_saturation (gint32 drawable_ID,
GimpHueRange hue_range,
gdouble hue_offset,
gdouble lightness,
gdouble saturation)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_hue_saturation",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, hue_range,
PARAM_FLOAT, hue_offset,
PARAM_FLOAT, lightness,
PARAM_FLOAT, saturation,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_threshold (gint32 drawable_ID,
gint low_threshold,
gint high_threshold)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_threshold",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, low_threshold,
PARAM_INT32, high_threshold,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

88
libgimp/gimpcolor_pdb.h Normal file
View File

@ -0,0 +1,88 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpcolor_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_COLOR_PDB_H__
#define __GIMP_COLOR_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_brightness_contrast (gint32 drawable_ID,
gint brightness,
gint contrast);
void gimp_levels (gint32 drawable_ID,
GimpChannelLutType channel,
gint low_input,
gint high_input,
gdouble gamma,
gint low_output,
gint high_output);
void gimp_posterize (gint32 drawable_ID,
gint levels);
void gimp_desaturate (gint32 drawable_ID);
void gimp_equalize (gint32 drawable_ID,
gboolean mask_only);
void gimp_invert (gint32 drawable_ID);
void gimp_curves_spline (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_points,
guint8 *control_pts);
void gimp_curves_explicit (gint32 drawable_ID,
GimpChannelLutType channel,
gint num_bytes,
guint8 *curve);
void gimp_color_balance (gint32 drawable_ID,
GimpTransferMode transfer_mode,
gboolean preserve_lum,
gdouble cyan_red,
gdouble magenta_green,
gdouble yellow_blue);
void gimp_histogram (gint32 drawable_ID,
GimpChannelLutType channel,
gint start_range,
gint end_range,
gdouble *mean,
gdouble *std_dev,
gdouble *median,
gdouble *pixels,
gdouble *count,
gdouble *percentile);
void gimp_hue_saturation (gint32 drawable_ID,
GimpHueRange hue_range,
gdouble hue_offset,
gdouble lightness,
gdouble saturation);
void gimp_threshold (gint32 drawable_ID,
gint low_threshold,
gint high_threshold);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_COLOR_PDB_H__ */

View File

@ -60,8 +60,7 @@ extern "C" {
#define gimp_layer_bpp gimp_drawable_bpp
#define gimp_layer_type gimp_drawable_type
#define gimp_gradient_get_gradient_data(a,b,c,d) \
gimp_gradients_get_gradient_data (a,c,b,d)
#define gimp_gradient_get_gradient_data gimp_gradients_get_gradient_data
#define gimp_plugin_help_func gimp_standard_help_func

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
*
* gimpdisplay_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,22 +19,22 @@
* Boston, MA 02111-1307, USA.
*/
#include "gimp.h"
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gint32
gimp_display_new (gint32 image_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint32 display_ID;
gint32 display_ID = -1;
return_vals = gimp_run_procedure ("gimp_display_new",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
display_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
display_ID = return_vals[1].data.d_display;
@ -50,9 +50,9 @@ gimp_display_delete (gint32 display_ID)
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_display_delete",
&nreturn_vals,
PARAM_DISPLAY, display_ID,
PARAM_END);
&nreturn_vals,
PARAM_DISPLAY, display_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
@ -64,8 +64,8 @@ gimp_displays_flush (void)
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_displays_flush",
&nreturn_vals,
PARAM_END);
&nreturn_vals,
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
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpdisplay_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_DISPLAY_PDB_H__
#define __GIMP_DISPLAY_PDB_H__
@ -29,9 +31,9 @@ extern "C" {
/* For information look into the C source or the html documentation */
gint32 gimp_display_new (gint32 image_ID);
void gimp_display_delete (gint32 display_ID);
void gimp_displays_flush (void);
gint32 gimp_display_new (gint32 image_ID);
void gimp_display_delete (gint32 display_ID);
void gimp_displays_flush (void);
#ifdef __cplusplus

118
libgimp/gimpedit_pdb.c Normal file
View File

@ -0,0 +1,118 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpedit_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_edit_cut (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_edit_cut",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_edit_copy (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_edit_copy",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_edit_paste (gint32 drawable_ID,
gboolean paste_into)
{
GParam *return_vals;
gint nreturn_vals;
gint32 floating_sel_ID = -1;
return_vals = gimp_run_procedure ("gimp_edit_paste",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, paste_into,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
floating_sel_ID = return_vals[1].data.d_layer;
gimp_destroy_params (return_vals, nreturn_vals);
return floating_sel_ID;
}
void
gimp_edit_clear (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_edit_clear",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_edit_fill (gint32 drawable_ID,
GimpFillType fill_type)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_edit_fill",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, fill_type,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_edit_stroke (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_edit_stroke",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

48
libgimp/gimpedit_pdb.h Normal file
View File

@ -0,0 +1,48 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpedit_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_EDIT_PDB_H__
#define __GIMP_EDIT_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_edit_cut (gint32 drawable_ID);
void gimp_edit_copy (gint32 drawable_ID);
gint32 gimp_edit_paste (gint32 drawable_ID,
gboolean paste_into);
void gimp_edit_clear (gint32 drawable_ID);
void gimp_edit_fill (gint32 drawable_ID,
GimpFillType fill_type);
void gimp_edit_stroke (gint32 drawable_ID);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_EDIT_PDB_H__ */

View File

@ -0,0 +1,114 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpfloatingsel_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_floating_sel_remove (gint32 floating_sel_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_remove",
&nreturn_vals,
PARAM_LAYER, floating_sel_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_floating_sel_anchor (gint32 floating_sel_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_anchor",
&nreturn_vals,
PARAM_LAYER, floating_sel_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_floating_sel_to_layer (gint32 floating_sel_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_to_layer",
&nreturn_vals,
PARAM_LAYER, floating_sel_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_floating_sel_attach (gint32 layer_ID,
gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_attach",
&nreturn_vals,
PARAM_LAYER, layer_ID,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_floating_sel_rigor (gint32 floating_sel_ID,
gboolean undo)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_rigor",
&nreturn_vals,
PARAM_LAYER, floating_sel_ID,
PARAM_INT32, undo,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_floating_sel_relax (gint32 floating_sel_ID,
gboolean undo)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_floating_sel_relax",
&nreturn_vals,
PARAM_LAYER, floating_sel_ID,
PARAM_INT32, undo,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

View File

@ -0,0 +1,49 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpfloatingsel_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_FLOATING_SEL_PDB_H__
#define __GIMP_FLOATING_SEL_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_floating_sel_remove (gint32 floating_sel_ID);
void gimp_floating_sel_anchor (gint32 floating_sel_ID);
void gimp_floating_sel_to_layer (gint32 floating_sel_ID);
void gimp_floating_sel_attach (gint32 layer_ID,
gint32 drawable_ID);
void gimp_floating_sel_rigor (gint32 floating_sel_ID,
gboolean undo);
void gimp_floating_sel_relax (gint32 floating_sel_ID,
gboolean undo);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_FLOATING_SEL_PDB_H__ */

81
libgimp/gimpgimprc_pdb.c Normal file
View File

@ -0,0 +1,81 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpgimprc_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gchar *
gimp_gimprc_query (gchar *token)
{
GParam *return_vals;
gint nreturn_vals;
gchar *value = NULL;
return_vals = gimp_run_procedure ("gimp_gimprc_query",
&nreturn_vals,
PARAM_STRING, token,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
value = g_strdup (return_vals[1].data.d_string);
gimp_destroy_params (return_vals, nreturn_vals);
return value;
}
void
gimp_gimprc_set (gchar *token,
gchar *value)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_gimprc_set",
&nreturn_vals,
PARAM_STRING, token,
PARAM_STRING, value,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_get_monitor_resolution (gdouble *xres,
gdouble *yres)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_get_monitor_resolution",
&nreturn_vals,
PARAM_END);
*xres = *yres = 1.0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*xres = return_vals[1].data.d_float;
*yres = return_vals[2].data.d_float;
}
gimp_destroy_params (return_vals, nreturn_vals);
}

45
libgimp/gimpgimprc_pdb.h Normal file
View File

@ -0,0 +1,45 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpgimprc_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_GIMPRC_PDB_H__
#define __GIMP_GIMPRC_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gchar* gimp_gimprc_query (gchar *token);
void gimp_gimprc_set (gchar *token,
gchar *value);
void gimp_get_monitor_resolution (gdouble *xres,
gdouble *yres);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_GIMPRC_PDB_H__ */

View File

@ -0,0 +1,31 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpgradientselect.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"
gchar *
gimp_gradients_get_gradient_data (gchar *name,
gint *width,
gint sample_size,
gdouble **grad_data)
{
return _gimp_gradients_get_gradient_data (name, sample_size, width, grad_data);
}

View File

@ -0,0 +1,42 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpgradientselect.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_GRADIENT_SELECT_H__
#define __GIMP_GRADIENT_SELECT_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gchar * gimp_gradients_get_gradient_data (gchar *name,
gint *width,
gint sample_size,
gdouble **grad_data);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_GRADIENT_SELECT_H__ */

View File

@ -74,10 +74,10 @@ gimp_gradients_set_popup (gchar *gradients_callback,
}
gchar *
gimp_gradients_get_gradient_data (gchar *name,
gint sample_size,
gint *width,
gdouble **grad_data)
_gimp_gradients_get_gradient_data (gchar *name,
gint sample_size,
gint *width,
gdouble **grad_data)
{
GParam *return_vals;
gint nreturn_vals;

View File

@ -31,17 +31,17 @@ extern "C" {
/* For information look into the C source or the html documentation */
void gimp_gradients_popup (gchar *gradients_callback,
gchar *popup_title,
gchar *initial_gradient,
gint sample_size);
void gimp_gradients_close_popup (gchar *gradients_callback);
void gimp_gradients_set_popup (gchar *gradients_callback,
gchar *gradient_name);
gchar* gimp_gradients_get_gradient_data (gchar *name,
gint sample_size,
gint *width,
gdouble **grad_data);
void gimp_gradients_popup (gchar *gradients_callback,
gchar *popup_title,
gchar *initial_gradient,
gint sample_size);
void gimp_gradients_close_popup (gchar *gradients_callback);
void gimp_gradients_set_popup (gchar *gradients_callback,
gchar *gradient_name);
gchar* _gimp_gradients_get_gradient_data (gchar *name,
gint sample_size,
gint *width,
gdouble **grad_data);
#ifdef __cplusplus

71
libgimp/gimpimage.c Normal file
View File

@ -0,0 +1,71 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpimage.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"
guchar *
gimp_image_get_cmap (gint32 image_ID,
gint *num_colors)
{
gint num_bytes;
guchar *cmap;
cmap = _gimp_image_get_cmap (image_ID,
&num_bytes);
*num_colors = num_bytes / 3;
return cmap;
}
void
gimp_image_set_cmap (gint32 image_ID,
guchar *cmap,
gint num_colors)
{
_gimp_image_set_cmap (image_ID,
num_colors * 3,
cmap);
}
guchar *
gimp_image_get_thumbnail_data (gint32 image_ID,
gint *width,
gint *height,
gint *bpp)
{
gint ret_width;
gint ret_height;
guchar *image_data;
gint data_size;
_gimp_image_thumbnail (image_ID,
*width,
*height,
&ret_width,
&ret_height,
bpp,
&data_size,
image_data);
return image_data;
}

48
libgimp/gimpimage.h Normal file
View File

@ -0,0 +1,48 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpimage.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_IMAGE_H__
#define __GIMP_IMAGE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
guchar * gimp_image_get_cmap (gint32 image_ID,
gint *num_colors);
void gimp_image_set_cmap (gint32 image_ID,
guchar *cmap,
gint num_colors);
guchar * gimp_image_get_thumbnail_data (gint32 image_ID,
gint *width,
gint *height,
gint *bpp);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_IMAGE_H__ */

File diff suppressed because it is too large Load Diff

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
*
* gimpimage_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_IMAGE_PDB_H__
#define __GIMP_IMAGE_PDB_H__
@ -29,106 +31,123 @@ extern "C" {
/* For information look into the C source or the html documentation */
gint32 gimp_image_new (guint width,
guint height,
GimpImageBaseType type);
gint32 gimp_image_duplicate (gint32 image_ID);
void gimp_image_delete (gint32 image_ID);
guint gimp_image_width (gint32 image_ID);
guint gimp_image_height (gint32 image_ID);
GimpImageBaseType gimp_image_base_type (gint32 image_ID);
gint32 gimp_image_floating_selection (gint32 image_ID);
void gimp_image_add_channel (gint32 image_ID,
gint32 channel_ID,
gint position);
void gimp_image_add_layer (gint32 image_ID,
gint32 layer_ID,
gint position);
void gimp_image_add_layer_mask (gint32 image_ID,
gint32 layer_ID,
gint32 mask_ID);
void gimp_image_clean_all (gint32 image_ID);
void gimp_image_undo_disable (gint32 image_ID);
void gimp_image_undo_enable (gint32 image_ID);
void gimp_image_undo_freeze (gint32 image_ID);
void gimp_image_undo_thaw (gint32 image_ID);
void gimp_undo_push_group_start (gint32 image_ID);
void gimp_undo_push_group_end (gint32 image_ID);
void gimp_image_clean_all (gint32 image_ID);
gint32 gimp_image_flatten (gint32 image_ID);
void gimp_image_lower_channel (gint32 image_ID,
gint32 channel_ID);
void gimp_image_lower_layer (gint32 image_ID,
gint32 layer_ID);
gint32 gimp_image_merge_visible_layers (gint32 image_ID,
GimpMergeType merge_type);
gint32 gimp_image_pick_correlate_layer (gint32 image_ID,
gint x,
gint y);
void gimp_image_raise_channel (gint32 image_ID,
gint32 channel_ID);
void gimp_image_raise_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
void gimp_image_remove_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_remove_layer_mask (gint32 image_ID,
gint32 layer_ID,
gint mode);
void gimp_image_resize (gint32 image_ID,
guint new_width,
guint new_height,
gint offset_x,
gint offset_y);
gint32 gimp_image_get_active_channel (gint32 image_ID);
gint32 gimp_image_get_active_layer (gint32 image_ID);
gint32 * gimp_image_get_channels (gint32 image_ID,
gint *nchannels);
guchar * gimp_image_get_cmap (gint32 image_ID,
gint *ncolors);
gboolean gimp_image_get_component_active (gint32 image_ID,
gint component);
gboolean gimp_image_get_component_visible (gint32 image_ID,
gint component);
gchar * gimp_image_get_filename (gint32 image_ID);
gint32 * gimp_image_get_layers (gint32 image_ID,
gint *nlayers);
gint32 gimp_image_get_selection (gint32 image_ID);
void gimp_image_set_active_channel (gint32 image_ID,
gint32 channel_ID);
void gimp_image_set_active_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_set_cmap (gint32 image_ID,
guchar *cmap,
gint ncolors);
void gimp_image_set_component_active (gint32 image_ID,
gint component,
gboolean active);
void gimp_image_set_component_visible (gint32 image_ID,
gint component,
gboolean visible);
void gimp_image_set_filename (gint32 image_ID,
gchar *name);
void gimp_image_set_resolution (gint32 image_ID,
gdouble xresolution,
gdouble yresolution);
void gimp_image_get_resolution (gint32 image_ID,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (gint32 image_ID,
GimpUnit unit);
GimpUnit gimp_image_get_unit (gint32 image_ID);
gint32 gimp_image_get_layer_by_tattoo (gint32 image_ID,
gint32 tattoo);
gint32 gimp_image_get_channel_by_tattoo (gint32 image_ID,
gint32 tattoo);
guchar * gimp_image_get_thumbnail_data (gint32 image_ID,
gint *width,
gint *height,
gint *bytes);
gint32 * gimp_image_list (gint *nimages);
gint* gimp_image_list (gint *num_images);
gint32 gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
void gimp_image_resize (gint32 image_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
void gimp_image_scale (gint32 image_ID,
gint new_width,
gint new_height);
void gimp_image_delete (gint32 image_ID);
void gimp_image_free_shadow (gint32 image_ID);
gint* gimp_image_get_layers (gint32 image_ID,
gint *num_layers);
gint* gimp_image_get_channels (gint32 image_ID,
gint *num_channels);
void gimp_image_unset_active_channel (gint32 image_ID);
gint32 gimp_image_pick_correlate_layer (gint32 image_ID,
gint x,
gint y);
void gimp_image_raise_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_lower_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_raise_layer_to_top (gint32 image_ID,
gint32 layer_ID);
void gimp_image_lower_layer_to_bottom (gint32 image_ID,
gint32 layer_ID);
gint32 gimp_image_merge_visible_layers (gint32 image_ID,
GimpMergeType merge_type);
gint32 gimp_image_merge_down (gint32 image_ID,
gint32 merge_layer_ID,
GimpMergeType merge_type);
gint32 gimp_image_flatten (gint32 image_ID);
void gimp_image_add_layer (gint32 image_ID,
gint32 layer_ID,
gint position);
void gimp_image_remove_layer (gint32 image_ID,
gint32 layer_ID);
void gimp_image_add_layer_mask (gint32 image_ID,
gint32 layer_ID,
gint32 mask_ID);
void gimp_image_remove_layer_mask (gint32 image_ID,
gint32 layer_ID,
GimpMaskApplyMode mode);
void gimp_image_raise_channel (gint32 image_ID,
gint32 channel_ID);
void gimp_image_lower_channel (gint32 image_ID,
gint32 layer_ID);
void gimp_image_add_channel (gint32 image_ID,
gint32 channel_ID,
gint position);
void gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
gint32 gimp_image_active_drawable (gint32 image_ID);
GimpImageBaseType gimp_image_base_type (gint32 image_ID);
guint8* _gimp_image_get_cmap (gint32 image_ID,
gint *num_bytes);
void _gimp_image_set_cmap (gint32 image_ID,
gint num_bytes,
guint8 *cmap);
gboolean gimp_image_undo_is_enabled (gint32 image_ID);
gboolean gimp_image_undo_enable (gint32 image_ID);
gboolean gimp_image_undo_disable (gint32 image_ID);
gboolean gimp_image_undo_freeze (gint32 image_ID);
gboolean gimp_image_undo_thaw (gint32 image_ID);
void gimp_image_clean_all (gint32 image_ID);
gint32 gimp_image_floating_selection (gint32 image_ID);
gint32 gimp_image_floating_sel_attached_to (gint32 image_ID);
void _gimp_image_thumbnail (gint32 image_ID,
gint width,
gint height,
gint *ret_width,
gint *ret_height,
gint *bpp,
gint *thumbnail_data_count,
guint8 **thumbnail_data);
void gimp_image_set_tattoo_state (gint32 image_ID,
gint tattoo);
gint gimp_image_get_tattoo_state (gint32 image_ID);
gint gimp_image_width (gint32 image_ID);
gint gimp_image_height (gint32 image_ID);
gint32 gimp_image_get_active_layer (gint32 image_ID);
void gimp_image_set_active_layer (gint32 image_ID,
gint32 active_layer_ID);
gint32 gimp_image_get_active_channel (gint32 image_ID);
void gimp_image_set_active_channel (gint32 image_ID,
gint32 active_channel_ID);
gint32 gimp_image_get_selection (gint32 image_ID);
gboolean gimp_image_get_component_active (gint32 image_ID,
GimpChannelType component);
void gimp_image_set_component_active (gint32 image_ID,
GimpChannelType component,
gboolean active);
gboolean gimp_image_get_component_visible (gint32 image_ID,
GimpChannelType component);
void gimp_image_set_component_visible (gint32 image_ID,
GimpChannelType component,
gboolean visible);
gchar* gimp_image_get_filename (gint32 image_ID);
void gimp_image_set_filename (gint32 image_ID,
gchar *filename);
void gimp_image_get_resolution (gint32 image_ID,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_resolution (gint32 image_ID,
gdouble xresolution,
gdouble yresolution);
GimpUnit gimp_image_get_unit (gint32 image_ID);
void gimp_image_set_unit (gint32 image_ID,
GimpUnit unit);
gint32 gimp_image_get_layer_by_tattoo (gint32 image_ID,
gint tattoo);
gint32 gimp_image_get_channel_by_tattoo (gint32 image_ID,
gint tattoo);
#ifdef __cplusplus

34
libgimp/gimpselection.c Normal file
View File

@ -0,0 +1,34 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpselection.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"
gint32
gimp_selection_float (gint32 image_ID,
gint32 drawable_ID,
gint offx,
gint offy)
{
return _gimp_selection_float (drawable_ID,
offx,
offy);
}

43
libgimp/gimpselection.h Normal file
View File

@ -0,0 +1,43 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpselection.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_SELECTION_H__
#define __GIMP_SELECTION_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gint32 gimp_selection_float (gint32 image_ID,
gint32 drawable_ID,
gint offx,
gint offy);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_SELECTION_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
*
* gimpselection_pdb.c
*
@ -8,10 +8,10 @@
* 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,
* 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,67 +19,41 @@
* Boston, MA 02111-1307, USA.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gint32
gimp_selection_bounds (gint32 image_ID,
gint *non_empty,
gint *x1,
gint *y1,
gint *x2,
gint *y2)
gboolean
gimp_selection_bounds (gint32 image_ID,
gboolean *non_empty,
gint *x1,
gint *y1,
gint *x2,
gint *y2)
{
GParam *return_vals;
gint nreturn_vals;
gint result;
gboolean success;
return_vals = gimp_run_procedure ("gimp_selection_bounds",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
result = FALSE;
success = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
result = TRUE;
*non_empty = return_vals[1].data.d_int32;
success = TRUE;
*non_empty = return_vals[1].data.d_int32;
*x1 = return_vals[2].data.d_int32;
*y1 = return_vals[3].data.d_int32;
*x2 = return_vals[4].data.d_int32;
*y2 = return_vals[5].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gint32
gimp_selection_float (gint32 image_ID,
gint32 drawable_ID,
gint32 x_offset,
gint32 y_offset)
{
GParam *return_vals;
gint nreturn_vals;
gint32 layer_ID;
return_vals = gimp_run_procedure ("gimp_selection_float",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, x_offset,
PARAM_INT32, y_offset,
PARAM_END);
layer_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
layer_ID = return_vals[1].data.d_layer;
gimp_destroy_params (return_vals, nreturn_vals);
return layer_ID;
return success;
}
gboolean
@ -87,21 +61,45 @@ gimp_selection_is_empty (gint32 image_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean is_empty;
gboolean is_empty = TRUE;
return_vals = gimp_run_procedure ("gimp_selection_is_empty",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
is_empty = TRUE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
is_empty = return_vals[1].data.d_int32 ? TRUE : FALSE;
is_empty = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return is_empty;
}
gint32
_gimp_selection_float (gint32 drawable_ID,
gint offx,
gint offy)
{
GParam *return_vals;
gint nreturn_vals;
gint32 layer_ID = -1;
return_vals = gimp_run_procedure ("gimp_selection_float",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, offx,
PARAM_INT32, offy,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
layer_ID = return_vals[1].data.d_layer;
gimp_destroy_params (return_vals, nreturn_vals);
return layer_ID;
}
void
gimp_selection_none (gint32 image_ID)
{
@ -109,9 +107,9 @@ gimp_selection_none (gint32 image_ID)
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_selection_none",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
&nreturn_vals,
PARAM_IMAGE, image_ID,
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
*
* gimpselection_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_SELECTION_PDB_H__
#define __GIMP_SELECTION_PDB_H__
@ -29,18 +31,17 @@ extern "C" {
/* For information look into the C source or the html documentation */
gint32 gimp_selection_bounds (gint32 image_ID,
gint32 *non_empty,
gint32 *x1,
gint32 *y1,
gint32 *x2,
gint32 *y2);
gint32 gimp_selection_float (gint32 image_ID,
gint32 drawable_ID,
gint32 x_offset,
gint32 y_offset);
gint32 gimp_selection_is_empty (gint32 image_ID);
void gimp_selection_none (gint32 image_ID);
gboolean gimp_selection_bounds (gint32 image_ID,
gboolean *is_empty,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
gboolean gimp_selection_is_empty (gint32 image_ID);
gint32 _gimp_selection_float (gint32 drawable_ID,
gint offx,
gint offy);
void gimp_selection_none (gint32 image_ID);
#ifdef __cplusplus

194
libgimp/gimptexttool_pdb.c Normal file
View File

@ -0,0 +1,194 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimptexttool_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
gint32
gimp_text_fontname (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gchar *text,
gint border,
gboolean antialias,
gdouble size,
GimpSizeType size_type,
gchar *fontname)
{
GParam *return_vals;
gint nreturn_vals;
gint32 text_layer_ID = -1;
return_vals = gimp_run_procedure ("gimp_text_fontname",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_STRING, text,
PARAM_INT32, border,
PARAM_INT32, antialias,
PARAM_FLOAT, size,
PARAM_INT32, size_type,
PARAM_STRING, fontname,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
text_layer_ID = return_vals[1].data.d_layer;
gimp_destroy_params (return_vals, nreturn_vals);
return text_layer_ID;
}
void
gimp_text_get_extents_fontname (gchar *text,
gdouble size,
GimpSizeType size_type,
gchar *fontname,
gint *width,
gint *height,
gint *ascent,
gint *descent)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_text_get_extents_fontname",
&nreturn_vals,
PARAM_STRING, text,
PARAM_FLOAT, size,
PARAM_INT32, size_type,
PARAM_STRING, fontname,
PARAM_END);
*width = *height = *ascent = *descent = 0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*width = return_vals[1].data.d_int32;
*height = return_vals[2].data.d_int32;
*ascent = return_vals[3].data.d_int32;
*descent = return_vals[4].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_text (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gchar *text,
gint border,
gboolean antialias,
gdouble size,
GimpSizeType size_type,
gchar *foundry,
gchar *family,
gchar *weight,
gchar *slant,
gchar *set_width,
gchar *spacing,
gchar *registry,
gchar *encoding)
{
GParam *return_vals;
gint nreturn_vals;
gint32 text_layer_ID = -1;
return_vals = gimp_run_procedure ("gimp_text",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_STRING, text,
PARAM_INT32, border,
PARAM_INT32, antialias,
PARAM_FLOAT, size,
PARAM_INT32, size_type,
PARAM_STRING, foundry,
PARAM_STRING, family,
PARAM_STRING, weight,
PARAM_STRING, slant,
PARAM_STRING, set_width,
PARAM_STRING, spacing,
PARAM_STRING, registry,
PARAM_STRING, encoding,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
text_layer_ID = return_vals[1].data.d_layer;
gimp_destroy_params (return_vals, nreturn_vals);
return text_layer_ID;
}
void
gimp_text_get_extents (gchar *text,
gdouble size,
GimpSizeType size_type,
gchar *foundry,
gchar *family,
gchar *weight,
gchar *slant,
gchar *set_width,
gchar *spacing,
gchar *registry,
gchar *encoding,
gint *width,
gint *height,
gint *ascent,
gint *descent)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_text_get_extents",
&nreturn_vals,
PARAM_STRING, text,
PARAM_FLOAT, size,
PARAM_INT32, size_type,
PARAM_STRING, foundry,
PARAM_STRING, family,
PARAM_STRING, weight,
PARAM_STRING, slant,
PARAM_STRING, set_width,
PARAM_STRING, spacing,
PARAM_STRING, registry,
PARAM_STRING, encoding,
PARAM_END);
*width = *height = *ascent = *descent = 0;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*width = return_vals[1].data.d_int32;
*height = return_vals[2].data.d_int32;
*ascent = return_vals[3].data.d_int32;
*descent = return_vals[4].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
}

View File

@ -0,0 +1,90 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimptexttool_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_TEXT_TOOL_PDB_H__
#define __GIMP_TEXT_TOOL_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
gint32 gimp_text_fontname (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gchar *text,
gint border,
gboolean antialias,
gdouble size,
GimpSizeType size_type,
gchar *fontname);
void gimp_text_get_extents_fontname (gchar *text,
gdouble size,
GimpSizeType size_type,
gchar *fontname,
gint *width,
gint *height,
gint *ascent,
gint *descent);
gint32 gimp_text (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gchar *text,
gint border,
gboolean antialias,
gdouble size,
GimpSizeType size_type,
gchar *foundry,
gchar *family,
gchar *weight,
gchar *slant,
gchar *set_width,
gchar *spacing,
gchar *registry,
gchar *encoding);
void gimp_text_get_extents (gchar *text,
gdouble size,
GimpSizeType size_type,
gchar *foundry,
gchar *family,
gchar *weight,
gchar *slant,
gchar *set_width,
gchar *spacing,
gchar *registry,
gchar *encoding,
gint *width,
gint *height,
gint *ascent,
gint *descent);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_TEXT_TOOL_PDB_H__ */

778
libgimp/gimptools_pdb.c Normal file
View File

@ -0,0 +1,778 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimptools_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_airbrush (gint32 drawable_ID,
gdouble pressure,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_airbrush",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, pressure,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_airbrush_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_airbrush_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_blend (gint32 drawable_ID,
GimpBlendMode blend_mode,
GimpLayerModeEffects paint_mode,
GimpGradientType gradient_type,
gdouble opacity,
gdouble offset,
GimpRepeatMode repeat,
gboolean supersample,
gint max_depth,
gdouble threshold,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_blend",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, blend_mode,
PARAM_INT32, paint_mode,
PARAM_INT32, gradient_type,
PARAM_FLOAT, opacity,
PARAM_FLOAT, offset,
PARAM_INT32, repeat,
PARAM_INT32, supersample,
PARAM_INT32, max_depth,
PARAM_FLOAT, threshold,
PARAM_FLOAT, x1,
PARAM_FLOAT, y1,
PARAM_FLOAT, x2,
PARAM_FLOAT, y2,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_bucket_fill (gint32 drawable_ID,
GimpBucketFillMode fill_mode,
GimpLayerModeEffects paint_mode,
gdouble opacity,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_bucket_fill",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, fill_mode,
PARAM_INT32, paint_mode,
PARAM_FLOAT, opacity,
PARAM_FLOAT, threshold,
PARAM_INT32, sample_merged,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_by_color_select (gint32 drawable_ID,
guchar red,
guchar green,
guchar blue,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged)
{
GParam *return_vals;
gint nreturn_vals;
guchar color[3];
color[0] = red;
color[1] = green;
color[2] = blue;
return_vals = gimp_run_procedure ("gimp_by_color_select",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_COLOR, color,
PARAM_INT32, threshold,
PARAM_INT32, operation,
PARAM_INT32, antialias,
PARAM_INT32, feather,
PARAM_FLOAT, feather_radius,
PARAM_INT32, sample_merged,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_clone (gint32 drawable_ID,
gint32 src_drawable_ID,
GimpCloneType clone_type,
gdouble src_x,
gdouble src_y,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_clone",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_DRAWABLE, src_drawable_ID,
PARAM_INT32, clone_type,
PARAM_FLOAT, src_x,
PARAM_FLOAT, src_y,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_clone_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_clone_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_color_picker (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gboolean sample_merged,
gboolean sample_average,
gdouble average_radius,
gboolean save_color,
guchar *red,
guchar *green,
guchar *blue)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_color_picker",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_INT32, sample_merged,
PARAM_INT32, sample_average,
PARAM_FLOAT, average_radius,
PARAM_INT32, save_color,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*red = return_vals[1].data.d_color.red;
*green = return_vals[1].data.d_color.green;
*blue = return_vals[1].data.d_color.blue;
}
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_convolve (gint32 drawable_ID,
gdouble pressure,
GimpConvolveType convolve_type,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_convolve",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, pressure,
PARAM_INT32, convolve_type,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_convolve_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_convolve_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_crop (gint32 image_ID,
gint new_width,
gint new_height,
gint offx,
gint offy)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_crop",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_INT32, new_width,
PARAM_INT32, new_height,
PARAM_INT32, offx,
PARAM_INT32, offy,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_dodgeburn (gint32 drawable_ID,
gdouble exposure,
GimpDodgeBurnType dodgeburn_type,
GimpDodgeBurnMode dodgeburn_mode,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_dodgeburn",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, exposure,
PARAM_INT32, dodgeburn_type,
PARAM_INT32, dodgeburn_mode,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_dodgeburn_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_dodgeburn_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_ellipse_select (gint32 image_ID,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_ellipse_select",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_FLOAT, width,
PARAM_FLOAT, height,
PARAM_INT32, operation,
PARAM_INT32, antialias,
PARAM_INT32, feather,
PARAM_FLOAT, feather_radius,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_eraser (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes,
GimpBrushApplicationMode hardness,
GimpPaintApplicationMode method)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_eraser",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_INT32, hardness,
PARAM_INT32, method,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_eraser_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_eraser_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_flip (gint32 drawable_ID,
GimpOrientationType flip_type)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_flip",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, flip_type,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
void
gimp_free_select (gint32 image_ID,
gint num_segs,
gdouble *segs,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_free_select",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_INT32, num_segs,
PARAM_FLOATARRAY, segs,
PARAM_INT32, operation,
PARAM_INT32, antialias,
PARAM_INT32, feather,
PARAM_FLOAT, feather_radius,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_fuzzy_select (gint32 drawable_ID,
gdouble x,
gdouble y,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_fuzzy_select",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_INT32, threshold,
PARAM_INT32, operation,
PARAM_INT32, antialias,
PARAM_INT32, feather,
PARAM_FLOAT, feather_radius,
PARAM_INT32, sample_merged,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_paintbrush (gint32 drawable_ID,
gdouble fade_out,
gint num_strokes,
gdouble *strokes,
GimpPaintApplicationMode method,
gdouble gradient_length)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_paintbrush",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, fade_out,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_INT32, method,
PARAM_FLOAT, gradient_length,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_paintbrush_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_paintbrush_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_pencil (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_pencil",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_perspective (gint32 drawable_ID,
gboolean interpolation,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
gdouble x3,
gdouble y3)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_perspective",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, interpolation,
PARAM_FLOAT, x0,
PARAM_FLOAT, y0,
PARAM_FLOAT, x1,
PARAM_FLOAT, y1,
PARAM_FLOAT, x2,
PARAM_FLOAT, y2,
PARAM_FLOAT, x3,
PARAM_FLOAT, y3,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
void
gimp_rect_select (gint32 image_ID,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GimpChannelOps operation,
gboolean feather,
gdouble feather_radius)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_rect_select",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_FLOAT, x,
PARAM_FLOAT, y,
PARAM_FLOAT, width,
PARAM_FLOAT, height,
PARAM_INT32, operation,
PARAM_INT32, feather,
PARAM_FLOAT, feather_radius,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_rotate (gint32 drawable_ID,
gboolean interpolation,
gdouble angle)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_rotate",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, interpolation,
PARAM_FLOAT, angle,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
gint32
gimp_scale (gint32 drawable_ID,
gboolean interpolation,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_scale",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, interpolation,
PARAM_FLOAT, x0,
PARAM_FLOAT, y0,
PARAM_FLOAT, x1,
PARAM_FLOAT, y1,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
gint32
gimp_shear (gint32 drawable_ID,
gboolean interpolation,
GimpOrientationType shear_type,
gdouble magnitude)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_shear",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, interpolation,
PARAM_INT32, shear_type,
PARAM_FLOAT, magnitude,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
void
gimp_smudge (gint32 drawable_ID,
gdouble pressure,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_smudge",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_FLOAT, pressure,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_smudge_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_smudge_default",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, num_strokes,
PARAM_FLOATARRAY, strokes,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_transform_2d (gint32 drawable_ID,
gboolean interpolation,
gdouble source_x,
gdouble source_y,
gdouble scale_x,
gdouble scale_y,
gdouble angle,
gdouble dest_x,
gdouble dest_y)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_transform_2d",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, interpolation,
PARAM_FLOAT, source_x,
PARAM_FLOAT, source_y,
PARAM_FLOAT, scale_x,
PARAM_FLOAT, scale_y,
PARAM_FLOAT, angle,
PARAM_FLOAT, dest_x,
PARAM_FLOAT, dest_y,
PARAM_END);
drawable_ID = -1;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}

216
libgimp/gimptools_pdb.h Normal file
View File

@ -0,0 +1,216 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimptools_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_TOOLS_PDB_H__
#define __GIMP_TOOLS_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_airbrush (gint32 drawable_ID,
gdouble pressure,
gint num_strokes,
gdouble *strokes);
void gimp_airbrush_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
void gimp_blend (gint32 drawable_ID,
GimpBlendMode blend_mode,
GimpLayerModeEffects paint_mode,
GimpGradientType gradient_type,
gdouble opacity,
gdouble offset,
GimpRepeatMode repeat,
gboolean supersample,
gint max_depth,
gdouble threshold,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2);
void gimp_bucket_fill (gint32 drawable_ID,
GimpBucketFillMode fill_mode,
GimpLayerModeEffects paint_mode,
gdouble opacity,
gdouble threshold,
gboolean sample_merged,
gdouble x,
gdouble y);
void gimp_by_color_select (gint32 drawable_ID,
guchar red,
guchar green,
guchar blue,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged);
void gimp_clone (gint32 drawable_ID,
gint32 src_drawable_ID,
GimpCloneType clone_type,
gdouble src_x,
gdouble src_y,
gint num_strokes,
gdouble *strokes);
void gimp_clone_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
void gimp_color_picker (gint32 image_ID,
gint32 drawable_ID,
gdouble x,
gdouble y,
gboolean sample_merged,
gboolean sample_average,
gdouble average_radius,
gboolean save_color,
guchar *red,
guchar *green,
guchar *blue);
void gimp_convolve (gint32 drawable_ID,
gdouble pressure,
GimpConvolveType convolve_type,
gint num_strokes,
gdouble *strokes);
void gimp_convolve_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
void gimp_crop (gint32 image_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
void gimp_dodgeburn (gint32 drawable_ID,
gdouble exposure,
GimpDodgeBurnType dodgeburn_type,
GimpDodgeBurnMode dodgeburn_mode,
gint num_strokes,
gdouble *strokes);
void gimp_dodgeburn_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
void gimp_ellipse_select (gint32 image_ID,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius);
void gimp_eraser (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes,
GimpBrushApplicationMode hardness,
GimpPaintApplicationMode method);
void gimp_eraser_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
gint32 gimp_flip (gint32 drawable_ID,
GimpOrientationType flip_type);
void gimp_free_select (gint32 image_ID,
gint num_segs,
gdouble *segs,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius);
void gimp_fuzzy_select (gint32 drawable_ID,
gdouble x,
gdouble y,
gint threshold,
GimpChannelOps operation,
gboolean antialias,
gboolean feather,
gdouble feather_radius,
gboolean sample_merged);
void gimp_paintbrush (gint32 drawable_ID,
gdouble fade_out,
gint num_strokes,
gdouble *strokes,
GimpPaintApplicationMode method,
gdouble gradient_length);
void gimp_paintbrush_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
void gimp_pencil (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
gint32 gimp_perspective (gint32 drawable_ID,
gboolean interpolation,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
gdouble x3,
gdouble y3);
void gimp_rect_select (gint32 image_ID,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GimpChannelOps operation,
gboolean feather,
gdouble feather_radius);
gint32 gimp_rotate (gint32 drawable_ID,
gboolean interpolation,
gdouble angle);
gint32 gimp_scale (gint32 drawable_ID,
gboolean interpolation,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1);
gint32 gimp_shear (gint32 drawable_ID,
gboolean interpolation,
GimpOrientationType shear_type,
gdouble magnitude);
void gimp_smudge (gint32 drawable_ID,
gdouble pressure,
gint num_strokes,
gdouble *strokes);
void gimp_smudge_default (gint32 drawable_ID,
gint num_strokes,
gdouble *strokes);
gint32 gimp_transform_2d (gint32 drawable_ID,
gboolean interpolation,
gdouble source_x,
gdouble source_y,
gdouble scale_x,
gdouble scale_y,
gdouble angle,
gdouble dest_x,
gdouble dest_y);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_TOOLS_PDB_H__ */

52
libgimp/gimpundo_pdb.c Normal file
View File

@ -0,0 +1,52 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpundo_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
void
gimp_undo_push_group_start (gint32 image_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_undo_push_group_start",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_undo_push_group_end (gint32 image_ID)
{
GParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_undo_push_group_end",
&nreturn_vals,
PARAM_IMAGE, image_ID,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}

42
libgimp/gimpundo_pdb.h Normal file
View File

@ -0,0 +1,42 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
*
* gimpundo_pdb.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.
*/
/* NOTE: This file is autogenerated by pdbgen.pl */
#ifndef __GIMP_UNDO_PDB_H__
#define __GIMP_UNDO_PDB_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
void gimp_undo_push_group_start (gint32 image_ID);
void gimp_undo_push_group_end (gint32 image_ID);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_UNDO_PDB_H__ */

View File

@ -517,7 +517,7 @@ save_image (gchar *file,
header[4]= 0x20;
/* Work out whether to save as 8bit or 4bit */
gimp_image_get_cmap (image, &colours);
g_free (gimp_image_get_cmap (image, &colours));
if (colours > 15)
{
header[5] = 8;

View File

@ -42,8 +42,6 @@ static void gimp2aa (gint32 image,
aa_context *context);
static gint type_dialog (int selected);
static void type_dialog_ok_callback (GtkWidget *widget,
gpointer data);
static void type_dialog_toggle_update (GtkWidget *widget,
gpointer data);
static void type_dialog_cancel_callback (GtkWidget *widget,

View File

@ -1,3 +1,7 @@
2000-06-01 Sven Neumann <sven@gimp.org>
* POTFILES.in: s/gimage_cmds/image_cmds/
2000-05-31 Shirasaki Yasuhiro <yasuhiro@gnome.gr.jp>
* ja.po: Updated translation.

View File

@ -42,7 +42,6 @@ app/fuzzy_select.c
app/gdisplay.c
app/gdisplay_color_ui.c
app/gdisplay_ops.c
app/gimage_cmds.c
app/gimage_mask.c
app/gimpbrush.c
app/gimpbrushlist.c
@ -59,6 +58,7 @@ app/gradient.c
app/gradient_select.c
app/histogram_tool.c
app/hue_saturation.c
app/image_cmds.c
app/image_new.c
app/indicator_area.c
app/info_dialog.c

View File

@ -8,18 +8,17 @@ pdb_sources = \
pdb/channel_ops.pdb \
pdb/color.pdb \
pdb/convert.pdb \
pdb/display.pdb \
pdb/drawable.pdb \
pdb/edit.pdb \
pdb/fileops.pdb \
pdb/floating_sel.pdb \
pdb/gdisplay.pdb \
pdb/gimage.pdb \
pdb/gimage_mask.pdb \
pdb/gimprc.pdb \
pdb/gradient.pdb \
pdb/gradient_select.pdb \
pdb/guides.pdb \
pdb/help.pdb \
pdb/image.pdb \
pdb/layer.pdb \
pdb/message.pdb \
pdb/misc.pdb \
@ -30,6 +29,7 @@ pdb_sources = \
pdb/patterns.pdb \
pdb/plug_in.pdb \
pdb/procedural_db.pdb \
pdb/selection.pdb \
pdb/text_tool.pdb \
pdb/tools.pdb \
pdb/undo.pdb \

View File

@ -6,18 +6,17 @@
channel_ops
color
convert
display
drawable
edit
fileops
floating_sel
gdisplay
gimage
gimage_mask
gimprc
gradient
gradient_select
guides
help
image
layer
message
misc
@ -28,6 +27,7 @@
patterns
plug_in
procedural_db
selection
text_tool
tools
undo

View File

@ -87,7 +87,7 @@ CODE
}
@procs = qw(channel_ops_offset channel_ops_duplicate);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Channel Ops';

View File

@ -765,7 +765,7 @@ CODE
@procs = qw(brightness_contrast levels posterize desaturate equalize invert
curves_spline curves_explicit color_balance histogram
hue_saturation threshold);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Color';

View File

@ -168,7 +168,7 @@ HELP
$extra{app}->{decls} = "extern TileManager *global_buf;\n";
@procs = qw(edit_cut edit_copy edit_paste edit_clear edit_fill edit_stroke);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Edit procedures';

View File

@ -147,7 +147,7 @@ HELP
@procs = qw(floating_sel_remove floating_sel_anchor floating_sel_to_layer
floating_sel_attach floating_sel_rigor floating_sel_relax);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Floating selections';

View File

@ -1,94 +0,0 @@
# The GIMP -- an image manipulation program
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
# The defs
sub display_new {
$blurb = 'Create a new display for the specified image.';
$help = <<'HELP';
Creates a new display for the specified image. If the image already has a
display, another is added. Multiple displays are handled transparently by the
GIMP. The newly created display is returned and can be subsequently destroyed
with a call to 'gimp-display-delete'. This procedure only makes sense for use
with the GIMP UI.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
@outargs = (
{ name => 'display', type => 'display',
desc => 'The new display', alias => 'gdisp', init => 1 }
);
%invoke = (
vars => [ 'guint scale = 0x101' ],
code => <<'CODE'
{
if (gimage->layers)
success = (gdisp = gdisplay_new (gimage, scale)) != NULL;
else
success = FALSE;
}
CODE
);
}
sub display_delete {
$blurb = 'Delete the specified display.';
$help = <<'HELP';
This procedure removes the specified display. If this is the last remaining
display for the underlying image, then the image is deleted also.
HELP
&std_pdb_misc;
@inargs = (
{ name => 'display', type => 'display',
desc => 'The display to delete', alias => 'gdisp' }
);
%invoke = ( code => 'gtk_widget_destroy (gdisp->shell);' );
}
sub displays_flush {
$blurb = 'Flush all internal changes to the user interface';
$help = <<'HELP';
This procedure takes no arguments and returns nothing except a success status.
Its purpose is to flush all pending updates of image manipulations to the user
interface. It should be called whenever appropriate.
HELP
&std_pdb_misc;
%invoke = ( code => 'gdisplays_flush ();' );
}
@headers = qw("gdisplay.h");
@procs = qw(display_new display_delete displays_flush);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'GDisplay procedures';
1;

File diff suppressed because it is too large Load Diff

View File

@ -1,371 +0,0 @@
# The GIMP -- an image manipulation program
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
sub coord_args {
my ($name, $desc, $args) = @_;
foreach (qw(x y)) {
push @$args, { name => eval qq/"$name"/, type => 'int32',
desc => eval qq/"$desc"/ }
}
}
sub selection_simple_proc {
my $op = shift;
&std_pdb_misc;
@inargs = ( &std_image_arg );
%invoke = ( code => "gimage_mask_$op (gimage);" );
}
sub selection_change_proc {
my ($op, $arg, $type, $edge_lock) = @_;
$blurb = "\u$op the image's selection";
$help = "This procedure ${op}s the selection. ";
&std_pdb_misc;
@inargs = (
&std_image_arg,
{ name => $arg, type => "0 <= $type",
desc => "\u$arg of $op (in pixels)" }
);
%invoke = ( code => "gimage_mask_$op (gimage, $arg, $arg$edge_lock);" );
}
# The defs
sub selection_bounds {
$blurb = 'Find the bounding box of the current selection.';
$help = <<'HELP';
This procedure returns whether there is a selection for the specified image. If
there is one, the upper left and lower right corners of the bounding box are
returned. These coordinates are relative to the image.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
@outargs = (
{ name => 'non_empty', type => 'boolean',
desc => 'True if there is a selection', init => 1 }
);
my $count = 1;
foreach ('upper left', 'lower right') {
&coord_args("\${_}$count",
"\$_ coordinate of $_ corner of selection bounds",
\@outargs);
$count++;
}
%invoke = (
code => 'non_empty = gimage_mask_bounds (gimage, &x1, &y1, &x2, &y2);'
);
}
sub selection_value {
$blurb = 'Find the value of the selection at the specified coordinates.';
$help = <<'HELP';
This procedure returns the value of the selection at the specified coordinates.
If the coordinates lie out of bounds, 0 is returned.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
&coord_args('$_', '$_ coordinate of value', \@inargs);
@outargs = (
{ name => 'value', type => '0 <= int32 <= 255',
desc => 'Value of the selection: (%%desc%%)',
alias => 'gimage_mask_value (gimage, x, y)', no_declare => 1 }
);
}
sub selection_is_empty {
$blurb = 'Determine whether the selection is empty.';
$help = <<'HELP';
This procedure returns non-zero if the selection for the specified image is not
empty.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg);
@outargs = (
{ name => 'is_empty', type => 'boolean',
desc => 'Is the selection empty?',
alias => 'gimage_mask_is_empty (gimage)', no_declare => 1 }
);
}
sub selection_translate {
$blurb = 'Translate the selection by the specified offsets.';
$help = <<'HELP';
This procedure actually translates the selection for the specified image by the
specified offsets. Regions that are translated from beyond the bounds of the
image are set to empty. Valid regions of the selection which are translated
beyond the bounds of the image because of this call are lost.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
&coord_args('off$_', '$_ offset for translation', \@inargs);
%invoke = ( code => 'gimage_mask_translate (gimage, offx, offy);' );
}
sub selection_float {
$blurb = <<'BLURB';
Float the selection from the specified drawable with initial offsets as
specified.
BLURB
$help = <<'HELP';
This procedure determines the region of the specified drawable that lies
beneath the current selection. The region is then cut from the drawable and the
resulting data is made into a new layer which is instantiated as a floating
selection. The offsets allow initial positioning of the new floating selection.
HELP
&std_pdb_misc;
@inargs = (
{ name => 'drawable', type => 'drawable',
desc => 'The drawable from which to float selection' }
);
&coord_args('off$_', '$_ offset for translation', \@inargs);
@outargs = (
{ name => 'layer', type => 'layer',
desc => 'The floated layer', init => 1 }
);
%invoke = (
vars => [ 'GimpImage *gimage' ],
code => <<'CODE'
{
gimage = drawable_gimage (drawable);
layer = gimage_mask_float (gimage, drawable, offx, offy);
success = layer != NULL;
}
CODE
);
}
sub selection_clear {
&selection_simple_proc('clear');
$blurb = 'Set the selection to none, clearing all previous content.';
$help = <<'HELP';
This procedure sets the selection mask to empty, assigning the value 0 to every
pixel in the selection channel.
HELP
}
sub selection_invert {
&selection_simple_proc('invert');
$blurb = 'Invert the selection mask.';
$help = <<'HELP';
This procedure inverts the selection mask. For every pixel in the selection
channel, its new value is calculated as (255 - old_value).
HELP
}
sub selection_sharpen {
&selection_simple_proc('sharpen');
$blurb = 'Sharpen the selection mask.';
$help = <<'HELP';
This procedure sharpens the selection mask. For every pixel in the selection
channel, if the value is > 0, the new pixel is assigned a value of 255. This
removes any "anti-aliasing" that might exist in the selection mask's boundary.
HELP
}
sub selection_all {
&selection_simple_proc('all');
$blurb = 'Select all of the image.';
$help = <<'HELP';
This procedure sets the selection mask to completely encompass the image. Every
pixel in the selection channel is set to 255.
HELP
}
sub selection_none {
&selection_simple_proc('none');
$blurb = 'Deselect the entire image.';
$help = <<'HELP';
This procedure deselects the entire image. Every pixel in the selection channel
is set to 0.
HELP
}
sub selection_feather {
&selection_change_proc('feather', 'radius', 'float', '');
$help .= 'Feathering is implemented using a gaussian blur.';
}
sub selection_border {
&selection_change_proc('border', 'radius', 'int32', '');
$help .= <<'HELP';
Bordering creates a new selection which is defined along the boundary of the
previous selection at every point within the specified radius.
HELP
}
sub selection_grow {
&selection_change_proc('grow', 'steps', 'int32', '');
$help .= <<'HELP';
Growing involves expanding the boundary in all directions by the specified
pixel amount.
HELP
}
sub selection_shrink {
&selection_change_proc('shrink', 'radius', 'int32', ', FALSE');
$help .= <<'HELP';
Shrinking invovles trimming the existing selection boundary on all sides by the
specified number of pixels.
HELP
}
sub selection_layer_alpha {
$blurb = <<'BLURB';
Transfer the specified layer's alpha channel to the selection mask.
BLURB
$help = <<'HELP';
This procedure requires a layer with an alpha channel. The alpha channel
information is used to create a selection mask such that for any pixel in the
image defined in the specified layer, that layer pixel's alpha value is
transferred to the selection mask. If the layer is undefined at a particular
image pixel, the associated selection mask value is set to 0.
HELP
&std_pdb_misc;
@inargs = (
{ name => 'layer', type => 'layer',
desc => 'Layer with alpha' }
);
%invoke = (
vars => [ 'GimpImage *gimage' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (layer));
gimage_mask_layer_alpha (gimage, layer);
}
CODE
);
}
sub selection_load {
$blurb = 'Transfer the specified channel to the selection mask.';
$help = <<'HELP';
This procedure loads the specified channel into the selection mask. This
essentially involves a copy of the channel's content in to the selection mask.
Therefore, the channel must have the same width and height of the image, or an
error is returned.
HELP
&std_pdb_misc;
@inargs = (
{ name => 'channel', type => 'channel',
desc => 'The channel' }
);
%invoke = (
vars => [ 'GimpImage *gimage' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (channel));
if (drawable_width (GIMP_DRAWABLE (channel)) == gimage->width &&
drawable_height (GIMP_DRAWABLE (channel)) == gimage->height)
gimage_mask_load (gimage, channel);
else
success = FALSE;
}
CODE
);
}
sub selection_save {
$blurb = 'Copy the selection mask to a new channel.';
$help = <<'HELP';
This procedure copies the selection mask and stores the content in a new
channel. The new channel is automatically inserted into the image's list of
channels.
HELP
&std_pdb_misc;
@inargs = ( &std_image_arg );
@outargs = (
{ name => 'channel', type => 'channel',
desc => 'The new channel', init => 1 }
);
%invoke = (
code => 'success = (channel = gimage_mask_save (gimage)) != NULL;'
);
}
@headers = qw("gimage_mask.h");
@procs = qw(selection_bounds selection_value selection_is_empty
selection_translate selection_float selection_clear
selection_invert selection_sharpen selection_all selection_none
selection_feather selection_border selection_grow selection_shrink
selection_layer_alpha selection_load selection_save);
%exports = (app => [@procs], lib => [@procs[0,2,4,9]]);
$desc = 'Image mask';
1;

View File

@ -127,7 +127,7 @@ CODE
@headers = qw("gimprc.h");
@procs = qw(gimprc_query gimprc_set get_monitor_resolution);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Gimprc procedures';

View File

@ -1453,8 +1453,7 @@ unshift @procs, qw(image_list image_new image_resize image_scale image_delete
image_clean_all image_floating_selection
image_floating_sel_attached_to image_thumbnail
image_set_tattoo_state image_get_tattoo_state);
%exports = (app => [@procs],
lib => [@procs[0..4,6..11,14,16..24,26..35,37..$#procs]]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Image';

View File

@ -1537,7 +1537,7 @@ sub ink {
paintbrush paintbrush_default
pencil perspective rect_select rotate scale shear
smudge smudge_default transform_2d);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Tool procedures';

View File

@ -1537,7 +1537,7 @@ sub ink {
paintbrush paintbrush_default
pencil perspective rect_select rotate scale shear
smudge smudge_default transform_2d);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Tool procedures';

View File

@ -383,7 +383,7 @@ text_xlfd_create (gchar *foundry,
CODE
@procs = qw(text_fontname text_get_extents_fontname text text_get_extents);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Text procedures';

View File

@ -1537,7 +1537,7 @@ sub ink {
paintbrush paintbrush_default
pencil perspective rect_select rotate scale shear
smudge smudge_default transform_2d);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Tool procedures';

View File

@ -1537,7 +1537,7 @@ sub ink {
paintbrush paintbrush_default
pencil perspective rect_select rotate scale shear
smudge smudge_default transform_2d);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Tool procedures';

View File

@ -60,7 +60,7 @@ HELP
@headers = qw("undo.h");
@procs = qw(undo_push_group_start undo_push_group_end);
%exports = (app => [@procs]);
%exports = (app => [@procs], lib => [@procs]);
$desc = 'Undo';