add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.[ch]: add new functions gimp_image_get_layer_iter(), channel_iter() and vectors_iter() which return the GList inside the resp. GimpList. * app/actions/channels-actions.c * app/actions/layers-actions.c * app/actions/vectors-actions.c * app/core/gimpimage-convert.c * app/core/gimpimage-crop.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-flip.c * app/core/gimpimage-item-list.c * app/core/gimpimage-merge.c * app/core/gimpimage-resize.c * app/core/gimpimage-rotate.c * app/core/gimpimage-scale.c * app/core/gimpimage.c * app/core/gimpimage.h * app/core/gimpprojection-construct.c * app/display/gimpdisplayshell-draw.c * app/file/file-open.c * app/tools/gimpaligntool.c * app/tools/gimpdrawtool.c * app/vectors/gimpvectors-compat.c * app/vectors/gimpvectors-export.c * app/widgets/gimplayertreeview.c * app/xcf/xcf-save.c * tools/pdbgen/pdb/image.pdb: use the new functions instead of peeking both into the image and the list. Remove inclusions of "gimplist.h" or change them into "gimpcontainer.h" if needed. * app/pdb/image-cmds.c: regenerated. svn path=/trunk/; revision=27524
This commit is contained in:
committed by
Michael Natterer
parent
c14c84ba63
commit
d1ca165b4e
@ -145,13 +145,13 @@
|
||||
#include "base/tile-manager.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawable-convert.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-colormap.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimppalette.h"
|
||||
@ -798,7 +798,7 @@ gimp_image_convert (GimpImage *image,
|
||||
|
||||
gimp_set_busy (image->gimp);
|
||||
|
||||
n_layers = g_list_length (GIMP_LIST (image->layers)->list);
|
||||
n_layers = gimp_container_num_children (GIMP_CONTAINER (image->layers));
|
||||
|
||||
switch (new_type)
|
||||
{
|
||||
@ -870,7 +870,7 @@ gimp_image_convert (GimpImage *image,
|
||||
num_found_cols = 0;
|
||||
|
||||
/* Build the histogram */
|
||||
for (list = GIMP_LIST (image->layers)->list, nth_layer = 0;
|
||||
for (list = gimp_image_get_layer_iter (image), nth_layer = 0;
|
||||
list;
|
||||
list = g_list_next (list), nth_layer++)
|
||||
{
|
||||
@ -955,7 +955,7 @@ gimp_image_convert (GimpImage *image,
|
||||
if (quantobj)
|
||||
quantobj->n_layers = n_layers;
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list, nth_layer = 0;
|
||||
for (list = gimp_image_get_layer_iter (image), nth_layer = 0;
|
||||
list;
|
||||
list = g_list_next (list), nth_layer++)
|
||||
{
|
||||
@ -1031,7 +1031,7 @@ gimp_image_convert (GimpImage *image,
|
||||
remap_table, &num_entries);
|
||||
|
||||
/* Convert all layers */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -36,7 +36,6 @@
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimppickable.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
|
||||
@ -147,7 +146,7 @@ gimp_image_crop (GimpImage *image,
|
||||
NULL);
|
||||
|
||||
/* Resize all channels */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -157,7 +156,7 @@ gimp_image_crop (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Resize all vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -171,7 +170,7 @@ gimp_image_crop (GimpImage *image,
|
||||
width, height, -x1, -y1);
|
||||
|
||||
/* crop all layers */
|
||||
list = GIMP_LIST (image->layers)->list;
|
||||
list = gimp_image_get_layer_iter (image);
|
||||
|
||||
while (list)
|
||||
{
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include "gimpimage-sample-points.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpparasitelist.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
|
||||
@ -105,7 +104,7 @@ gimp_image_duplicate (GimpImage *image)
|
||||
}
|
||||
|
||||
/* Copy the layers */
|
||||
for (list = GIMP_LIST (image->layers)->list, count = 0;
|
||||
for (list = gimp_image_get_layer_iter (image), count = 0;
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -141,7 +140,7 @@ gimp_image_duplicate (GimpImage *image)
|
||||
}
|
||||
|
||||
/* Copy the channels */
|
||||
for (list = GIMP_LIST (image->channels)->list, count = 0;
|
||||
for (list = gimp_image_get_channel_iter (image), count = 0;
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -166,7 +165,7 @@ gimp_image_duplicate (GimpImage *image)
|
||||
}
|
||||
|
||||
/* Copy any vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list, count = 0;
|
||||
for (list = gimp_image_get_vectors_iter (image), count = 0;
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpguide.h"
|
||||
#include "gimpimage.h"
|
||||
@ -32,7 +33,6 @@
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
|
||||
@ -69,15 +69,15 @@ gimp_image_flip (GimpImage *image,
|
||||
return;
|
||||
}
|
||||
|
||||
progress_max = (image->channels->num_children +
|
||||
image->layers->num_children +
|
||||
image->vectors->num_children +
|
||||
progress_max = (gimp_container_num_children (image->channels) +
|
||||
gimp_container_num_children (image->layers) +
|
||||
gimp_container_num_children (image->vectors) +
|
||||
1 /* selection */);
|
||||
|
||||
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_FLIP, NULL);
|
||||
|
||||
/* Flip all channels */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -90,7 +90,7 @@ gimp_image_flip (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Flip all vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -110,7 +110,7 @@ gimp_image_flip (GimpImage *image,
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Flip all layers */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
#include "gimpimage-item-list.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
@ -172,7 +171,7 @@ gimp_image_item_list_get_list (const GimpImage *image,
|
||||
|
||||
if (type & GIMP_ITEM_TYPE_LAYERS)
|
||||
{
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -185,7 +184,7 @@ gimp_image_item_list_get_list (const GimpImage *image,
|
||||
|
||||
if (type & GIMP_ITEM_TYPE_CHANNELS)
|
||||
{
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -198,7 +197,7 @@ gimp_image_item_list_get_list (const GimpImage *image,
|
||||
|
||||
if (type & GIMP_ITEM_TYPE_VECTORS)
|
||||
{
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
#include "vectors/gimpvectors.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-colorhash.h"
|
||||
@ -43,7 +44,6 @@
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplayermask.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpmarshal.h"
|
||||
#include "gimpparasitelist.h"
|
||||
#include "gimpundostack.h"
|
||||
@ -81,7 +81,7 @@ gimp_image_merge_visible_layers (GimpImage *image,
|
||||
had_floating_sel = TRUE;
|
||||
}
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -151,7 +151,7 @@ gimp_image_flatten (GimpImage *image,
|
||||
if (gimp_image_floating_sel (image))
|
||||
floating_sel_anchor (image->floating_sel);
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -186,7 +186,7 @@ gimp_image_merge_down (GimpImage *image,
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list, layer_list = NULL;
|
||||
for (list = gimp_image_get_layer_iter (image), layer_list = NULL;
|
||||
list && !layer_list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -236,7 +236,7 @@ gimp_image_merge_visible_vectors (GimpImage *image,
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -584,7 +584,7 @@ gimp_image_merge_layers (GimpImage *image,
|
||||
/* if the type is flatten, remove all the remaining layers */
|
||||
if (merge_type == GIMP_FLATTEN_IMAGE)
|
||||
{
|
||||
list = GIMP_LIST (image->layers)->list;
|
||||
list = gimp_image_get_layer_iter (image);
|
||||
while (list)
|
||||
{
|
||||
layer = list->data;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpguide.h"
|
||||
@ -34,7 +35,6 @@
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
|
||||
@ -79,9 +79,9 @@ gimp_image_resize_with_layers (GimpImage *image,
|
||||
|
||||
gimp_set_busy (image->gimp);
|
||||
|
||||
progress_max = (image->channels->num_children +
|
||||
image->layers->num_children +
|
||||
image->vectors->num_children +
|
||||
progress_max = (gimp_container_num_children (image->channels) +
|
||||
gimp_container_num_children (image->layers) +
|
||||
gimp_container_num_children (image->vectors) +
|
||||
1 /* selection */);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (image));
|
||||
@ -111,7 +111,7 @@ gimp_image_resize_with_layers (GimpImage *image,
|
||||
NULL);
|
||||
|
||||
/* Resize all channels */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -125,7 +125,7 @@ gimp_image_resize_with_layers (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Resize all vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -146,7 +146,7 @@ gimp_image_resize_with_layers (GimpImage *image,
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Reposition all layers */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -241,7 +241,7 @@ gimp_image_resize_to_layers (GimpImage *image,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GList *list = GIMP_LIST (image->layers)->list;
|
||||
GList *list = gimp_image_get_layer_iter (image);
|
||||
GimpItem *item;
|
||||
gint min_x, max_x;
|
||||
gint min_y, max_y;
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpguide.h"
|
||||
#include "gimpimage.h"
|
||||
@ -32,7 +33,6 @@
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
|
||||
@ -79,9 +79,9 @@ gimp_image_rotate (GimpImage *image,
|
||||
center_x = previous_image_width / 2.0;
|
||||
center_y = previous_image_height / 2.0;
|
||||
|
||||
progress_max = (image->channels->num_children +
|
||||
image->layers->num_children +
|
||||
image->vectors->num_children +
|
||||
progress_max = (gimp_container_num_children (image->channels) +
|
||||
gimp_container_num_children (image->layers) +
|
||||
gimp_container_num_children (image->vectors) +
|
||||
1 /* selection */);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (image));
|
||||
@ -114,7 +114,7 @@ gimp_image_rotate (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Rotate all channels */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -130,7 +130,7 @@ gimp_image_rotate (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Rotate all vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -167,7 +167,7 @@ gimp_image_rotate (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Rotate all layers */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "base/tile-manager.h"
|
||||
|
||||
#include "gimp.h"
|
||||
#include "gimpcontainer.h"
|
||||
#include "gimpguide.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-guides.h"
|
||||
@ -34,7 +35,6 @@
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpprojection.h"
|
||||
#include "gimpsamplepoint.h"
|
||||
@ -71,9 +71,9 @@ gimp_image_scale (GimpImage *image,
|
||||
|
||||
sub_progress = gimp_sub_progress_new (progress);
|
||||
|
||||
progress_steps = (image->channels->num_children +
|
||||
image->layers->num_children +
|
||||
image->vectors->num_children +
|
||||
progress_steps = (gimp_container_num_children (image->channels) +
|
||||
gimp_container_num_children (image->layers) +
|
||||
gimp_container_num_children (image->vectors) +
|
||||
1 /* selection */);
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (image));
|
||||
@ -104,7 +104,7 @@ gimp_image_scale (GimpImage *image,
|
||||
NULL);
|
||||
|
||||
/* Scale all channels */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -119,7 +119,7 @@ gimp_image_scale (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Scale all vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -142,7 +142,7 @@ gimp_image_scale (GimpImage *image,
|
||||
interpolation_type, sub_progress);
|
||||
|
||||
/* Scale all layers */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -331,7 +331,7 @@ gimp_image_scale_check (const GimpImage *image,
|
||||
if (new_size > current_size && new_size > max_memsize)
|
||||
return GIMP_IMAGE_SCALE_TOO_BIG;
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -1067,7 +1067,9 @@ gimp_image_size_changed (GimpViewable *viewable)
|
||||
(GFunc) gimp_viewable_size_changed,
|
||||
NULL);
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list; list; list = g_list_next (list))
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
GimpLayerMask *mask = gimp_layer_get_mask (GIMP_LAYER (list->data));
|
||||
|
||||
@ -2376,7 +2378,7 @@ gimp_image_set_tattoo_state (GimpImage *image,
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
|
||||
|
||||
/* Check that the layer tattoos don't overlap with channel or vector ones */
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -2394,7 +2396,7 @@ gimp_image_set_tattoo_state (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Now check that the channel and vectors tattoos don't overlap */
|
||||
for (list = GIMP_LIST (image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -2409,7 +2411,7 @@ gimp_image_set_tattoo_state (GimpImage *image,
|
||||
}
|
||||
|
||||
/* Find the max tattoo value in the vectors */
|
||||
for (list = GIMP_LIST (image->vectors)->list;
|
||||
for (list = gimp_image_get_vectors_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -2510,6 +2512,30 @@ gimp_image_get_vectors (const GimpImage *image)
|
||||
return image->vectors;
|
||||
}
|
||||
|
||||
GList *
|
||||
gimp_image_get_layer_iter (const GimpImage *image)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
return GIMP_LIST (image->layers)->list;
|
||||
}
|
||||
|
||||
GList *
|
||||
gimp_image_get_channel_iter (const GimpImage *image)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
return GIMP_LIST (image->channels)->list;
|
||||
}
|
||||
|
||||
GList *
|
||||
gimp_image_get_vectors_iter (const GimpImage *image)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
return GIMP_LIST (image->vectors)->list;
|
||||
}
|
||||
|
||||
GimpDrawable *
|
||||
gimp_image_get_active_drawable (const GimpImage *image)
|
||||
{
|
||||
@ -3654,7 +3680,7 @@ gimp_image_pick_correlate_layer (const GimpImage *image,
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
|
||||
|
||||
for (list = GIMP_LIST (image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
@ -416,6 +416,10 @@ GimpContainer * gimp_image_get_layers (const GimpImage *image);
|
||||
GimpContainer * gimp_image_get_channels (const GimpImage *image);
|
||||
GimpContainer * gimp_image_get_vectors (const GimpImage *image);
|
||||
|
||||
GList * gimp_image_get_layer_iter (const GimpImage *image);
|
||||
GList * gimp_image_get_channel_iter (const GimpImage *image);
|
||||
GList * gimp_image_get_vectors_iter (const GimpImage *image);
|
||||
|
||||
GimpDrawable * gimp_image_get_active_drawable (const GimpImage *image);
|
||||
GimpLayer * gimp_image_get_active_layer (const GimpImage *image);
|
||||
GimpChannel * gimp_image_get_active_channel (const GimpImage *image);
|
||||
|
||||
@ -34,7 +34,6 @@
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplayermask.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprojection.h"
|
||||
#include "gimpprojection-construct.h"
|
||||
|
||||
@ -214,7 +213,7 @@ gimp_projection_construct_layers (GimpProjection *proj,
|
||||
|
||||
reverse_list = NULL;
|
||||
|
||||
for (list = GIMP_LIST (proj->image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (proj->image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -329,7 +328,7 @@ gimp_projection_construct_channels (GimpProjection *proj,
|
||||
GList *reverse_list = NULL;
|
||||
|
||||
/* reverse the channel list */
|
||||
for (list = GIMP_LIST (proj->image->channels)->list;
|
||||
for (list = gimp_image_get_channel_iter (proj->image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
@ -387,7 +386,7 @@ gimp_projection_initialize (GimpProjection *proj,
|
||||
GList *list;
|
||||
gboolean coverage = FALSE;
|
||||
|
||||
for (list = GIMP_LIST (proj->image->layers)->list;
|
||||
for (list = gimp_image_get_layer_iter (proj->image);
|
||||
list;
|
||||
list = g_list_next (list))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user