gimp/libgimp/gimpparasite_pdb.c

261 lines
6.4 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-2000 Peter Mattis and Spencer Kimball
*
* gimpparasite_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.
*/
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
/* NOTE: This file is autogenerated by pdbgen.pl */
#include "gimp.h"
GimpParasite *
gimp_parasite_find (gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpParasite *parasite = NULL;
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
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_parasite_find",
&nreturn_vals,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
gimp_destroy_params (return_vals, nreturn_vals);
return parasite;
}
void
gimp_parasite_attach (GimpParasite *parasite)
{
GimpParam *return_vals;
gint nreturn_vals;
1999-10-17 08:07:55 +08:00
return_vals = gimp_run_procedure ("gimp_parasite_attach",
&nreturn_vals,
GIMP_PDB_PARASITE, parasite,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_parasite_detach (gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_parasite_detach",
&nreturn_vals,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_parasite_list (gint *num_parasites,
gchar **parasites)
{
GimpParam *return_vals;
gint nreturn_vals;
gint i;
return_vals = gimp_run_procedure ("gimp_parasite_list",
&nreturn_vals,
GIMP_PDB_END);
*num_parasites = 0;
*parasites = NULL;
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*num_parasites = return_vals[1].data.d_int32;
parasites = g_new (gchar *, *num_parasites);
for (i = 0; i < *num_parasites; i++)
parasites[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
}
gimp_destroy_params (return_vals, nreturn_vals);
}
GimpParasite *
gimp_drawable_parasite_find (gint32 drawable_ID,
gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpParasite *parasite = NULL;
return_vals = gimp_run_procedure ("gimp_drawable_parasite_find",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
gimp_destroy_params (return_vals, nreturn_vals);
return parasite;
}
void
gimp_drawable_parasite_attach (gint32 drawable_ID,
GimpParasite *parasite)
{
GimpParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_drawable_parasite_attach",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_PARASITE, parasite,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_parasite_detach (gint32 drawable_ID,
gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_drawable_parasite_detach",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_drawable_parasite_list (gint32 drawable_ID,
gint *num_parasites,
gchar **parasites)
{
GimpParam *return_vals;
gint nreturn_vals;
gint i;
return_vals = gimp_run_procedure ("gimp_drawable_parasite_list",
&nreturn_vals,
GIMP_PDB_DRAWABLE, drawable_ID,
GIMP_PDB_END);
*num_parasites = 0;
*parasites = NULL;
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*num_parasites = return_vals[1].data.d_int32;
parasites = g_new (gchar *, *num_parasites);
for (i = 0; i < *num_parasites; i++)
parasites[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
}
gimp_destroy_params (return_vals, nreturn_vals);
}
GimpParasite *
gimp_image_parasite_find (gint32 image_ID,
gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpParasite *parasite = NULL;
return_vals = gimp_run_procedure ("gimp_image_parasite_find",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
parasite = gimp_parasite_copy (&return_vals[1].data.d_parasite);
gimp_destroy_params (return_vals, nreturn_vals);
return parasite;
}
void
gimp_image_parasite_attach (gint32 image_ID,
GimpParasite *parasite)
{
GimpParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_image_parasite_attach",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_PARASITE, parasite,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_image_parasite_detach (gint32 image_ID,
gchar *name)
{
GimpParam *return_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure ("gimp_image_parasite_detach",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_STRING, name,
GIMP_PDB_END);
gimp_destroy_params (return_vals, nreturn_vals);
}
void
gimp_image_parasite_list (gint32 image_ID,
gint *num_parasites,
gchar **parasites)
{
GimpParam *return_vals;
gint nreturn_vals;
gint i;
return_vals = gimp_run_procedure ("gimp_image_parasite_list",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
*num_parasites = 0;
*parasites = NULL;
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
*num_parasites = return_vals[1].data.d_int32;
parasites = g_new (gchar *, *num_parasites);
for (i = 0; i < *num_parasites; i++)
parasites[i] = g_strdup (return_vals[2].data.d_stringarray[i]);
}
gimp_destroy_params (return_vals, nreturn_vals);
}