Commit 469faaf3 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/apptypes.h app/channel_ops.c app/commands.c app/convert.[ch]

2001-03-08  Michael Natterer  <mitch@gimp.org>

	* app/apptypes.h
	* app/channel_ops.c
	* app/commands.c
	* app/convert.[ch]
	* app/fileops.c
	* app/floating_sel.c
	* app/gimage.h
	* app/gimage_mask.[ch]
	* app/gimpchannel.c
	* app/global_edit.h
	* app/image_map.c
	* app/layer_select.[ch]
	* app/layers_dialogP.h
	* app/lc_dialog.c
	* app/resize.c
	* app/toolbox.c
	* app/undo.h
	* app/undo_history.c
	* app/xcf.c
	* app/tools/gimpbycolorselecttool.h
	* app/tools/gimpcroptool.[ch]
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimppainttool.c
	* app/tools/transform_core.h: removed the GImage typedef, cleanup.
parent 1d987a3b
2001-03-08 Michael Natterer <mitch@gimp.org>
* app/apptypes.h
* app/channel_ops.c
* app/commands.c
* app/convert.[ch]
* app/fileops.c
* app/floating_sel.c
* app/gimage.h
* app/gimage_mask.[ch]
* app/gimpchannel.c
* app/global_edit.h
* app/image_map.c
* app/layer_select.[ch]
* app/layers_dialogP.h
* app/lc_dialog.c
* app/resize.c
* app/toolbox.c
* app/undo.h
* app/undo_history.c
* app/xcf.c
* app/tools/gimpbycolorselecttool.h
* app/tools/gimpcroptool.[ch]
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimppainttool.c
* app/tools/transform_core.h: removed the GImage typedef, cleanup.
2001-03-08 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
......
......@@ -1346,8 +1346,8 @@ void
dialogs_undo_history_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay *gdisp;
GImage *gimage;
GDisplay *gdisp;
GimpImage *gimage;
return_if_no_display (gdisp);
gimage = gdisp->gimage;
......@@ -1412,7 +1412,7 @@ image_resize_callback (GtkWidget *widget,
gpointer client_data)
{
ImageResize *image_resize;
GImage *gimage;
GimpImage *gimage;
image_resize = (ImageResize *) client_data;
......@@ -1466,9 +1466,9 @@ gimage_mask_feather_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1499,9 +1499,9 @@ gimage_mask_border_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1532,9 +1532,9 @@ gimage_mask_grow_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1565,9 +1565,9 @@ gimage_mask_shrink_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gint radius_x;
gint radius_y;
GimpImage *gimage;
gint radius_x;
gint radius_y;
gimage = GIMP_IMAGE (data);
......
......@@ -55,7 +55,6 @@ typedef struct _GimpLayer GimpLayer;
typedef struct _GimpLayerMask GimpLayerMask;
typedef struct _GimpImage GimpImage;
typedef GimpImage GImage;
/* data objects */
......
......@@ -514,7 +514,7 @@ offset_ok_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
......@@ -555,7 +555,7 @@ offset_halfheight_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
off_d = (OffsetDialog *) data;
gimage = off_d->gimage;
......@@ -853,8 +853,8 @@ duplicate_projection (GimpImage *oldgimage,
void
channel_ops_duplicate (GimpImage *gimage)
{
GDisplay *new_gdisp;
GImage *new_gimage;
GDisplay *new_gdisp;
GimpImage *new_gimage;
new_gimage = duplicate (gimage);
......
......@@ -1346,8 +1346,8 @@ void
dialogs_undo_history_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay *gdisp;
GImage *gimage;
GDisplay *gdisp;
GimpImage *gimage;
return_if_no_display (gdisp);
gimage = gdisp->gimage;
......@@ -1412,7 +1412,7 @@ image_resize_callback (GtkWidget *widget,
gpointer client_data)
{
ImageResize *image_resize;
GImage *gimage;
GimpImage *gimage;
image_resize = (ImageResize *) client_data;
......@@ -1466,9 +1466,9 @@ gimage_mask_feather_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1499,9 +1499,9 @@ gimage_mask_border_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1532,9 +1532,9 @@ gimage_mask_grow_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gdouble radius_x;
gdouble radius_y;
GimpImage *gimage;
gdouble radius_x;
gdouble radius_y;
gimage = GIMP_IMAGE (data);
......@@ -1565,9 +1565,9 @@ gimage_mask_shrink_callback (GtkWidget *widget,
GimpUnit unit,
gpointer data)
{
GImage *gimage;
gint radius_x;
gint radius_y;
GimpImage *gimage;
gint radius_x;
gint radius_y;
gimage = GIMP_IMAGE (data);
......
......@@ -1169,26 +1169,26 @@ remap_indexed_layer (GimpLayer *layer,
}
void
convert_image (GImage *gimage,
convert_image (GimpImage *gimage,
GimpImageBaseType new_type,
/* The following three params used only for
* new_type == INDEXED
*/
int num_cols,
gint num_cols,
ConvertDitherType dither,
int alpha_dither,
int remdups,
gint alpha_dither,
gint remdups,
ConvertPaletteType palette_type)
{
QuantizeObj *quantobj;
GimpLayer *layer;
GimpLayer *floating_layer;
GimpImageBaseType old_type;
GList *list;
GimpImageType new_layer_type;
gint new_layer_bytes;
gboolean has_alpha;
TileManager *new_tiles;
QuantizeObj *quantobj;
GimpLayer *layer;
GimpLayer *floating_layer;
GimpImageBaseType old_type;
GList *list;
GimpImageType new_layer_type;
gint new_layer_bytes;
gboolean has_alpha;
TileManager *new_tiles;
quantobj = NULL;
new_layer_type = RGBA_GIMAGE;
......
......@@ -49,13 +49,16 @@ void convert_to_rgb (GimpImage *gimage);
void convert_to_grayscale (GimpImage *gimage);
void convert_to_indexed (GimpImage *gimage);
void convert_image (GimpImage *gimage,
GimpImageBaseType ,
gint num_cols,
ConvertDitherType ,
gint alpha_dither,
gint remdups,
ConvertPaletteType );
void convert_image (GimpImage *gimage,
GimpImageBaseType new_type,
/* The following three params used only for
* new_type == INDEXED
*/
gint num_cols,
ConvertDitherType dither,
gint alpha_dither,
gint remdups,
ConvertPaletteType palette_type);
extern GimpPalette *theCustomPalette;
......
......@@ -23,19 +23,19 @@
TileManager * crop_buffer (TileManager *tiles,
gint border);
TileManager * edit_cut (GImage *gimage,
TileManager * edit_cut (GimpImage *gimage,
GimpDrawable *drawable);
TileManager * edit_copy (GImage *gimage,
TileManager * edit_copy (GimpImage *gimage,
GimpDrawable *drawable);
GimpLayer * edit_paste (GImage *gimage,
GimpLayer * edit_paste (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *paste,
gboolean paste_into);
gboolean edit_paste_as_new (GImage *gimage,
gboolean edit_paste_as_new (GimpImage *gimage,
TileManager *tiles);
gboolean edit_clear (GImage *gimage,
gboolean edit_clear (GimpImage *gimage,
GimpDrawable *drawable);
gboolean edit_fill (GImage *gimage,
gboolean edit_fill (GimpImage *gimage,
GimpDrawable *drawable,
GimpFillType fill_type);
......
......@@ -1171,7 +1171,7 @@ gimp_channel_push_undo (GimpChannel *mask)
MaskUndo *mask_undo;
TileManager *undo_tiles;
PixelRegion srcPR, destPR;
GImage *gimage;
GimpImage *gimage;
mask_undo = g_new (MaskUndo, 1);
if (gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
......
......@@ -1171,7 +1171,7 @@ gimp_channel_push_undo (GimpChannel *mask)
MaskUndo *mask_undo;
TileManager *undo_tiles;
PixelRegion srcPR, destPR;
GImage *gimage;
GimpImage *gimage;
mask_undo = g_new (MaskUndo, 1);
if (gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
......
......@@ -514,7 +514,7 @@ offset_ok_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
......@@ -555,7 +555,7 @@ offset_halfheight_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
off_d = (OffsetDialog *) data;
gimage = off_d->gimage;
......@@ -853,8 +853,8 @@ duplicate_projection (GimpImage *oldgimage,
void
channel_ops_duplicate (GimpImage *gimage)
{
GDisplay *new_gdisp;
GImage *new_gimage;
GDisplay *new_gdisp;
GimpImage *new_gimage;
new_gimage = duplicate (gimage);
......
......@@ -23,19 +23,19 @@
TileManager * crop_buffer (TileManager *tiles,
gint border);
TileManager * edit_cut (GImage *gimage,
TileManager * edit_cut (GimpImage *gimage,
GimpDrawable *drawable);
TileManager * edit_copy (GImage *gimage,
TileManager * edit_copy (GimpImage *gimage,
GimpDrawable *drawable);
GimpLayer * edit_paste (GImage *gimage,
GimpLayer * edit_paste (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *paste,
gboolean paste_into);
gboolean edit_paste_as_new (GImage *gimage,
gboolean edit_paste_as_new (GimpImage *gimage,
TileManager *tiles);
gboolean edit_clear (GImage *gimage,
gboolean edit_clear (GimpImage *gimage,
GimpDrawable *drawable);
gboolean edit_fill (GImage *gimage,
gboolean edit_fill (GimpImage *gimage,
GimpDrawable *drawable,
GimpFillType fill_type);
......
......@@ -1169,26 +1169,26 @@ remap_indexed_layer (GimpLayer *layer,
}
void
convert_image (GImage *gimage,
convert_image (GimpImage *gimage,
GimpImageBaseType new_type,
/* The following three params used only for
* new_type == INDEXED
*/
int num_cols,
gint num_cols,
ConvertDitherType dither,
int alpha_dither,
int remdups,
gint alpha_dither,
gint remdups,
ConvertPaletteType palette_type)
{
QuantizeObj *quantobj;
GimpLayer *layer;
GimpLayer *floating_layer;
GimpImageBaseType old_type;
GList *list;
GimpImageType new_layer_type;
gint new_layer_bytes;
gboolean has_alpha;
TileManager *new_tiles;
QuantizeObj *quantobj;
GimpLayer *layer;
GimpLayer *floating_layer;
GimpImageBaseType old_type;
GList *list;
GimpImageType new_layer_type;
gint new_layer_bytes;
gboolean has_alpha;
TileManager *new_tiles;
quantobj = NULL;
new_layer_type = RGBA_GIMAGE;
......
......@@ -49,13 +49,16 @@ void convert_to_rgb (GimpImage *gimage);
void convert_to_grayscale (GimpImage *gimage);
void convert_to_indexed (GimpImage *gimage);
void convert_image (GimpImage *gimage,
GimpImageBaseType ,
gint num_cols,
ConvertDitherType ,
gint alpha_dither,
gint remdups,
ConvertPaletteType );
void convert_image (GimpImage *gimage,
GimpImageBaseType new_type,
/* The following three params used only for
* new_type == INDEXED
*/
gint num_cols,
ConvertDitherType dither,
gint alpha_dither,
gint remdups,
ConvertPaletteType palette_type);
extern GimpPalette *theCustomPalette;
......
......@@ -514,7 +514,7 @@ offset_ok_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
GimpDrawable *drawable;
gint offset_x;
gint offset_y;
......@@ -555,7 +555,7 @@ offset_halfheight_callback (GtkWidget *widget,
gpointer data)
{
OffsetDialog *off_d;
GImage *gimage;
GimpImage *gimage;
off_d = (OffsetDialog *) data;
gimage = off_d->gimage;
......@@ -853,8 +853,8 @@ duplicate_projection (GimpImage *oldgimage,
void
channel_ops_duplicate (GimpImage *gimage)
{
GDisplay *new_gdisp;
GImage *new_gimage;
GDisplay *new_gdisp;
GimpImage *new_gimage;
new_gimage = duplicate (gimage);
......
......@@ -52,11 +52,11 @@ static int gimage_mask_stroking = FALSE;
/* functions */
gboolean
gimage_mask_boundary (GImage *gimage,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out)
gimage_mask_boundary (GimpImage *gimage,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out)
{
GimpDrawable *d;
GimpLayer *layer;
......@@ -124,18 +124,18 @@ gimage_mask_boundary (GImage *gimage,
gboolean
gimage_mask_bounds (GImage *gimage,
gint *x1,
gint *y1,
gint *x2,
gint *y2)
gimage_mask_bounds (GimpImage *gimage,
gint *x1,
gint *y1,
gint *x2,
gint *y2)
{
return gimp_channel_bounds (gimp_image_get_mask (gimage), x1, y1, x2, y2);
}
void
gimage_mask_invalidate (GImage *gimage)
gimage_mask_invalidate (GimpImage *gimage)
{
GimpLayer *layer;
GimpChannel *mask;
......@@ -161,16 +161,16 @@ gimage_mask_invalidate (GImage *gimage)
gint
gimage_mask_value (GImage *gimage,
gint x,
gint y)
gimage_mask_value (GimpImage *gimage,
gint x,
gint y)
{
return gimp_channel_value (gimp_image_get_mask (gimage), x, y);
}
gboolean
gimage_mask_is_empty (GImage *gimage)
gimage_mask_is_empty (GimpImage *gimage)
{
/* in order to allow stroking of selections, we need to pretend here
* that the selection mask is empty so that it doesn't mask the paint
......@@ -184,16 +184,16 @@ gimage_mask_is_empty (GImage *gimage)
void
gimage_mask_translate (GImage *gimage,
gint off_x,
gint off_y)
gimage_mask_translate (GimpImage *gimage,
gint off_x,
gint off_y)
{
gimp_channel_translate (gimp_image_get_mask (gimage), off_x, off_y);
}
TileManager *
gimage_mask_extract (GImage *gimage,
gimage_mask_extract (GimpImage *gimage,
GimpDrawable *drawable,
gboolean cut_gimage,
gboolean keep_indexed,
......@@ -345,7 +345,7 @@ gimage_mask_extract (GImage *gimage,
}
GimpLayer *
gimage_mask_float (GImage *gimage,
gimage_mask_float (GimpImage *gimage,
GimpDrawable *drawable,
gint off_x, /* optional offset */
gint off_y)
......@@ -400,28 +400,28 @@ gimage_mask_float (GImage *gimage,
void
gimage_mask_clear (GImage *gimage)
gimage_mask_clear (GimpImage *gimage)
{
gimp_channel_clear (gimp_image_get_mask (gimage));
}
void
gimage_mask_undo (GImage *gimage)
gimage_mask_undo (GimpImage *gimage)
{
gimp_channel_push_undo (gimp_image_get_mask (gimage));
}
void
gimage_mask_invert (GImage *gimage)
gimage_mask_invert (GimpImage *gimage)
{
gimp_channel_invert (gimp_image_get_mask (gimage));
}
void
gimage_mask_sharpen (GImage *gimage)
gimage_mask_sharpen (GimpImage *gimage)
{
/* No need to play with the selection visibility
* because sharpen will not change the outline
......@@ -431,23 +431,23 @@ gimage_mask_sharpen (GImage *gimage)
void
gimage_mask_all (GImage *gimage)
gimage_mask_all (GimpImage *gimage)
{
gimp_channel_all (gimp_image_get_mask (gimage));
}
void
gimage_mask_none (GImage *gimage)
gimage_mask_none (GimpImage *gimage)
{
gimp_channel_clear (gimp_image_get_mask (gimage));
}
void
gimage_mask_feather (GImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y)
gimage_mask_feather (GimpImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y)
{
/* push the current mask onto the undo stack--need to do this here because
* gimp_channel_feather doesn't do it
......@@ -464,9 +464,9 @@ gimage_mask_feather (GImage *gimage,
void
gimage_mask_border (GImage *gimage,
gint border_radius_x,
gint border_radius_y)
gimage_mask_border (GimpImage *gimage,
gint border_radius_x,
gint border_radius_y)
{
/* feather the region */
gimp_channel_border (gimp_image_get_mask (gimage),
......@@ -476,9 +476,9 @@ gimage_mask_border (GImage *gimage,
void
gimage_mask_grow (GImage *gimage,
int grow_pixels_x,
int grow_pixels_y)
gimage_mask_grow (GimpImage *gimage,
int grow_pixels_x,
int grow_pixels_y)
{
/* feather the region */
gimp_channel_grow (gimp_image_get_mask (gimage),
......@@ -488,10 +488,10 @@ gimage_mask_grow (GImage *gimage,
void
gimage_mask_shrink (GImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock)
gimage_mask_shrink (GimpImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock)
{
/* feather the region */
gimp_channel_shrink (gimp_image_get_mask (gimage),
......@@ -540,7 +540,7 @@ gimage_mask_layer_mask (GimpImage *gimage,
void
gimage_mask_load (GImage *gimage,
gimage_mask_load (GimpImage *gimage,
GimpChannel *channel)
{
/* Load the specified channel to the gimage mask */
......@@ -549,7 +549,7 @@ gimage_mask_load (GImage *gimage,
GimpChannel *
gimage_mask_save (GImage *gimage)
gimage_mask_save (GimpImage *gimage)
{
GimpChannel *new_channel;
......@@ -565,7 +565,7 @@ gimage_mask_save (GImage *gimage)
gboolean
gimage_mask_stroke (GImage *gimage,
gimage_mask_stroke (GimpImage *gimage,
GimpDrawable *drawable)
{
BoundSeg *bs_in;
......
......@@ -20,77 +20,77 @@
#define __GIMAGE_MASK_H__
gboolean gimage_mask_boundary (GImage *gimage,
gboolean gimage_mask_boundary (GimpImage *gimage,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out);
gboolean gimage_mask_bounds (GImage *gimage,
gboolean gimage_mask_bounds (GimpImage *gimage,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
void gimage_mask_invalidate (GImage *gimage);
void gimage_mask_invalidate (GimpImage *gimage);
gint gimage_mask_value (GImage *gimage,
gint gimage_mask_value (GimpImage *gimage,
gint x,
gint y);
gboolean gimage_mask_is_empty (GImage *gimage);
gboolean gimage_mask_is_empty (GimpImage *gimage);
void gimage_mask_translate (GImage *gimage,
void gimage_mask_translate (GimpImage *gimage,
gint off_x,
gint off_y);
TileManager * gimage_mask_extract (GImage *gimage,
TileManager * gimage_mask_extract (GimpImage *gimage,
GimpDrawable *drawable,
gboolean cut_gimage,
gboolean keep_indexed,
gboolean add_alpha);
GimpLayer * gimage_mask_float (GImage *gimage,
GimpLayer * gimage_mask_float (GimpImage *gimage,