gimp/libgimp/gimpdrawable_pdb.c

495 lines
11 KiB
C
Raw Normal View History

Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpdrawable_pdb.c
1998-01-25 18:26:47 +08:00
*
* This library is free software; you can redistribute it and/or
1999-11-18 05:13:50 +08:00
* modify it under the terms of the GNU Lesser General Public
1998-01-25 18:26:47 +08:00
* License as published by the Free Software Foundation; either
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
* 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
1998-01-25 18:26:47 +08:00
* Library General Public License for more details.
*
1999-11-18 05:13:50 +08:00
* 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.
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
*/
1997-11-25 06:05:25 +08:00
#include "gimp.h"
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Episode IV... * app/Makefile.am * app/message_cmds.c: new name * app/interface_cmds.c: removed * app/help_cmds.c: new name * app/gimphelp_cmds.c: removed * app/internal_procs.c * app/gimphelp_cmds.c * app/plug_in_cmds.c: moved gimp_plugin_help_register to plug_in_cmds.c, s/gimp_plugin_domain_add/gimp_plugin_domain_register/ * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpfileops_pdb.[ch] * libgimp/gimpguides_pdb.[ch] * libgimp/gimpmessage_pdb.[ch] * libgimp/gimpprocedural_db_pdb.[ch] * libgimp/gimpplugin_pdb.[ch]: new files containing PDB wrappers moved out of libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpdrawable_pdb.[ch] * libgimp/gimphelp_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimplayer_pdb.c * libgimp/gimpparasite_pdb.c * libgimp/gimpselection_pdb.c: various changes. * libgimp/gimpunit.c: new file * libgimp/gimpunit_pdb.[ch]: contains only PDB wrappers prefixed with "_" which are called from libgimp/gimpunit.c only. * libgimp/gimpunit.h: minor stuff * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_query_database gimp_query_images * libgimp/gimp.[ch]: removed all PDB wrappers. * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl: changed * tools/pdbgen/lib.pl: tried to fix libgimp autogeneration and fixed just a few comments. * tools/pdbgen/pdb/interface.pdb * tools/pdbgen/pdb/gimphelp.pdb: removed * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb: new names * plug-ins/script-fu/script-fu.c * plug-ins/perl/Gimp/Lib.xs: s/gimp_plugin_domain_add/gimp_plugin_domain_register/ 2000-05-31 Michael Natterer <mitch@gimp.org> * POTFILES.in: s/gimpunit_pdb/gimpunit/
2000-05-31 21:24:14 +08:00
1997-11-25 06:05:25 +08:00
void
gimp_drawable_update (gint32 drawable_ID,
gint x,
gint y,
guint width,
guint height)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_update",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, x,
PARAM_INT32, y,
PARAM_INT32, width,
PARAM_INT32, height,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_merge_shadow (gint32 drawable_ID,
gint undoable)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_merge_shadow",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, undoable,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gint32
gimp_drawable_image_id (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
gint32 image_ID;
return_vals = gimp_run_procedure ("gimp_drawable_image",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
image_ID = -1;
if (return_vals[0].data.d_int32 == STATUS_SUCCESS)
image_ID = return_vals[1].data.d_image;
gimp_destroy_params (return_vals, nreturn_vals);
return image_ID;
}
guint
gimp_drawable_width (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
guint width;
return_vals = gimp_run_procedure ("gimp_drawable_width",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
width = 0;
if (return_vals[0].data.d_int32 == STATUS_SUCCESS)
width = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return width;
}
guint
gimp_drawable_height (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
guint height;
return_vals = gimp_run_procedure ("gimp_drawable_height",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
height = 0;
if (return_vals[0].data.d_int32 == STATUS_SUCCESS)
height = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return height;
}
guint
gimp_drawable_bpp (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
guint bpp;
return_vals = gimp_run_procedure ("gimp_drawable_bytes",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
bpp = 0;
if (return_vals[0].data.d_int32 == STATUS_SUCCESS)
bpp = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return bpp;
}
GDrawableType
gimp_drawable_type (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
gint result;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_type",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = -1;
if (return_vals[0].data.d_int32 == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-17 08:07:55 +08:00
gimp_drawable_is_channel (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_channel",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-25 04:49:09 +08:00
gimp_drawable_is_rgb (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-25 04:49:09 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_rgb",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-17 08:07:55 +08:00
gimp_drawable_is_gray (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_gray",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1997-11-25 06:05:25 +08:00
gimp_drawable_has_alpha (gint32 drawable_ID)
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_has_alpha",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-17 08:07:55 +08:00
gimp_drawable_is_indexed (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_indexed",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-17 08:07:55 +08:00
gimp_drawable_is_layer (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_layer",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1999-10-17 08:07:55 +08:00
gimp_drawable_is_layer_mask (gint32 drawable_ID)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_is_layer_mask",
1997-11-25 06:05:25 +08:00
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
result = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return result;
}
gboolean
1997-11-25 06:05:25 +08:00
gimp_drawable_mask_bounds (gint32 drawable_ID,
gint *x1,
gint *y1,
gint *x2,
gint *y2)
{
GParam *return_vals;
gint nreturn_vals;
gboolean result;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_mask_bounds",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
result = FALSE;
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
result = 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;
}
void
gimp_drawable_offsets (gint32 drawable_ID,
gint *offset_x,
gint *offset_y)
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_offsets",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*offset_x = return_vals[1].data.d_int32;
*offset_y = return_vals[2].data.d_int32;
}
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_fill (gint32 drawable_ID,
GimpFillType fill_type)
1997-11-25 06:05:25 +08:00
{
GParam *return_vals;
gint nreturn_vals;
1997-11-25 06:05:25 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_fill",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, fill_type,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
GimpParasite *
gimp_drawable_parasite_find (gint32 drawable_ID,
const gchar *name)
{
GParam *return_vals;
gint nreturn_vals;
GimpParasite *parasite;
1999-10-28 04:23:04 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_parasite_find",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
PARAM_STRING, name,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
}
else
parasite = NULL;
gimp_destroy_params (return_vals, nreturn_vals);
return parasite;
}
void
gimp_drawable_parasite_attach (gint32 drawable_ID,
const GimpParasite *parasite)
{
GParam *return_vals;
gint nreturn_vals;
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_PARASITE, parasite,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_attach_new_parasite (gint32 drawable,
const gchar *name,
gint flags,
gint size,
const gpointer data)
{
GParam *return_vals;
gint nreturn_vals;
GimpParasite *p = gimp_parasite_new (name, flags, size, data);
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
&nreturn_vals,
PARAM_DRAWABLE, drawable,
PARAM_PARASITE, p,
PARAM_END);
gimp_parasite_free(p);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_parasite_detach (gint32 drawable_ID,
const gchar *name)
{
GParam *return_vals;
gint nreturn_vals;
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_parasite_detach",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h Modified Files: ChangeLog app/Makefile.am app/channel.c app/channel.h app/channel_cmds.c app/channel_cmds.h app/drawable_cmds.c app/gimage_cmds.c app/gimpdrawable.c app/gimpdrawable.h app/gimpdrawableP.h app/gimpimage.c app/gimpimage.h app/gimpimageP.h app/internal_procs.c app/layer.c app/layer.h app/layer_cmds.c app/layer_cmds.h app/parasite_cmds.c app/perspective_tool.c app/plug_in.c app/procedural_db.c app/rotate_tool.c app/scale_tool.c app/shear_tool.c app/transform_core.c app/transform_core.h docs/parasites.txt libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/gif/gif.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: libgimp/gimpmatrix.c libgimp/gimpmatrix.h libgimp/parasite.c libgimp/parasite.h libgimp/parasiteF.h libgimp/parasiteP.h Removed Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h libgimp/gimpparasite.c libgimp/gimpparasite.h Tue Oct 13 19:24:03 1998 Jay Cox (jaycox@earthlink.net) * app/parasite.c * app/parasite.h * app/parasiteF.h * app/parasiteP.h : use a single name field instead of seperate creator/type fields. moved to libgimp/parasite* * libgimp/Makefile.am * libgimp/gimp.c * libgimp/gimp.h * libgimp/gimpdrawable.c * libgimp/gimpimage.c * libgimp/gimpprotocol.c * libgimp/gimpprotocol.h * app/Makefile.am * app/channel.c * app/channel.h * app/channel_cmds.c * app/channel_cmds.h * app/drawable_cmds.c * app/gimage_cmds.c * app/gimpdrawable.c * app/gimpdrawable.h * app/gimpdrawableP.h * app/gimpimage.c * app/gimpimage.h * app/gimpimageP.h * app/internal_procs.c * app/layer.c * app/layer.h * app/layer_cmds.c * app/layer_cmds.h * app/parasite_cmds.c * app/plug_in.c * app/procedural_db.c: Add tattoos to layers and drawables. Use new style parasites. * libgimp/gimpmatrix.c * libgimp/gimpmatrix.h: new files for matrix math. * app/perspective_tool.c * app/rotate_tool.c * app/scale_tool.c * app/shear_tool.c * app/transform_core.c * app/transform_core.h: use GimpMatrix instead of the old matrix code from transform_core. * ligimp/gimpparasite*: removed. now useing the same source for plug-ins and the core. * plug-ins/script-fu/script-fu.c * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: updated to use new style parasites.
1998-10-14 10:54:02 +08:00
PARAM_STRING, name,
PARAM_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
gimp/app/gimppreviewcache.c gimp/app/gimppreviewcache.h Wed Jun 23 23:52:54 BST 1999 Andy Thomas <alt@gimp.org> * gimp/app/gimppreviewcache.c * gimp/app/gimppreviewcache.h * gimp/app/drawable_cmds.c * gimp/app/gdisplay.c * gimp/app/gimpdrawableP.h * gimp/app/gimage_cmds.c * gimp/app/Makefile.am * gimp/app/layers_dialog.c * gimp/app/channel.c * gimp/app/lc_dialog.c * gimp/app/lc_dialog.h * gimp/app/lc_dialogP.h * gimp/app/layer.c * gimp/app/gimpdrawable.c * gimp/app/internal_procs.c * gimp/libgimp/gimp.h * gimp/libgimp/gimpimage.c * gimp/libgimp/gimpdrawable.c * gimp/libgimp/gimpmenu.c * gimp/tools/pdbgen/pdb/drawable.pdb * gimp/tools/pdbgen/pdb/gimage.pdb Added thumbnail image preview functions. Previews are visible on the L&C&P dialogs as well as in the drawables/channels/ menus generated for plugins (see the bumpmap & Mapobject plugins). PDB interface exists to simply extract a thumbnail preview of a given size. This is much quicker & more efficient than getting the image data tile-by-tile if you only need a small image since a "preview cache" has been implemented. This cache also reduces the number of times the tiles cached is scanned since smaller previews are always generated from large ones if they exists and are valid. Some possible usages (I don't intend to implement these ideas. Just suggestions). More plugins using the thumbnail preview (ie any that use multiple images). Indication of "active image" somewhere..... Actually almost anywhere a drawable/image name appears.
1999-06-24 07:01:14 +08:00
guchar *
gimp_drawable_get_thumbnail_data (gint32 drawable_ID,
gint *width,
gint *height,
gint *bytes)
{
GParam *return_vals;
gint nreturn_vals;
1999-12-07 06:44:40 +08:00
guchar *drawable_data = NULL;
gimp/app/gimppreviewcache.c gimp/app/gimppreviewcache.h Wed Jun 23 23:52:54 BST 1999 Andy Thomas <alt@gimp.org> * gimp/app/gimppreviewcache.c * gimp/app/gimppreviewcache.h * gimp/app/drawable_cmds.c * gimp/app/gdisplay.c * gimp/app/gimpdrawableP.h * gimp/app/gimage_cmds.c * gimp/app/Makefile.am * gimp/app/layers_dialog.c * gimp/app/channel.c * gimp/app/lc_dialog.c * gimp/app/lc_dialog.h * gimp/app/lc_dialogP.h * gimp/app/layer.c * gimp/app/gimpdrawable.c * gimp/app/internal_procs.c * gimp/libgimp/gimp.h * gimp/libgimp/gimpimage.c * gimp/libgimp/gimpdrawable.c * gimp/libgimp/gimpmenu.c * gimp/tools/pdbgen/pdb/drawable.pdb * gimp/tools/pdbgen/pdb/gimage.pdb Added thumbnail image preview functions. Previews are visible on the L&C&P dialogs as well as in the drawables/channels/ menus generated for plugins (see the bumpmap & Mapobject plugins). PDB interface exists to simply extract a thumbnail preview of a given size. This is much quicker & more efficient than getting the image data tile-by-tile if you only need a small image since a "preview cache" has been implemented. This cache also reduces the number of times the tiles cached is scanned since smaller previews are always generated from large ones if they exists and are valid. Some possible usages (I don't intend to implement these ideas. Just suggestions). More plugins using the thumbnail preview (ie any that use multiple images). Indication of "active image" somewhere..... Actually almost anywhere a drawable/image name appears.
1999-06-24 07:01:14 +08:00
return_vals = gimp_run_procedure ("gimp_drawable_thumbnail",
&nreturn_vals,
PARAM_DRAWABLE, drawable_ID,
PARAM_INT32, *width,
PARAM_INT32, *height,
PARAM_END);
if (return_vals[0].data.d_status == STATUS_SUCCESS)
{
*width = return_vals[1].data.d_int32;
*height = return_vals[2].data.d_int32;
*bytes = return_vals[3].data.d_int32;
1999-12-07 06:44:40 +08:00
drawable_data = g_new (guchar, return_vals[4].data.d_int32);
g_memmove (drawable_data, return_vals[5].data.d_int32array, return_vals[4].data.d_int32);
gimp/app/gimppreviewcache.c gimp/app/gimppreviewcache.h Wed Jun 23 23:52:54 BST 1999 Andy Thomas <alt@gimp.org> * gimp/app/gimppreviewcache.c * gimp/app/gimppreviewcache.h * gimp/app/drawable_cmds.c * gimp/app/gdisplay.c * gimp/app/gimpdrawableP.h * gimp/app/gimage_cmds.c * gimp/app/Makefile.am * gimp/app/layers_dialog.c * gimp/app/channel.c * gimp/app/lc_dialog.c * gimp/app/lc_dialog.h * gimp/app/lc_dialogP.h * gimp/app/layer.c * gimp/app/gimpdrawable.c * gimp/app/internal_procs.c * gimp/libgimp/gimp.h * gimp/libgimp/gimpimage.c * gimp/libgimp/gimpdrawable.c * gimp/libgimp/gimpmenu.c * gimp/tools/pdbgen/pdb/drawable.pdb * gimp/tools/pdbgen/pdb/gimage.pdb Added thumbnail image preview functions. Previews are visible on the L&C&P dialogs as well as in the drawables/channels/ menus generated for plugins (see the bumpmap & Mapobject plugins). PDB interface exists to simply extract a thumbnail preview of a given size. This is much quicker & more efficient than getting the image data tile-by-tile if you only need a small image since a "preview cache" has been implemented. This cache also reduces the number of times the tiles cached is scanned since smaller previews are always generated from large ones if they exists and are valid. Some possible usages (I don't intend to implement these ideas. Just suggestions). More plugins using the thumbnail preview (ie any that use multiple images). Indication of "active image" somewhere..... Actually almost anywhere a drawable/image name appears.
1999-06-24 07:01:14 +08:00
}
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_data;
}