Commit 4a0f7c58 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed all the "typedef gimage_function gimp_image_function" stuff so we

2000-12-30  Michael Natterer  <mitch@gimp.org>

	* app/gimage.[ch]: removed all the
	"typedef gimage_function gimp_image_function" stuff so we can clearly
	see what is really a GImage function.
	Removed gimage_get_ID(). Use pdb_id_to_image() instead.

	* app/airbrush.c
	* app/desaturate.c
	* app/disp_callbacks.c
	* app/equalize.c
	* app/fileops.c
	* app/floating_sel.c
	* app/gdisplay_ops.c
	* app/gimpdrawable.c
	* app/global_edit.c
	* app/image_map.c
	* app/invert.c
	* app/lc_dialog.c
	* app/paths_dialog.c
	* app/plug_in.c
	* app/xcf.c

	* app/color_cmds.c
	* app/convert_cmds.c
	* app/image_cmds.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.
parent bc3a4b29
2000-12-30 Michael Natterer <mitch@gimp.org>
* app/gimage.[ch]: removed all the
"typedef gimage_function gimp_image_function" stuff so we can clearly
see what is really a GImage function.
Removed gimage_get_ID(). Use pdb_id_to_image() instead.
* app/airbrush.c
* app/desaturate.c
* app/disp_callbacks.c
* app/equalize.c
* app/fileops.c
* app/floating_sel.c
* app/gdisplay_ops.c
* app/gimpdrawable.c
* app/global_edit.c
* app/image_map.c
* app/invert.c
* app/lc_dialog.c
* app/paths_dialog.c
* app/plug_in.c
* app/xcf.c
* app/color_cmds.c
* app/convert_cmds.c
* app/image_cmds.c
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/image.pdb: changed accordingly.
2000-12-29 Sven Neumann <sven@gimp.org>
* TODO.xml: more things to do
......
......@@ -87,7 +87,7 @@
#include "errors.h"
#include "gdisplay.h"
#include "general.h"
#include "gimage.h"
#include "gimpimage.h"
#include "gimpprogress.h"
#include "gimprc.h"
#include "gradient_select.h"
......@@ -1362,7 +1362,7 @@ plug_in_repeat (gboolean with_interface)
/* initialize the first three plug-in arguments */
args[0].value.pdb_int = (with_interface ? RUN_INTERACTIVE : RUN_WITH_LAST_VALS);
args[1].value.pdb_int = pdb_image_to_id (gdisplay->gimage);
args[2].value.pdb_int = drawable_ID (gimage_active_drawable (gdisplay->gimage));
args[2].value.pdb_int = drawable_ID (gimp_image_active_drawable (gdisplay->gimage));
/* run the plug-in procedure */
plug_in_run (last_plug_in, args, 3, FALSE, TRUE, gdisplay->ID);
......@@ -2624,7 +2624,7 @@ plug_in_callback (GtkWidget *widget,
/* initialize the first 3 plug-in arguments */
args[0].value.pdb_int = RUN_INTERACTIVE;
args[1].value.pdb_int = pdb_image_to_id (gdisplay->gimage);
args[2].value.pdb_int = drawable_ID (gimage_active_drawable (gdisplay->gimage));
args[2].value.pdb_int = drawable_ID (gimp_image_active_drawable (gdisplay->gimage));
argc = 3;
}
else
......@@ -2647,7 +2647,7 @@ plug_in_callback (GtkWidget *widget,
gdisp_ID = gdisplay->ID;
args[1].value.pdb_int = pdb_image_to_id (gdisplay->gimage);
args[2].value.pdb_int = drawable_ID (gimage_active_drawable (gdisplay->gimage));
args[2].value.pdb_int = drawable_ID (gimp_image_active_drawable (gdisplay->gimage));
argc = 3;
}
else
......
......@@ -27,7 +27,7 @@
#include "drawable.h"
#include "gdisplay.h"
#include "gradient.h"
#include "gimage.h"
#include "gimpimage.h"
#include "gimpbrush.h"
#include "gimpcontext.h"
#include "gimpui.h"
......@@ -340,7 +340,7 @@ airbrush_motion (PaintCore *paint_core,
}
else
{
gimage_get_foreground (gimage, drawable, col);
gimp_image_get_foreground (gimage, drawable, col);
col[area->bytes - 1] = OPAQUE_OPACITY;
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
......
......@@ -31,7 +31,6 @@
#include "desaturate.h"
#include "drawable.h"
#include "equalize.h"
#include "gimage.h"
#include "gimpdrawable.h"
#include "gimphistogram.h"
#include "gimpimage.h"
......@@ -960,7 +959,7 @@ histogram_invoker (Argument *args)
x1, y1, (x2 - x1), (y2 - y1), FALSE);
/* Configure the mask from the gimage's selection mask */
mask = gimage_get_mask (drawable_gimage (GIMP_DRAWABLE (drawable)));
mask = gimp_image_get_mask (drawable_gimage (GIMP_DRAWABLE (drawable)));
pixel_region_init (&maskPR, gimp_drawable_data (GIMP_DRAWABLE(mask)),
x1 + off_x, y1 + off_y, (x2 - x1), (y2 - y1), FALSE);
......
......@@ -28,7 +28,7 @@
#include "procedural_db.h"
#include "convert.h"
#include "gimage.h"
#include "gimpimage.h"
#include "palette.h"
#include "palette_entries.h"
......@@ -55,7 +55,7 @@ convert_rgb_invoker (Argument *args)
success = FALSE;
if (success)
if ((success = (gimage_base_type (gimage) != RGB)))
if ((success = (gimp_image_base_type (gimage) != RGB)))
convert_image ((void *) gimage, RGB, 0, 0, 0, 1, 0);
return procedural_db_return_args (&convert_rgb_proc, success);
......@@ -97,7 +97,7 @@ convert_grayscale_invoker (Argument *args)
success = FALSE;
if (success)
if ((success = (gimage_base_type (gimage) != GRAY)))
if ((success = (gimp_image_base_type (gimage) != GRAY)))
convert_image ((void *) gimage, GRAY, 0, 0, 0, 1, 0);
return procedural_db_return_args (&convert_grayscale_proc, success);
......@@ -162,7 +162,7 @@ convert_indexed_invoker (Argument *args)
if (success)
{
if ((success = (gimage_base_type (gimage) != INDEXED)))
if ((success = (gimp_image_base_type (gimage) != INDEXED)))
{
PaletteEntries *entries;
PaletteEntries *the_palette = NULL;
......
......@@ -340,7 +340,7 @@ edit_paste (GImage *gimage,
* it seems like the correct behavior.
*/
if (! gimage_mask_is_empty (gimage) && !paste_into)
channel_clear (gimage_get_mask (gimage));
channel_clear (gimp_image_get_mask (gimage));
/* if there's a drawable, add a new floating selection */
if (drawable != NULL)
......@@ -350,7 +350,7 @@ edit_paste (GImage *gimage,
else
{
gimp_drawable_set_gimage (GIMP_DRAWABLE (layer), gimage);
gimage_add_layer (gimage, layer, 0);
gimp_image_add_layer (gimage, layer, 0);
}
/* end the group undo */
......@@ -375,7 +375,7 @@ edit_paste_as_new (GImage *invoke,
/* create a new image (always of type RGB) */
gimage = gimage_new (paste->width, paste->height, RGB);
gimage_disable_undo (gimage);
gimp_image_undo_disable (gimage);
gimp_image_set_resolution (gimage, invoke->xresolution, invoke->yresolution);
gimp_image_set_unit (gimage, invoke->unit);
......@@ -389,9 +389,9 @@ edit_paste_as_new (GImage *invoke,
{
/* add the new layer to the image */
gimp_drawable_set_gimage (GIMP_DRAWABLE (layer), gimage);
gimage_add_layer (gimage, layer, 0);
gimp_image_add_layer (gimage, layer, 0);
gimage_enable_undo (gimage);
gimp_image_undo_enable (gimage);
gdisp = gdisplay_new (gimage, 0x0101);
gimp_context_set_display (gimp_context_get_user (), gdisp);
......@@ -414,7 +414,7 @@ edit_clear (GImage *gimage,
if (!gimage || drawable == NULL)
return FALSE;
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
if (drawable_has_alpha (drawable))
col [drawable_bytes (drawable) - 1] = OPAQUE_OPACITY;
......@@ -428,8 +428,8 @@ edit_clear (GImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimage_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
ERASE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
ERASE_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
......@@ -459,11 +459,11 @@ edit_fill (GImage *gimage,
switch (fill_type)
{
case FOREGROUND_FILL:
gimage_get_foreground (gimage, drawable, col);
gimp_image_get_foreground (gimage, drawable, col);
break;
case BACKGROUND_FILL:
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
break;
case WHITE_FILL:
......@@ -485,7 +485,7 @@ edit_fill (GImage *gimage,
default:
g_warning ("unknown fill type");
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
break;
}
......@@ -499,8 +499,8 @@ edit_fill (GImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimage_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
NORMAL_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
NORMAL_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
......@@ -517,7 +517,7 @@ global_edit_cut (GDisplay *gdisp)
/* stop any active tool */
active_tool_control (HALT, gdisp);
if (!edit_cut (gdisp->gimage, gimage_active_drawable (gdisp->gimage)))
if (!edit_cut (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage)))
return FALSE;
/* flush the display */
......@@ -529,7 +529,7 @@ global_edit_cut (GDisplay *gdisp)
gboolean
global_edit_copy (GDisplay *gdisp)
{
if (!edit_copy (gdisp->gimage, gimage_active_drawable (gdisp->gimage)))
if (!edit_copy (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage)))
return FALSE;
return TRUE;
......@@ -542,7 +542,7 @@ global_edit_paste (GDisplay *gdisp,
/* stop any active tool */
active_tool_control (HALT, gdisp);
if (!edit_paste (gdisp->gimage, gimage_active_drawable (gdisp->gimage),
if (!edit_paste (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage),
global_buf, paste_into))
return FALSE;
......@@ -613,13 +613,13 @@ named_buffer_paste_foreach (GtkWidget *widget,
{
case PASTE:
edit_paste (pn_dlg->gdisp->gimage,
gimage_active_drawable (pn_dlg->gdisp->gimage),
gimp_image_active_drawable (pn_dlg->gdisp->gimage),
nb->buf, FALSE);
break;
case PASTE_INTO:
edit_paste (pn_dlg->gdisp->gimage,
gimage_active_drawable (pn_dlg->gdisp->gimage),
gimp_image_active_drawable (pn_dlg->gdisp->gimage),
nb->buf, TRUE);
break;
......@@ -856,7 +856,8 @@ cut_named_buffer_callback (GtkWidget *widget,
gdisp = (GDisplay *) data;
new_tiles = edit_cut (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
new_tiles = edit_cut (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage));
if (new_tiles)
new_named_buffer (new_tiles, name);
gdisplays_flush ();
......@@ -892,7 +893,8 @@ copy_named_buffer_callback (GtkWidget *widget,
gdisp = (GDisplay *) data;
new_tiles = edit_copy (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
new_tiles = edit_copy (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage));
if (new_tiles)
new_named_buffer (new_tiles, name);
}
......
......@@ -25,7 +25,7 @@
#include "appenv.h"
#include "drawable.h"
#include "desaturate.h"
#include "gimage.h"
#include "gimpimage.h"
#include "paint_funcs.h"
#include "pixel_region.h"
......@@ -37,7 +37,7 @@ image_desaturate (GimpImage *gimage)
{
GimpDrawable *drawable;
drawable = gimage_active_drawable (gimage);
drawable = gimp_image_active_drawable (gimage);
if (! drawable_color (drawable))
{
......
......@@ -24,7 +24,7 @@
#include "drawable.h"
#include "equalize.h"
#include "gimage.h"
#include "gimpimage.h"
#include "gimplut.h"
#include "lut_funcs.h"
#include "gimphistogram.h"
......@@ -39,7 +39,7 @@ image_equalize (GimpImage *gimage)
{
GimpDrawable *drawable;
drawable = gimage_active_drawable (gimage);
drawable = gimp_image_active_drawable (gimage);
if (gimp_drawable_is_indexed (drawable))
{
......
......@@ -25,7 +25,7 @@
#include "appenv.h"
#include "drawable.h"
#include "invert.h"
#include "gimage.h"
#include "gimpimage.h"
#include "gimplut.h"
#include "lut_funcs.h"
#include "pixel_processor.h"
......@@ -42,7 +42,7 @@ image_invert (GimpImage *gimage)
Argument *return_vals;
gint nreturn_vals;
drawable = gimage_active_drawable (gimage);
drawable = gimp_image_active_drawable (gimage);
if (gimp_drawable_is_indexed (drawable))
{
......
......@@ -31,8 +31,8 @@
#include "layer.h"
#include "gimppreviewcache.h"
#include "gimpsignal.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "gimpparasite.h"
#include "paint_funcs.h"
#include "parasitelist.h"
......@@ -153,8 +153,8 @@ gimp_drawable_merge_shadow (GimpDrawable *drawable,
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
pixel_region_init (&shadowPR, gimage->shadow, x1, y1,
(x2 - x1), (y2 - y1), FALSE);
gimage_apply_image (gimage, drawable, &shadowPR, undo, OPAQUE_OPACITY,
REPLACE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &shadowPR, undo, OPAQUE_OPACITY,
REPLACE_MODE, NULL, x1, y1);
}
void
......@@ -196,7 +196,7 @@ gimp_drawable_fill (GimpDrawable *drawable,
c[RED_PIX] = r;
c[GREEN_PIX] = g;
c[BLUE_PIX] = b;
gimage_transform_color (gimage, drawable, c, &i, RGB);
gimp_image_transform_color (gimage, drawable, c, &i, RGB);
c[INDEXED_PIX] = i;
if (gimp_drawable_type (drawable) == INDEXEDA_GIMAGE)
c[ALPHA_I_PIX] = a;
......@@ -660,8 +660,8 @@ gimp_drawable_shadow (GimpDrawable *drawable)
if (! (gimage = gimp_drawable_gimage (drawable)))
return NULL;
return gimage_shadow (gimage, drawable->width, drawable->height,
drawable->bytes);
return gimp_image_shadow (gimage, drawable->width, drawable->height,
drawable->bytes);
}
int
......
......@@ -340,7 +340,7 @@ edit_paste (GImage *gimage,
* it seems like the correct behavior.
*/
if (! gimage_mask_is_empty (gimage) && !paste_into)
channel_clear (gimage_get_mask (gimage));
channel_clear (gimp_image_get_mask (gimage));
/* if there's a drawable, add a new floating selection */
if (drawable != NULL)
......@@ -350,7 +350,7 @@ edit_paste (GImage *gimage,
else
{
gimp_drawable_set_gimage (GIMP_DRAWABLE (layer), gimage);
gimage_add_layer (gimage, layer, 0);
gimp_image_add_layer (gimage, layer, 0);
}
/* end the group undo */
......@@ -375,7 +375,7 @@ edit_paste_as_new (GImage *invoke,
/* create a new image (always of type RGB) */
gimage = gimage_new (paste->width, paste->height, RGB);
gimage_disable_undo (gimage);
gimp_image_undo_disable (gimage);
gimp_image_set_resolution (gimage, invoke->xresolution, invoke->yresolution);
gimp_image_set_unit (gimage, invoke->unit);
......@@ -389,9 +389,9 @@ edit_paste_as_new (GImage *invoke,
{
/* add the new layer to the image */
gimp_drawable_set_gimage (GIMP_DRAWABLE (layer), gimage);
gimage_add_layer (gimage, layer, 0);
gimp_image_add_layer (gimage, layer, 0);
gimage_enable_undo (gimage);
gimp_image_undo_enable (gimage);
gdisp = gdisplay_new (gimage, 0x0101);
gimp_context_set_display (gimp_context_get_user (), gdisp);
......@@ -414,7 +414,7 @@ edit_clear (GImage *gimage,
if (!gimage || drawable == NULL)
return FALSE;
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
if (drawable_has_alpha (drawable))
col [drawable_bytes (drawable) - 1] = OPAQUE_OPACITY;
......@@ -428,8 +428,8 @@ edit_clear (GImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimage_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
ERASE_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
ERASE_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
......@@ -459,11 +459,11 @@ edit_fill (GImage *gimage,
switch (fill_type)
{
case FOREGROUND_FILL:
gimage_get_foreground (gimage, drawable, col);
gimp_image_get_foreground (gimage, drawable, col);
break;
case BACKGROUND_FILL:
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
break;
case WHITE_FILL:
......@@ -485,7 +485,7 @@ edit_fill (GImage *gimage,
default:
g_warning ("unknown fill type");
gimage_get_background (gimage, drawable, col);
gimp_image_get_background (gimage, drawable, col);
break;
}
......@@ -499,8 +499,8 @@ edit_fill (GImage *gimage,
color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimage_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
NORMAL_MODE, NULL, x1, y1);
gimp_image_apply_image (gimage, drawable, &bufPR, 1, OPAQUE_OPACITY,
NORMAL_MODE, NULL, x1, y1);
/* update the image */
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
......@@ -517,7 +517,7 @@ global_edit_cut (GDisplay *gdisp)
/* stop any active tool */
active_tool_control (HALT, gdisp);
if (!edit_cut (gdisp->gimage, gimage_active_drawable (gdisp->gimage)))
if (!edit_cut (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage)))
return FALSE;
/* flush the display */
......@@ -529,7 +529,7 @@ global_edit_cut (GDisplay *gdisp)
gboolean
global_edit_copy (GDisplay *gdisp)
{
if (!edit_copy (gdisp->gimage, gimage_active_drawable (gdisp->gimage)))
if (!edit_copy (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage)))
return FALSE;
return TRUE;
......@@ -542,7 +542,7 @@ global_edit_paste (GDisplay *gdisp,
/* stop any active tool */
active_tool_control (HALT, gdisp);
if (!edit_paste (gdisp->gimage, gimage_active_drawable (gdisp->gimage),
if (!edit_paste (gdisp->gimage, gimp_image_active_drawable (gdisp->gimage),
global_buf, paste_into))
return FALSE;
......@@ -613,13 +613,13 @@ named_buffer_paste_foreach (GtkWidget *widget,
{
case PASTE:
edit_paste (pn_dlg->gdisp->gimage,
gimage_active_drawable (pn_dlg->gdisp->gimage),
gimp_image_active_drawable (pn_dlg->gdisp->gimage),
nb->buf, FALSE);
break;
case PASTE_INTO:
edit_paste (pn_dlg->gdisp->gimage,
gimage_active_drawable (pn_dlg->gdisp->gimage),
gimp_image_active_drawable (pn_dlg->gdisp->gimage),
nb->buf, TRUE);
break;
......@@ -856,7 +856,8 @@ cut_named_buffer_callback (GtkWidget *widget,
gdisp = (GDisplay *) data;
new_tiles = edit_cut (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
new_tiles = edit_cut (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage));
if (new_tiles)
new_named_buffer (new_tiles, name);
gdisplays_flush ();
......@@ -892,7 +893,8 @@ copy_named_buffer_callback (GtkWidget *widget,
gdisp = (GDisplay *) data;
new_tiles = edit_copy (gdisp->gimage, gimage_active_drawable (gdisp->gimage));
new_tiles = edit_copy (gdisp->gimage,
gimp_image_active_drawable (gdisp->gimage));
if (new_tiles)
new_named_buffer (new_tiles, name);
}
......
......@@ -25,8 +25,8 @@
#include "appenv.h"
#include "drawable.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "image_map.h"
#include "paint_funcs.h"
#include "pixel_region.h"
......@@ -84,8 +84,8 @@ image_map_do (gpointer data)
/* apply the results */
pixel_region_init (&shadowPR, gimage->shadow, x, y, w, h, FALSE);
gimage_apply_image (gimage, _image_map->drawable, &shadowPR,
FALSE, OPAQUE_OPACITY, REPLACE_MODE, NULL, x, y);
gimp_image_apply_image (gimage, _image_map->drawable, &shadowPR,
FALSE, OPAQUE_OPACITY, REPLACE_MODE, NULL, x, y);
/* display the results */
if (_image_map->gdisp)
......
......@@ -28,8 +28,8 @@
#include "layer.h"
#include "floating_sel.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimage_mask.h"
#include "gimpimage.h"
#include "paint_funcs.h"
#include "pixel_region.h"
#include "tile_manager.h"
......@@ -56,11 +56,11 @@ floating_sel_attach (Layer *layer,
if (gimage->floating_sel != NULL)
{
floating_sel = gimage->floating_sel;
floating_sel_anchor (gimage_floating_sel (gimage));
floating_sel_anchor (gimp_image_floating_sel (gimage));
/* if we were pasting to the old floating selection, paste now to the drawable */
if (drawable == GIMP_DRAWABLE (floating_sel))
drawable = gimage_active_drawable (gimage);
drawable = gimp_image_active_drawable (gimage);
}
/* set the drawable and allocate a backing store */
......@@ -78,7 +78,7 @@ floating_sel_attach (Layer *layer,
gimage->floating_sel = layer;
/* add the layer to the gimage */
gimage_add_layer (gimage, layer, 0);
gimp_image_add_layer (gimage, layer, 0);
/* store the affected area from the drawable in the backing store */
floating_sel_rigor (layer, TRUE);
......@@ -102,7 +102,7 @@ floating_sel_remove (Layer *layer)
gimp_drawable_invalidate_preview (GIMP_DRAWABLE (layer), TRUE);
/* remove the layer from the gimage */
gimage_remove_layer (gimage, layer);
gimp_image_remove_layer (gimage, layer);
}
void
......@@ -136,7 +136,7 @@ floating_sel_anchor (Layer *layer)
GIMP_DRAWABLE (layer)->height, TRUE);
/* remove the floating selection */
gimage_remove_layer (gimage, layer);
gimp_image_remove_layer (gimage, layer);
/* end the group undo */
undo_push_group_end (gimage);
......@@ -155,13 +155,13 @@ floating_sel_reset (Layer *layer)
/* set the underlying drawable to active */
if (GIMP_IS_LAYER (layer->fs.drawable))
gimage_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
gimp_image_set_active_layer (gimage, GIMP_LAYER (layer->fs.drawable));
else if (GIMP_IS_LAYER_MASK (layer->fs.drawable))
gimage_set_active_layer (gimage,
gimp_image_set_active_layer (gimage,
GIMP_LAYER_MASK (layer->fs.drawable)->layer);
else if (GIMP_IS_CHANNEL (layer->fs.drawable))
{
gimage_set_active_channel (gimage, GIMP_CHANNEL (layer->fs.drawable));
gimp_image_set_active_channel (gimage, GIMP_CHANNEL (layer->fs.drawable));
if (gimage->layers)
gimage->active_layer = (((Layer *) gimage->layer_stack->data));
else
......@@ -465,10 +465,10 @@ floating_sel_composite (Layer *layer,
/* apply the fs with the undo specified by the value
* passed to this function
*/
gimage_apply_image (gimage, layer->fs.drawable, &fsPR,
undo, layer->opacity, layer->mode,
NULL,
(x1 - offx), (y1 - offy));
gimp_image_apply_image (gimage, layer->fs.drawable, &fsPR,
undo, layer->opacity, layer->mode,
NULL,
(x1 - offx), (y1 - offy));
/* restore preserve transparency */
if (preserve_trans)
......
......@@ -25,7 +25,7 @@
#include "appenv.h"
#include "drawable.h"
#include "desaturate.h"
#include "gimage.h"
#include "gimpimage.h"
#include "paint_funcs.h"
#include "pixel_region.h"
......@@ -37,7 +37,7 @@ image_desaturate (GimpImage *gimage)
{
GimpDrawable *drawable;
drawable = gimage_active_drawable (gimage);
drawable = gimp_image_active_drawable (gimage);
if (! drawable_color (drawable))
{
......
......@@ -32,7 +32,7 @@
#include "dialog_handler.h"
#include "disp_callbacks.h"
#include "gdisplay.h"
#include "gimage.h"
#include "gimpimage.h"
#include "gimpcontext.h"
#include "drawable.h"
#include "gimprc.h"
......@@ -260,7 +260,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
NULL);
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)))
!gimp_image_is_empty (gdisp->gimage)))
{
if (active_tool->auto_snap_to)
{
......@@ -275,7 +275,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
! active_tool->drawable ||
/* or a drawable different from the current one */
(gimage_active_drawable (gdisp->gimage) !=
(gimp_image_active_drawable (gdisp->gimage) !=
active_tool->drawable)) &&
/* and doesn't want to be preserved across drawable changes */
......@@ -287,7 +287,8 @@ gdisplay_canvas_events (GtkWidget *canvas,
/* otherwise set it's drawable if it has none */
else if (! active_tool->drawable)
{
active_tool->drawable = gimage_active_drawable (gdisp->gimage);
active_tool->drawable =
gimp_image_active_drawable (gdisp->gimage);
}
(* active_tool->button_press_func) (active_tool, bevent, gdisp);
......@@ -381,7 +382,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
gtk_grab_remove (canvas);
gdk_pointer_ungrab (bevent->time); /* fixes pointer grab bug */
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)))
!gimp_image_is_empty (gdisp->gimage)))
{
if (active_tool->state == ACTIVE)
{
......@@ -467,7 +468,7 @@ gdisplay_canvas_events (GtkWidget *canvas,
}
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)) &&
!gimp_image_is_empty (gdisp->gimage)) &&
(mevent->state & GDK_BUTTON1_MASK))
{
if (active_tool->state == ACTIVE)
......@@ -527,17 +528,18 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case GDK_Left: case GDK_Right:
case GDK_Up: case GDK_Down:
if (active_tool && !gimage_is_empty (gdisp->gimage))
if (active_tool && !gimp_image_is_empty (gdisp->gimage))
(* active_tool->arrow_keys_func) (active_tool, kevent, gdisp);
return_val = TRUE;
break;
case GDK_Tab:
if (kevent->state & GDK_MOD1_MASK && !gimage_is_empty (gdisp->gimage))
if (kevent->state & GDK_MOD1_MASK &&
!gimp_image_is_empty (gdisp->gimage))
layer_select_init (gdisp->gimage, 1, kevent->time);
if (kevent->state & GDK_CONTROL_MASK &&
!gimage_is_empty (gdisp->gimage))
!gimp_image_is_empty (gdisp->gimage))
layer_select_init (gdisp->gimage, -1, kevent->time);