mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Modified Files: ChangeLog app/Makefile.am app/channel.c
Modified Files: ChangeLog app/Makefile.am app/channel.c app/drawable_cmds.c app/drawable_cmds.h app/gimage_cmds.c app/gimage_cmds.h 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/plug_in.c app/procedural_db.c app/procedural_db.h libgimp/Makefile.am libgimp/gimp.c libgimp/gimp.h libgimp/gimpdrawable.c libgimp/gimpenums.h libgimp/gimpimage.c libgimp/gimpprotocol.c libgimp/gimpprotocol.h plug-ins/dbbrowser/dbbrowser_utils.c plug-ins/script-fu/script-fu.c plug-ins/tiff/tiff.c Added Files: app/parasite.c app/parasite.h app/parasiteF.h app/parasiteP.h app/parasite_cmds.c app/parasite_cmds.h libgimp/gimpparasite.c libgimp/gimpparasite.h Allow plug-ins (and scripts) to attach arbitrary data (parasites) to images, layers and channels that can be read back at a later time.
This commit is contained in:
parent
6217c7ee4b
commit
e2a601d444
85 changed files with 3085 additions and 11 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "gimage_mask.h"
|
||||
#include "paint_funcs.h"
|
||||
#include "palette.h"
|
||||
#include "parasite.h"
|
||||
#include "undo.h"
|
||||
#include "gimpsignal.h"
|
||||
|
||||
|
@ -150,6 +151,7 @@ static void gimp_image_init (GimpImage *gimage)
|
|||
gimage->comp_preview_valid[1] = FALSE;
|
||||
gimage->comp_preview_valid[2] = FALSE;
|
||||
gimage->comp_preview = NULL;
|
||||
gimage->parasites = NULL;
|
||||
gimage->resolution = 72.0; /* maybe should be rc-supplied default? */
|
||||
}
|
||||
|
||||
|
@ -477,6 +479,8 @@ gimp_image_destroy (GtkObject *object)
|
|||
gimp_image_free_layers (gimage);
|
||||
gimp_image_free_channels (gimage);
|
||||
channel_delete (gimage->selection_mask);
|
||||
if (gimage->parasites)
|
||||
parasite_gslist_destroy(gimage->parasites);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -855,6 +859,26 @@ gimp_image_delete_guide (GimpImage *gimage,
|
|||
}
|
||||
|
||||
|
||||
Parasite *
|
||||
gimp_image_find_parasite (const GimpImage *gimage,
|
||||
const char *creator, const char *type)
|
||||
{
|
||||
return parasite_find_in_gslist(gimage->parasites, creator, type);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_attach_parasite (GimpImage *gimage, const Parasite *parasite)
|
||||
{
|
||||
gimage->parasites = parasite_add_to_gslist(parasite, gimage->parasites);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_image_detach_parasite (GimpImage *gimage, Parasite *parasite)
|
||||
{
|
||||
gimage->parasites = g_slist_remove (gimage->parasites, parasite);
|
||||
parasite_free(parasite);
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
/* Projection functions */
|
||||
/************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue