gimp/app/pdb/gimppdb-utils.h
Michael Natterer 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

	* app/pdb/image-cmds.c
	* app/pdb/layer-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00

72 lines
4.2 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-2003 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.
*/
#ifndef __GIMP_PDB_UTILS_H__
#define __GIMP_PDB_UTILS_H__
GimpBrush * gimp_pdb_get_brush (Gimp *gimp,
const gchar *name,
gboolean writable,
GError **error);
GimpBrush * gimp_pdb_get_generated_brush (Gimp *gimp,
const gchar *name,
gboolean writable,
GError **error);
GimpPattern * gimp_pdb_get_pattern (Gimp *gimp,
const gchar *name,
GError **error);
GimpGradient * gimp_pdb_get_gradient (Gimp *gimp,
const gchar *name,
gboolean writable,
GError **error);
GimpPalette * gimp_pdb_get_palette (Gimp *gimp,
const gchar *name,
gboolean writable,
GError **error);
GimpFont * gimp_pdb_get_font (Gimp *gimp,
const gchar *name,
GError **error);
GimpBuffer * gimp_pdb_get_buffer (Gimp *gimp,
const gchar *name,
GError **error);
GimpPaintInfo * gimp_pdb_get_paint_info (Gimp *gimp,
const gchar *name,
GError **error);
gboolean gimp_pdb_item_is_attached (GimpItem *item,
GError **error);
gboolean gimp_pdb_item_is_floating (GimpItem *item,
GimpImage *dest_image,
GError **error);
gboolean gimp_pdb_layer_is_text_layer (GimpLayer *layer,
GError **error);
gboolean gimp_pdb_image_is_base_type (GimpImage *image,
GimpImageBaseType type,
GError **error);
gboolean gimp_pdb_image_is_not_base_type (GimpImage *image,
GimpImageBaseType type,
GError **error);
GimpStroke * gimp_pdb_get_vectors_stroke (GimpVectors *vectors,
gint stroke_ID,
GError **error);
#endif /* __GIMP_PDB_UTILS_H__ */