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.
This commit is contained in:
Michael Natterer 2001-03-08 02:01:52 +00:00 committed by Michael Natterer
parent 1d987a3ba7
commit 469faaf3fe
61 changed files with 711 additions and 674 deletions

View File

@ -1,3 +1,30 @@
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

View File

@ -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);

View File

@ -55,7 +55,6 @@ typedef struct _GimpLayer GimpLayer;
typedef struct _GimpLayerMask GimpLayerMask;
typedef struct _GimpImage GimpImage;
typedef GimpImage GImage;
/* data objects */

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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))

View File

@ -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))

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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,
GimpDrawable *drawable,
gint off_x,
gint off_y);
void gimage_mask_clear (GImage *gimage);
void gimage_mask_undo (GImage *gimage);
void gimage_mask_invert (GImage *gimage);
void gimage_mask_sharpen (GImage *gimage);
void gimage_mask_all (GImage *gimage);
void gimage_mask_none (GImage *gimage);
void gimage_mask_clear (GimpImage *gimage);
void gimage_mask_undo (GimpImage *gimage);
void gimage_mask_invert (GimpImage *gimage);
void gimage_mask_sharpen (GimpImage *gimage);
void gimage_mask_all (GimpImage *gimage);
void gimage_mask_none (GimpImage *gimage);
void gimage_mask_feather (GImage *gimage,
void gimage_mask_feather (GimpImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y);
void gimage_mask_border (GImage *gimage,
void gimage_mask_border (GimpImage *gimage,
gint border_radius_x,
gint border_radius_y);
void gimage_mask_grow (GImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_grow (GimpImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_shrink (GImage *gimage,
void gimage_mask_shrink (GimpImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock);
void gimage_mask_layer_alpha (GImage *gimage,
void gimage_mask_layer_alpha (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_layer_mask (GImage *gimage,
void gimage_mask_layer_mask (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_load (GImage *gimage,
void gimage_mask_load (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimage_mask_save (GImage *gimage);
GimpChannel * gimage_mask_save (GimpImage *gimage);
gboolean gimage_mask_stroke (GImage *gimage,
gboolean gimage_mask_stroke (GimpImage *gimage,
GimpDrawable *drawable);

View File

@ -20,16 +20,16 @@
#define __UNDO_H__
gboolean undo_push_group_start (GImage *gimage,
gboolean undo_push_group_start (GimpImage *gimage,
UndoType type);
gboolean undo_push_group_end (GImage *gimage);
gboolean undo_push_image (GImage *gimage,
gboolean undo_push_group_end (GimpImage *gimage);
gboolean undo_push_image (GimpImage *gimage,
GimpDrawable *drawable,
gint x1,
gint y1,
gint x2,
gint y2);
gboolean undo_push_image_mod (GImage *gimage,
gboolean undo_push_image_mod (GimpImage *gimage,
GimpDrawable *drawable,
gint x1,
gint y1,
@ -37,78 +37,78 @@ gboolean undo_push_image_mod (GImage *gimage,
gint y2,
gpointer tiles_ptr,
gboolean sparse);
gboolean undo_push_mask (GImage *gimage,
gboolean undo_push_mask (GimpImage *gimage,
gpointer mask_ptr);
gboolean undo_push_layer_displace (GImage *gimage,
gboolean undo_push_layer_displace (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_transform (GImage *gimage,
gboolean undo_push_transform (GimpImage *gimage,
gpointer tu_ptr);
gboolean undo_push_paint (GImage *gimage,
gboolean undo_push_paint (GimpImage *gimage,
gpointer pu_ptr);
gboolean undo_push_layer (GImage *gimage,
gboolean undo_push_layer (GimpImage *gimage,
UndoType type,
gpointer lu_ptr);
gboolean undo_push_layer_mod (GImage *gimage,
gboolean undo_push_layer_mod (GimpImage *gimage,
gpointer layer_ptr);
gboolean undo_push_layer_mask (GImage *gimage,
gboolean undo_push_layer_mask (GimpImage *gimage,
UndoType type,
gpointer lmu_prt);
gboolean undo_push_layer_change (GImage *gimage,
gboolean undo_push_layer_change (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_layer_reposition (GImage *gimage,
gboolean undo_push_layer_reposition (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_channel (GImage *gimage,
gboolean undo_push_channel (GimpImage *gimage,
UndoType type,
gpointer cu_ptr);
gboolean undo_push_channel_mod (GImage *gimage,
gboolean undo_push_channel_mod (GimpImage *gimage,
gpointer cmu_ptr);
gboolean undo_push_fs_to_layer (GImage *gimage,
gboolean undo_push_fs_to_layer (GimpImage *gimage,
gpointer fsu_ptr);
gboolean undo_push_fs_rigor (GImage *gimage,
gboolean undo_push_fs_rigor (GimpImage *gimage,
gint32 layer_ID);
gboolean undo_push_fs_relax (GImage *gimage,
gboolean undo_push_fs_relax (GimpImage *gimage,
gint32 layer_ID);
gboolean undo_push_gimage_mod (GImage *gimage);
gboolean undo_push_guide (GImage *gimage,
gboolean undo_push_gimage_mod (GimpImage *gimage);
gboolean undo_push_guide (GimpImage *gimage,
gpointer guide);
gboolean undo_push_image_parasite (GImage *gimage,
gboolean undo_push_image_parasite (GimpImage *gimage,
gpointer parasite);
gboolean undo_push_drawable_parasite (GImage *gimage,
gboolean undo_push_drawable_parasite (GimpImage *gimage,
GimpDrawable *drawable,
gpointer parasite);
gboolean undo_push_image_parasite_remove
(GImage *gimage,
(GimpImage *gimage,
const gchar *name);
gboolean undo_push_drawable_parasite_remove
(GImage *gimage,
(GimpImage *gimage,
GimpDrawable *drabable,
const gchar *name);
gboolean undo_push_qmask (GImage *gimage);
gboolean undo_push_resolution (GImage *gimage);
gboolean undo_push_layer_rename (GImage *gimage,
gboolean undo_push_qmask (GimpImage *gimage);
gboolean undo_push_resolution (GimpImage *gimage);
gboolean undo_push_layer_rename (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_cantundo (GImage *gimage,
gboolean undo_push_cantundo (GimpImage *gimage,
const gchar *action);
gboolean undo_pop (GImage *gimage);
gboolean undo_redo (GImage *gimage);
void undo_free (GImage *gimage);
gboolean undo_pop (GimpImage *gimage);
gboolean undo_redo (GimpImage *gimage);
void undo_free (GimpImage *gimage);
const gchar *undo_get_undo_name (GImage *gimage);
const gchar *undo_get_redo_name (GImage *gimage);
const gchar *undo_get_undo_name (GimpImage *gimage);
const gchar *undo_get_redo_name (GimpImage *gimage);
/* Stack peeking functions */
typedef gint (*undo_map_fn) (const gchar *undoitemname,
gpointer data);
void undo_map_over_undo_stack (GImage *gimage,
void undo_map_over_undo_stack (GimpImage *gimage,
undo_map_fn fn,
gpointer data);
void undo_map_over_redo_stack (GImage *gimage,
void undo_map_over_redo_stack (GimpImage *gimage,
undo_map_fn fn,
gpointer data);
UndoType undo_get_undo_top_type (GImage *gimage);
UndoType undo_get_undo_top_type (GimpImage *gimage);
/* Argument to undo_event signal emitted by gimages: */

View File

@ -60,10 +60,10 @@ typedef struct _ImageMap
static gint
image_map_do (gpointer data)
{
_ImageMap *_image_map;
GImage *gimage;
PixelRegion shadowPR;
int x, y, w, h;
_ImageMap *_image_map;
GimpImage *gimage;
PixelRegion shadowPR;
gint x, y, w, h;
_image_map = (_ImageMap *) data;

View File

@ -45,7 +45,7 @@ void
floating_sel_attach (GimpLayer *layer,
GimpDrawable *drawable)
{
GImage *gimage;
GimpImage *gimage;
GimpLayer *floating_sel;
if (! (gimage = gimp_drawable_gimage (drawable)))
@ -86,7 +86,7 @@ floating_sel_attach (GimpLayer *layer,
void
floating_sel_remove (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (layer->fs.drawable)))
return;
@ -107,7 +107,7 @@ floating_sel_remove (GimpLayer *layer)
void
floating_sel_anchor (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -148,7 +148,7 @@ floating_sel_anchor (GimpLayer *layer)
void
floating_sel_reset (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -176,7 +176,7 @@ floating_sel_to_layer (GimpLayer *layer)
gint off_x, off_y;
gint width, height;
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -346,7 +346,7 @@ void
floating_sel_rigor (GimpLayer *layer,
gboolean undo)
{
GImage *gimage = GIMP_DRAWABLE(layer)->gimage;
GimpImage *gimage = GIMP_DRAWABLE (layer)->gimage;
/* store the affected area from the drawable in the backing store */
floating_sel_store (layer,
@ -364,7 +364,7 @@ void
floating_sel_relax (GimpLayer *layer,
gboolean undo)
{
GImage *gimage = GIMP_DRAWABLE(layer)->gimage;
GimpImage *gimage = GIMP_DRAWABLE (layer)->gimage;
/* restore the contents of drawable the floating layer is attached to */
if (layer->fs.initial == FALSE)
@ -388,7 +388,7 @@ floating_sel_composite (GimpLayer *layer,
gboolean undo)
{
PixelRegion fsPR;
GImage *gimage;
GimpImage *gimage;
GimpLayer *d_layer;
gint preserve_trans;
gint active[MAX_CHANNELS];

View File

@ -1334,7 +1334,7 @@ resize_scale_warn_callback (GtkWidget *widget,
gpointer data)
{
ImageResize *image_scale = NULL;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
g_assert (data != NULL);
image_scale = (ImageResize *) data;
@ -1364,7 +1364,7 @@ resize_check_layer_scaling (ImageResize *image_scale)
*/
gboolean success = FALSE;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
GList *list = NULL;
GimpLayer *layer = NULL;
GtkWidget *dialog = NULL;

View File

@ -48,7 +48,7 @@ struct _LayerSelect
GdkPixmap *layer_pixmap;
GtkWidget *preview;
GImage *gimage;
GimpImage *gimage;
GimpLayer *current_layer;
gboolean dirty;
gint image_width;
@ -65,7 +65,7 @@ static void layer_select_backward (LayerSelect *layer_select);
static void layer_select_end (LayerSelect *layer_select,
guint32 time);
static void layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage);
GimpImage *gimage);
static void layer_select_set_layer (LayerSelect *layer_select);
static gint layer_select_events (GtkWidget *widget,
GdkEvent *event);
@ -86,9 +86,9 @@ LayerSelect *layer_select = NULL;
void
layer_select_init (GImage *gimage,
gint move,
guint32 time)
layer_select_init (GimpImage *gimage,
gint move,
guint32 time)
{
GtkWidget *frame1;
GtkWidget *frame2;
@ -277,7 +277,7 @@ layer_select_end (LayerSelect *layer_select,
static void
layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage)
GimpImage *gimage)
{
gint image_width;
gint image_height;

View File

@ -20,9 +20,9 @@
#define __LAYER_SELECT_H__
void layer_select_init (GImage *gimage,
gint move,
guint32 time);
void layer_select_init (GimpImage *gimage,
gint move,
guint32 time);
void layer_select_update_preview_size (void);

View File

@ -1820,35 +1820,35 @@ clist_to_slist (GtkCList *file_list)
* error happened and leave the dialog up. Make sure it's sensitive.
*/
static void
file_save_with_proc (GImage *gimage,
file_save_with_proc (GimpImage *gimage,
gchar *full_filename,
gchar *raw_filename,
PlugInProcDef *save_proc,
gboolean set_filename)
{
gint status = PDB_EXECUTION_ERROR;
gint status = PDB_EXECUTION_ERROR;
if (gimage != NULL)
{
gimp_image_set_save_proc (gimage, save_proc);
status = file_save (gimage,
full_filename,
raw_filename,
RUN_INTERACTIVE,
set_filename);
if (gimage != NULL)
{
gimp_image_set_save_proc (gimage, save_proc);
status = file_save (gimage,
full_filename,
raw_filename,
RUN_INTERACTIVE,
set_filename);
/* hide the file save dialog on success */
if (status == PDB_SUCCESS)
file_dialog_hide (filesave);
}
/* hide the file save dialog on success */
if (status == PDB_SUCCESS)
file_dialog_hide (filesave);
}
/* If there was an error but file_save() didn't print an error
* message, then we'd better. */
if (status != PDB_SUCCESS && status != PDB_CANCEL)
g_message (_("Save failed.\n%s"), full_filename);
/* always make file save dialog sensitive */
gtk_widget_set_sensitive (GTK_WIDGET (filesave), TRUE);
/* If there was an error but file_save() didn't print an error
* message, then we'd better. */
if (status != PDB_SUCCESS && status != PDB_CANCEL)
g_message (_("Save failed.\n%s"), full_filename);
/* always make file save dialog sensitive */
gtk_widget_set_sensitive (GTK_WIDGET (filesave), TRUE);
}

View File

@ -45,7 +45,7 @@ void
floating_sel_attach (GimpLayer *layer,
GimpDrawable *drawable)
{
GImage *gimage;
GimpImage *gimage;
GimpLayer *floating_sel;
if (! (gimage = gimp_drawable_gimage (drawable)))
@ -86,7 +86,7 @@ floating_sel_attach (GimpLayer *layer,
void
floating_sel_remove (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (layer->fs.drawable)))
return;
@ -107,7 +107,7 @@ floating_sel_remove (GimpLayer *layer)
void
floating_sel_anchor (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -148,7 +148,7 @@ floating_sel_anchor (GimpLayer *layer)
void
floating_sel_reset (GimpLayer *layer)
{
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -176,7 +176,7 @@ floating_sel_to_layer (GimpLayer *layer)
gint off_x, off_y;
gint width, height;
GImage *gimage;
GimpImage *gimage;
if (! (gimage = gimp_drawable_gimage (GIMP_DRAWABLE (layer))))
return;
@ -346,7 +346,7 @@ void
floating_sel_rigor (GimpLayer *layer,
gboolean undo)
{
GImage *gimage = GIMP_DRAWABLE(layer)->gimage;
GimpImage *gimage = GIMP_DRAWABLE (layer)->gimage;
/* store the affected area from the drawable in the backing store */
floating_sel_store (layer,
@ -364,7 +364,7 @@ void
floating_sel_relax (GimpLayer *layer,
gboolean undo)
{
GImage *gimage = GIMP_DRAWABLE(layer)->gimage;
GimpImage *gimage = GIMP_DRAWABLE (layer)->gimage;
/* restore the contents of drawable the floating layer is attached to */
if (layer->fs.initial == FALSE)
@ -388,7 +388,7 @@ floating_sel_composite (GimpLayer *layer,
gboolean undo)
{
PixelRegion fsPR;
GImage *gimage;
GimpImage *gimage;
GimpLayer *d_layer;
gint preserve_trans;
gint active[MAX_CHANNELS];

View File

@ -23,9 +23,9 @@
#include "gimpimage.h"
GImage * gimage_new (gint width,
gint height,
GimpImageBaseType base_type);
GimpImage * gimage_new (gint width,
gint height,
GimpImageBaseType base_type);
extern guint32 next_guide_id;

View File

@ -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;

View File

@ -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,
GimpDrawable *drawable,
gint off_x,
gint off_y);
void gimage_mask_clear (GImage *gimage);
void gimage_mask_undo (GImage *gimage);
void gimage_mask_invert (GImage *gimage);
void gimage_mask_sharpen (GImage *gimage);
void gimage_mask_all (GImage *gimage);
void gimage_mask_none (GImage *gimage);
void gimage_mask_clear (GimpImage *gimage);
void gimage_mask_undo (GimpImage *gimage);
void gimage_mask_invert (GimpImage *gimage);
void gimage_mask_sharpen (GimpImage *gimage);
void gimage_mask_all (GimpImage *gimage);
void gimage_mask_none (GimpImage *gimage);
void gimage_mask_feather (GImage *gimage,
void gimage_mask_feather (GimpImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y);
void gimage_mask_border (GImage *gimage,
void gimage_mask_border (GimpImage *gimage,
gint border_radius_x,
gint border_radius_y);
void gimage_mask_grow (GImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_grow (GimpImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_shrink (GImage *gimage,
void gimage_mask_shrink (GimpImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock);
void gimage_mask_layer_alpha (GImage *gimage,
void gimage_mask_layer_alpha (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_layer_mask (GImage *gimage,
void gimage_mask_layer_mask (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_load (GImage *gimage,
void gimage_mask_load (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimage_mask_save (GImage *gimage);
GimpChannel * gimage_mask_save (GimpImage *gimage);
gboolean gimage_mask_stroke (GImage *gimage,
gboolean gimage_mask_stroke (GimpImage *gimage,
GimpDrawable *drawable);

View File

@ -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))

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -48,7 +48,7 @@ struct _LayerSelect
GdkPixmap *layer_pixmap;
GtkWidget *preview;
GImage *gimage;
GimpImage *gimage;
GimpLayer *current_layer;
gboolean dirty;
gint image_width;
@ -65,7 +65,7 @@ static void layer_select_backward (LayerSelect *layer_select);
static void layer_select_end (LayerSelect *layer_select,
guint32 time);
static void layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage);
GimpImage *gimage);
static void layer_select_set_layer (LayerSelect *layer_select);
static gint layer_select_events (GtkWidget *widget,
GdkEvent *event);
@ -86,9 +86,9 @@ LayerSelect *layer_select = NULL;
void
layer_select_init (GImage *gimage,
gint move,
guint32 time)
layer_select_init (GimpImage *gimage,
gint move,
guint32 time)
{
GtkWidget *frame1;
GtkWidget *frame2;
@ -277,7 +277,7 @@ layer_select_end (LayerSelect *layer_select,
static void
layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage)
GimpImage *gimage)
{
gint image_width;
gint image_height;

View File

@ -20,9 +20,9 @@
#define __LAYER_SELECT_H__
void layer_select_init (GImage *gimage,
gint move,
guint32 time);
void layer_select_init (GimpImage *gimage,
gint move,
guint32 time);
void layer_select_update_preview_size (void);

View File

@ -1334,7 +1334,7 @@ resize_scale_warn_callback (GtkWidget *widget,
gpointer data)
{
ImageResize *image_scale = NULL;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
g_assert (data != NULL);
image_scale = (ImageResize *) data;
@ -1364,7 +1364,7 @@ resize_check_layer_scaling (ImageResize *image_scale)
*/
gboolean success = FALSE;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
GList *list = NULL;
GimpLayer *layer = NULL;
GtkWidget *dialog = NULL;

View File

@ -511,8 +511,8 @@ toolbox_drag_drop (GtkWidget *widget,
"gimp_channel");
layer_mask = (GimpLayerMask *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_layer_mask");
component = (GImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
component = (GimpImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
if (layer)
{

View File

@ -60,10 +60,10 @@ typedef struct _ImageMap
static gint
image_map_do (gpointer data)
{
_ImageMap *_image_map;
GImage *gimage;
PixelRegion shadowPR;
int x, y, w, h;
_ImageMap *_image_map;
GimpImage *gimage;
PixelRegion shadowPR;
gint x, y, w, h;
_image_map = (_ImageMap *) data;

View File

@ -48,7 +48,7 @@ struct _LayerSelect
GdkPixmap *layer_pixmap;
GtkWidget *preview;
GImage *gimage;
GimpImage *gimage;
GimpLayer *current_layer;
gboolean dirty;
gint image_width;
@ -65,7 +65,7 @@ static void layer_select_backward (LayerSelect *layer_select);
static void layer_select_end (LayerSelect *layer_select,
guint32 time);
static void layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage);
GimpImage *gimage);
static void layer_select_set_layer (LayerSelect *layer_select);
static gint layer_select_events (GtkWidget *widget,
GdkEvent *event);
@ -86,9 +86,9 @@ LayerSelect *layer_select = NULL;
void
layer_select_init (GImage *gimage,
gint move,
guint32 time)
layer_select_init (GimpImage *gimage,
gint move,
guint32 time)
{
GtkWidget *frame1;
GtkWidget *frame2;
@ -277,7 +277,7 @@ layer_select_end (LayerSelect *layer_select,
static void
layer_select_set_gimage (LayerSelect *layer_select,
GImage *gimage)
GimpImage *gimage)
{
gint image_width;
gint image_height;

View File

@ -20,9 +20,9 @@
#define __LAYER_SELECT_H__
void layer_select_init (GImage *gimage,
gint move,
guint32 time);
void layer_select_init (GimpImage *gimage,
gint move,
guint32 time);
void layer_select_update_preview_size (void);

View File

@ -28,7 +28,7 @@ void render_preview (TempBuf *preview_buf,
gint height,
gint channel);
void layers_dialog_invalidate_previews (GimpImage *gimage);
void layers_dialog_layer_merge_query (GImage *gimage,
void layers_dialog_layer_merge_query (GimpImage *gimage,
gboolean merge_visible);

View File

@ -420,12 +420,12 @@ lc_dialog_update (GimpImage *gimage)
typedef struct
{
GImage **def;
GimpImage **def;
gint *default_index;
GtkSignalFunc callback;
GtkWidget *menu;
gint num_items;
GImage *id;
GimpImage *id;
} IMCBData;
static void

View File

@ -1056,7 +1056,7 @@ void
gimp_paint_tool_finish (GimpPaintTool *paint_tool,
GimpDrawable *drawable)
{
GImage *gimage;
GimpImage *gimage;
PaintUndo *pu;
if (! (gimage = gimp_drawable_gimage (drawable)))

View File

@ -1334,7 +1334,7 @@ resize_scale_warn_callback (GtkWidget *widget,
gpointer data)
{
ImageResize *image_scale = NULL;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
g_assert (data != NULL);
image_scale = (ImageResize *) data;
@ -1364,7 +1364,7 @@ resize_check_layer_scaling (ImageResize *image_scale)
*/
gboolean success = FALSE;
GImage *gimage = NULL;
GimpImage *gimage = NULL;
GList *list = NULL;
GimpLayer *layer = NULL;
GtkWidget *dialog = NULL;

View File

@ -511,8 +511,8 @@ toolbox_drag_drop (GtkWidget *widget,
"gimp_channel");
layer_mask = (GimpLayerMask *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_layer_mask");
component = (GImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
component = (GimpImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
if (layer)
{

View File

@ -1056,7 +1056,7 @@ void
gimp_paint_tool_finish (GimpPaintTool *paint_tool,
GimpDrawable *drawable)
{
GImage *gimage;
GimpImage *gimage;
PaintUndo *pu;
if (! (gimage = gimp_drawable_gimage (drawable)))

View File

@ -24,7 +24,7 @@ Tool * tools_new_by_color_select (void);
void tools_free_by_color_select (Tool *tool);
void by_color_select_initialize (GDisplay *gdisp);
void by_color_select_initialize_by_image (GImage *gimage);
void by_color_select_initialize_by_image (GimpImage *gimage);
void by_color_select (GimpImage *gimage,
GimpDrawable *drawable,

View File

@ -127,7 +127,7 @@ static void crop_recalc (GimpTool *tool,
GimpCropTool *crop);
static void crop_start (GimpTool *tool,
GimpCropTool *crop);
static void crop_adjust_guides (GImage *gimage,
static void crop_adjust_guides (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
@ -272,14 +272,14 @@ crop_options_new (void)
static void
crop_tool_button_press (GimpTool *tool,
GdkEventButton *bevent,
GDisplay *gdisp)
GdkEventButton *bevent,
GDisplay *gdisp)
{
GimpCropTool *crop;
GimpDrawTool *draw;
crop = GIMP_CROP_TOOL(tool);
draw = GIMP_DRAW_TOOL(tool);
crop = GIMP_CROP_TOOL (tool);
draw = GIMP_DRAW_TOOL (tool);
if (tool->state == INACTIVE ||
gdisp != tool->gdisp)
@ -349,12 +349,12 @@ crop_tool_button_press (GimpTool *tool,
static void
crop_tool_button_release (GimpTool *tool,
GdkEventButton *bevent,
GDisplay *gdisp)
GdkEventButton *bevent,
GDisplay *gdisp)
{
GimpCropTool *crop;
crop = GIMP_CROP_TOOL(tool);
crop = GIMP_CROP_TOOL (tool);
gdk_pointer_ungrab (bevent->time);
gdk_flush ();
@ -383,11 +383,11 @@ crop_tool_button_release (GimpTool *tool,
}
static void
crop_adjust_guides (GImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2)
crop_adjust_guides (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2)
{
GList *glist;
@ -440,10 +440,10 @@ crop_adjust_guides (GImage *gimage,
static void
crop_tool_motion (GimpTool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp)
GdkEventMotion *mevent,
GDisplay *gdisp)
{
GimpCropTool *crop;
GimpCropTool *crop;
GimpDrawTool *draw;
GimpLayer *layer;
@ -453,8 +453,8 @@ crop_tool_motion (GimpTool *tool,
gchar size[STATUSBAR_SIZE];
gint min_x, min_y, max_x, max_y;
crop = GIMP_CROP_TOOL(tool);
draw = GIMP_DRAW_TOOL(tool);
crop = GIMP_CROP_TOOL (tool);
draw = GIMP_DRAW_TOOL (tool);
/* This is the only case when the motion events should be ignored--
we're just waiting for the button release event to crop the image */
@ -587,15 +587,15 @@ crop_tool_motion (GimpTool *tool,
static void
crop_tool_cursor_update (GimpTool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp)
GdkEventMotion *mevent,
GDisplay *gdisp)
{
GimpCropTool *crop;
GdkCursorType ctype = GIMP_MOUSE_CURSOR;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE;
crop = GIMP_CROP_TOOL(tool);
crop = GIMP_CROP_TOOL (tool);
if (tool->state == INACTIVE ||
(tool->state == ACTIVE && tool->gdisp != gdisp))
@ -816,13 +816,13 @@ crop_tool_draw (GimpDrawTool *draw)
}
void
crop_image (GImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gboolean layer_only,
gboolean crop_layers)
crop_image (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gboolean layer_only,
gboolean crop_layers)
{
GimpLayer *layer;
GimpLayer *floating_layer;
@ -834,7 +834,7 @@ crop_image (GImage *gimage,
gint off_x, off_y;
gint doff_x, doff_y;
width = x2 - x1;
width = x2 - x1;
height = y2 - y1;
/* Make sure new width and height are non-zero */
@ -965,8 +965,8 @@ crop_image (GImage *gimage,
}
static void
crop_recalc (GimpTool *tool,
GimpCropTool *crop)
crop_recalc (GimpTool *tool,
GimpCropTool *crop)
{
gdisplay_transform_coords (tool->gdisp, crop->tx1, crop->ty1,
&crop->x1, &crop->y1, FALSE);
@ -981,7 +981,7 @@ crop_start (GimpTool *tool,
static GDisplay *old_gdisp = NULL;
GimpDrawTool *draw;
draw = GIMP_DRAW_TOOL(tool);
draw = GIMP_DRAW_TOOL (tool);
crop_recalc (tool, crop);
if (! crop_info)

View File

@ -16,11 +16,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __CROP_H__
#define __CROP_H__
#ifndef __GIMP_CROP_TOOL_H__
#define __GIMP_CROP_TOOL_H__
#include "gimpdrawtool.h"
/* XXX Used? */
typedef enum
{
CROP_CROP,
RESIZE_CROP
} CropType;
#define GIMP_TYPE_CROP_TOOL (gimp_crop_tool_get_type ())
#define GIMP_CROP_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CROP_TOOL, GimpCropTool))
#define GIMP_IS_CROP_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CROP_TOOL))
@ -30,35 +40,26 @@
typedef struct _GimpCropTool GimpCropTool;
typedef struct _GimpCropToolClass GimpCropToolClass;
/* XXX Used? */
typedef enum
{
CROP_CROP,
RESIZE_CROP
} CropType;
struct _GimpCropTool
{
GimpDrawTool parent_instance;
/* DrawCore *core; */
gint startx; /* starting x coord */
gint starty; /* starting y coord */
gint startx; /* starting x coord */
gint starty; /* starting y coord */
gint lastx; /* previous x coord */
gint lasty; /* previous y coord */
gint lastx; /* previous x coord */
gint lasty; /* previous y coord */
gint x1, y1; /* upper left hand coordinate */
gint x2, y2; /* lower right hand coords */
gint x1, y1; /* upper left hand coordinate */
gint x2, y2; /* lower right hand coords */
gint srw, srh; /* width and height of corners */
gint srw, srh; /* width and height of corners */
gint tx1, ty1; /* transformed coords */
gint tx2, ty2; /* */
gint tx1, ty1; /* transformed coords */
gint tx2, ty2; /* */
guint function; /* moving or resizing */
guint context_id; /* for the statusbar */
guint function; /* moving or resizing */
guint context_id; /* for the statusbar */
};
struct _GimpCropToolClass
@ -69,7 +70,7 @@ struct _GimpCropToolClass
void gimp_crop_tool_register (void);
GtkType gimp_crop_tool_get_type (void);
GtkType gimp_crop_tool_get_type (void);
/* Keep around for the PDB, temporarily */
@ -81,4 +82,5 @@ void crop_image (GimpImage *gimage,
gboolean layer_only,
gboolean crop_layers);
#endif /* __CROP_H__ */
#endif /* __GIMP_CROP_TOOL_H__ */

View File

@ -302,7 +302,7 @@ find_contiguous_region_helper (PixelRegion *mask,
}
GimpChannel *
find_contiguous_region (GImage *gimage,
find_contiguous_region (GimpImage *gimage,
GimpDrawable *drawable,
gboolean antialias,
gint threshold,

View File

@ -1056,7 +1056,7 @@ void
gimp_paint_tool_finish (GimpPaintTool *paint_tool,
GimpDrawable *drawable)
{
GImage *gimage;
GimpImage *gimage;
PaintUndo *pu;
if (! (gimage = gimp_drawable_gimage (drawable)))

View File

@ -302,7 +302,7 @@ find_contiguous_region_helper (PixelRegion *mask,
}
GimpChannel *
find_contiguous_region (GImage *gimage,
find_contiguous_region (GimpImage *gimage,
GimpDrawable *drawable,
gboolean antialias,
gint threshold,

View File

@ -140,17 +140,17 @@ void transform_core_grid_density_changed (void);
void transform_core_showpath_changed (gint type);
/* transform functions */
TileManager * transform_core_do (GImage *gimage,
TileManager * transform_core_do (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *float_tiles,
gboolean interpolation,
GimpMatrix3 matrix,
GimpProgressFunc progress_callback,
gpointer progress_data);
TileManager * transform_core_cut (GImage *gimage,
TileManager * transform_core_cut (GimpImage *gimage,
GimpDrawable *drawable,
gboolean *new_layer);
gboolean transform_core_paste (GImage *gimage,
gboolean transform_core_paste (GimpImage *gimage,
GimpDrawable *drawable,
TileManager *tiles,
gboolean new_layer);

View File

@ -20,16 +20,16 @@
#define __UNDO_H__
gboolean undo_push_group_start (GImage *gimage,
gboolean undo_push_group_start (GimpImage *gimage,
UndoType type);
gboolean undo_push_group_end (GImage *gimage);
gboolean undo_push_image (GImage *gimage,
gboolean undo_push_group_end (GimpImage *gimage);
gboolean undo_push_image (GimpImage *gimage,
GimpDrawable *drawable,
gint x1,
gint y1,
gint x2,
gint y2);
gboolean undo_push_image_mod (GImage *gimage,
gboolean undo_push_image_mod (GimpImage *gimage,
GimpDrawable *drawable,
gint x1,
gint y1,
@ -37,78 +37,78 @@ gboolean undo_push_image_mod (GImage *gimage,
gint y2,
gpointer tiles_ptr,
gboolean sparse);
gboolean undo_push_mask (GImage *gimage,
gboolean undo_push_mask (GimpImage *gimage,
gpointer mask_ptr);
gboolean undo_push_layer_displace (GImage *gimage,
gboolean undo_push_layer_displace (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_transform (GImage *gimage,
gboolean undo_push_transform (GimpImage *gimage,
gpointer tu_ptr);
gboolean undo_push_paint (GImage *gimage,
gboolean undo_push_paint (GimpImage *gimage,
gpointer pu_ptr);
gboolean undo_push_layer (GImage *gimage,
gboolean undo_push_layer (GimpImage *gimage,
UndoType type,
gpointer lu_ptr);
gboolean undo_push_layer_mod (GImage *gimage,
gboolean undo_push_layer_mod (GimpImage *gimage,
gpointer layer_ptr);
gboolean undo_push_layer_mask (GImage *gimage,
gboolean undo_push_layer_mask (GimpImage *gimage,
UndoType type,
gpointer lmu_prt);
gboolean undo_push_layer_change (GImage *gimage,
gboolean undo_push_layer_change (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_layer_reposition (GImage *gimage,
gboolean undo_push_layer_reposition (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_channel (GImage *gimage,
gboolean undo_push_channel (GimpImage *gimage,
UndoType type,
gpointer cu_ptr);
gboolean undo_push_channel_mod (GImage *gimage,
gboolean undo_push_channel_mod (GimpImage *gimage,
gpointer cmu_ptr);
gboolean undo_push_fs_to_layer (GImage *gimage,
gboolean undo_push_fs_to_layer (GimpImage *gimage,
gpointer fsu_ptr);
gboolean undo_push_fs_rigor (GImage *gimage,
gboolean undo_push_fs_rigor (GimpImage *gimage,
gint32 layer_ID);
gboolean undo_push_fs_relax (GImage *gimage,
gboolean undo_push_fs_relax (GimpImage *gimage,
gint32 layer_ID);
gboolean undo_push_gimage_mod (GImage *gimage);
gboolean undo_push_guide (GImage *gimage,
gboolean undo_push_gimage_mod (GimpImage *gimage);
gboolean undo_push_guide (GimpImage *gimage,
gpointer guide);
gboolean undo_push_image_parasite (GImage *gimage,
gboolean undo_push_image_parasite (GimpImage *gimage,
gpointer parasite);
gboolean undo_push_drawable_parasite (GImage *gimage,
gboolean undo_push_drawable_parasite (GimpImage *gimage,
GimpDrawable *drawable,
gpointer parasite);
gboolean undo_push_image_parasite_remove
(GImage *gimage,
(GimpImage *gimage,
const gchar *name);
gboolean undo_push_drawable_parasite_remove
(GImage *gimage,
(GimpImage *gimage,
GimpDrawable *drabable,
const gchar *name);
gboolean undo_push_qmask (GImage *gimage);
gboolean undo_push_resolution (GImage *gimage);
gboolean undo_push_layer_rename (GImage *gimage,
gboolean undo_push_qmask (GimpImage *gimage);
gboolean undo_push_resolution (GimpImage *gimage);
gboolean undo_push_layer_rename (GimpImage *gimage,
GimpLayer *layer);
gboolean undo_push_cantundo (GImage *gimage,
gboolean undo_push_cantundo (GimpImage *gimage,
const gchar *action);
gboolean undo_pop (GImage *gimage);
gboolean undo_redo (GImage *gimage);
void undo_free (GImage *gimage);
gboolean undo_pop (GimpImage *gimage);
gboolean undo_redo (GimpImage *gimage);
void undo_free (GimpImage *gimage);
const gchar *undo_get_undo_name (GImage *gimage);
const gchar *undo_get_redo_name (GImage *gimage);
const gchar *undo_get_undo_name (GimpImage *gimage);
const gchar *undo_get_redo_name (GimpImage *gimage);
/* Stack peeking functions */
typedef gint (*undo_map_fn) (const gchar *undoitemname,
gpointer data);
void undo_map_over_undo_stack (GImage *gimage,
void undo_map_over_undo_stack (GimpImage *gimage,
undo_map_fn fn,
gpointer data);
void undo_map_over_redo_stack (GImage *gimage,
void undo_map_over_redo_stack (GimpImage *gimage,
undo_map_fn fn,
gpointer data);
UndoType undo_get_undo_top_type (GImage *gimage);
UndoType undo_get_undo_top_type (GimpImage *gimage);
/* Argument to undo_event signal emitted by gimages: */

View File

@ -71,7 +71,7 @@
typedef struct
{
GImage *gimage; /* image we're tracking undo info for */
GimpImage *gimage; /* image we're tracking undo info for */
GtkWidget *shell; /* dialog window */
GtkWidget *clist; /* list of undo actions */
GtkWidget *undo_button; /* button to undo an operation */
@ -82,10 +82,10 @@ typedef struct
typedef struct
{
GtkCList *clist;
gint row;
gint size;
GImage *gimage;
GtkCList *clist;
gint row;
gint size;
GimpImage *gimage;
} idle_preview_args;
/*
@ -152,9 +152,9 @@ static GdkBitmap *clear_mask = NULL;
static MaskBuf *
mask_render_preview (GImage *gimage,
gint *pwidth,
gint *pheight)
mask_render_preview (GimpImage *gimage,
gint *pwidth,
gint *pheight)
{
GimpChannel *mask;
MaskBuf *scaled_buf = NULL;
@ -396,10 +396,10 @@ undo_history_set_pixmap_idle (gpointer data)
/* check if a preview is already made, otherwise gtk_idle_add the pixmap func */
static void
undo_history_set_pixmap (GtkCList *clist,
gint row,
gint size,
GImage *gimage)
undo_history_set_pixmap (GtkCList *clist,
gint row,
gint size,
GimpImage *gimage)
{
static idle_preview_args idle;
@ -735,7 +735,7 @@ undo_history_init_redo (const char *undoitemname,
/* Publicly exported function */
GtkWidget *
undo_history_new (GImage *gimage)
undo_history_new (GimpImage *gimage)
{
undo_history_st *st;
GtkWidget *vbox;

View File

@ -511,8 +511,8 @@ toolbox_drag_drop (GtkWidget *widget,
"gimp_channel");
layer_mask = (GimpLayerMask *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_layer_mask");
component = (GImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
component = (GimpImage *) gtk_object_get_data (GTK_OBJECT (src_widget),
"gimp_component");
if (layer)
{

138
app/xcf.c
View File

@ -103,31 +103,31 @@ typedef enum
COMPRESS_FRACTAL = 3 /* Unused. */
} CompressionType;
typedef GImage* XcfLoader(XcfInfo *info);
typedef GimpImage* XcfLoader(XcfInfo *info);
static Argument* xcf_load_invoker (Argument *args);
static Argument* xcf_save_invoker (Argument *args);
static gint xcf_save_image (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_choose_format (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_image_props (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer);
static void xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static void xcf_save_prop (XcfInfo *info,
PropType prop_type,
...);
static void xcf_save_layer (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer);
static void xcf_save_channel (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static void xcf_save_hierarchy (XcfInfo *info,
TileManager *tiles);
@ -141,25 +141,25 @@ static void xcf_save_tile_rle (XcfInfo *info,
static GimpImage * xcf_load_image (XcfInfo *info);
static gboolean xcf_load_image_props (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static gboolean xcf_load_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer,
gboolean *apply_mask,
gboolean *edit_mask,
gboolean *show_mask);
static gboolean xcf_load_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static gboolean xcf_load_prop (XcfInfo *info,
PropType *prop_type,
guint32 *prop_size);
static GimpLayer * xcf_load_layer (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static GimpChannel * xcf_load_channel (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static gboolean xcf_load_hierarchy (XcfInfo *info,
TileManager *tiles);
static gboolean xcf_load_level (XcfInfo *info,
@ -332,14 +332,14 @@ xcf_init (void)
static Argument*
xcf_load_invoker (Argument *args)
{
XcfInfo info;
Argument *return_args;
GImage *gimage;
gchar *filename;
gboolean success;
gchar id[14];
XcfInfo info;
Argument *return_args;
GimpImage *gimage;
gchar *filename;
gboolean success;
gchar id[14];
gimp_add_busy_cursors();
gimp_add_busy_cursors ();
gimage = NULL;
@ -403,16 +403,16 @@ xcf_load_invoker (Argument *args)
return return_args;
}
static Argument*
static Argument *
xcf_save_invoker (Argument *args)
{
XcfInfo info;
Argument *return_args;
GImage *gimage;
gchar *filename;
gboolean success;
XcfInfo info;
Argument *return_args;
GimpImage *gimage;
gchar *filename;
gboolean success;
gimp_add_busy_cursors();
gimp_add_busy_cursors ();
success = FALSE;
@ -451,8 +451,8 @@ xcf_save_invoker (Argument *args)
}
static void
xcf_save_choose_format (XcfInfo *info,
GImage *gimage)
xcf_save_choose_format (XcfInfo *info,
GimpImage *gimage)
{
gint save_version = 0; /* default to oldest */
@ -463,8 +463,8 @@ xcf_save_choose_format (XcfInfo *info,
}
static gint
xcf_save_image (XcfInfo *info,
GImage *gimage)
xcf_save_image (XcfInfo *info,
GimpImage *gimage)
{
GimpLayer *layer;
GimpLayer *floating_layer;
@ -615,8 +615,8 @@ xcf_save_image (XcfInfo *info,
}
static void
xcf_save_image_props (XcfInfo *info,
GImage *gimage)
xcf_save_image_props (XcfInfo *info,
GimpImage *gimage)
{
/* check and see if we should save the colormap property */
if (gimage->cmap)
@ -649,7 +649,7 @@ xcf_save_image_props (XcfInfo *info,
static void
xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer)
{
if (layer == gimp_image_get_active_layer (gimage))
@ -694,7 +694,7 @@ xcf_save_layer_props (XcfInfo *info,
static void
xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
guchar col[3];
@ -839,20 +839,20 @@ write_one_path (gpointer pptr,
g_slist_foreach (bzp->path_details, write_bz_point, info);
}
static Path*
read_one_path (GImage *gimage,
XcfInfo *info)
static Path *
read_one_path (GimpImage *gimage,
XcfInfo *info)
{
Path *bzp;
gchar *name;
guint32 locked;
guint8 state;
guint32 closed;
guint32 num_points;
guint32 version; /* changed from num_paths */
Tattoo tattoo = 0;
GSList *pts_list = NULL;
PathType ptype;
Path *bzp;
gchar *name;
guint32 locked;
guint8 state;
guint32 closed;
guint32 num_points;
guint32 version; /* changed from num_paths */
Tattoo tattoo = 0;
GSList *pts_list = NULL;
PathType ptype;
info->cp += xcf_read_string (info->fp, &name, 1);
info->cp += xcf_read_int32 (info->fp, &locked, 1);
@ -926,14 +926,14 @@ write_bzpaths (PathList *paths,
g_slist_foreach( paths->bz_paths, write_one_path, info);
}
static PathList*
read_bzpaths (GImage *gimage,
XcfInfo *info)
static PathList *
read_bzpaths (GimpImage *gimage,
XcfInfo *info)
{
guint32 num_paths;
guint32 last_selected_row;
guint32 num_paths;
guint32 last_selected_row;
PathList *paths;
GSList *bzp_list = NULL;
GSList *bzp_list = NULL;
info->cp += xcf_read_int32 (info->fp, &last_selected_row, 1);
info->cp += xcf_read_int32 (info->fp, &num_paths, 1);
@ -1311,7 +1311,7 @@ xcf_save_prop (XcfInfo *info,
static void
xcf_save_layer (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer)
{
guint32 saved_pos;
@ -1371,7 +1371,7 @@ xcf_save_layer (XcfInfo *info,
static void
xcf_save_channel (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
guint32 saved_pos;
@ -1710,7 +1710,7 @@ xcf_save_tile_rle (XcfInfo *info,
static GimpImage *
xcf_load_image (XcfInfo *info)
{
GImage *gimage;
GimpImage *gimage;
GimpLayer *layer;
GimpChannel *channel;
guint32 saved_pos;
@ -1836,8 +1836,8 @@ xcf_load_image (XcfInfo *info)
}
static gboolean
xcf_load_image_props (XcfInfo *info,
GImage *gimage)
xcf_load_image_props (XcfInfo *info,
GimpImage *gimage)
{
PropType prop_type;
guint32 prop_size;
@ -2059,7 +2059,7 @@ xcf_load_image_props (XcfInfo *info,
static gboolean
xcf_load_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer,
gboolean *apply_mask,
gboolean *edit_mask,
@ -2160,11 +2160,11 @@ xcf_load_layer_props (XcfInfo *info,
static gboolean
xcf_load_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
PropType prop_type;
guint32 prop_size;
guint32 prop_size;
while (TRUE)
{
@ -2264,8 +2264,8 @@ xcf_load_prop (XcfInfo *info,
}
static GimpLayer *
xcf_load_layer (XcfInfo *info,
GImage *gimage)
xcf_load_layer (XcfInfo *info,
GimpImage *gimage)
{
GimpLayer *layer;
GimpLayerMask *layer_mask;
@ -2349,8 +2349,8 @@ xcf_load_layer (XcfInfo *info,
}
static GimpChannel *
xcf_load_channel (XcfInfo *info,
GImage *gimage)
xcf_load_channel (XcfInfo *info,
GimpImage *gimage)
{
GimpChannel *channel;
guint32 hierarchy_offset;
@ -2406,8 +2406,8 @@ error:
}
static GimpLayerMask *
xcf_load_layer_mask (XcfInfo *info,
GImage *gimage)
xcf_load_layer_mask (XcfInfo *info,
GimpImage *gimage)
{
GimpLayerMask *layer_mask;
guint32 hierarchy_offset;

View File

@ -103,31 +103,31 @@ typedef enum
COMPRESS_FRACTAL = 3 /* Unused. */
} CompressionType;
typedef GImage* XcfLoader(XcfInfo *info);
typedef GimpImage* XcfLoader(XcfInfo *info);
static Argument* xcf_load_invoker (Argument *args);
static Argument* xcf_save_invoker (Argument *args);
static gint xcf_save_image (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_choose_format (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_image_props (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static void xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer);
static void xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static void xcf_save_prop (XcfInfo *info,
PropType prop_type,
...);
static void xcf_save_layer (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer);
static void xcf_save_channel (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static void xcf_save_hierarchy (XcfInfo *info,
TileManager *tiles);
@ -141,25 +141,25 @@ static void xcf_save_tile_rle (XcfInfo *info,
static GimpImage * xcf_load_image (XcfInfo *info);
static gboolean xcf_load_image_props (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static gboolean xcf_load_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer,
gboolean *apply_mask,
gboolean *edit_mask,
gboolean *show_mask);
static gboolean xcf_load_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel);
static gboolean xcf_load_prop (XcfInfo *info,
PropType *prop_type,
guint32 *prop_size);
static GimpLayer * xcf_load_layer (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static GimpChannel * xcf_load_channel (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static GimpLayerMask * xcf_load_layer_mask (XcfInfo *info,
GImage *gimage);
GimpImage *gimage);
static gboolean xcf_load_hierarchy (XcfInfo *info,
TileManager *tiles);
static gboolean xcf_load_level (XcfInfo *info,
@ -332,14 +332,14 @@ xcf_init (void)
static Argument*
xcf_load_invoker (Argument *args)
{
XcfInfo info;
Argument *return_args;
GImage *gimage;
gchar *filename;
gboolean success;
gchar id[14];
XcfInfo info;
Argument *return_args;
GimpImage *gimage;
gchar *filename;
gboolean success;
gchar id[14];
gimp_add_busy_cursors();
gimp_add_busy_cursors ();
gimage = NULL;
@ -403,16 +403,16 @@ xcf_load_invoker (Argument *args)
return return_args;
}
static Argument*
static Argument *
xcf_save_invoker (Argument *args)
{
XcfInfo info;
Argument *return_args;
GImage *gimage;
gchar *filename;
gboolean success;
XcfInfo info;
Argument *return_args;
GimpImage *gimage;
gchar *filename;
gboolean success;
gimp_add_busy_cursors();
gimp_add_busy_cursors ();
success = FALSE;
@ -451,8 +451,8 @@ xcf_save_invoker (Argument *args)
}
static void
xcf_save_choose_format (XcfInfo *info,
GImage *gimage)
xcf_save_choose_format (XcfInfo *info,
GimpImage *gimage)
{
gint save_version = 0; /* default to oldest */
@ -463,8 +463,8 @@ xcf_save_choose_format (XcfInfo *info,
}
static gint
xcf_save_image (XcfInfo *info,
GImage *gimage)
xcf_save_image (XcfInfo *info,
GimpImage *gimage)
{
GimpLayer *layer;
GimpLayer *floating_layer;
@ -615,8 +615,8 @@ xcf_save_image (XcfInfo *info,
}
static void
xcf_save_image_props (XcfInfo *info,
GImage *gimage)
xcf_save_image_props (XcfInfo *info,
GimpImage *gimage)
{
/* check and see if we should save the colormap property */
if (gimage->cmap)
@ -649,7 +649,7 @@ xcf_save_image_props (XcfInfo *info,
static void
xcf_save_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer)
{
if (layer == gimp_image_get_active_layer (gimage))
@ -694,7 +694,7 @@ xcf_save_layer_props (XcfInfo *info,
static void
xcf_save_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
guchar col[3];
@ -839,20 +839,20 @@ write_one_path (gpointer pptr,
g_slist_foreach (bzp->path_details, write_bz_point, info);
}
static Path*
read_one_path (GImage *gimage,
XcfInfo *info)
static Path *
read_one_path (GimpImage *gimage,
XcfInfo *info)
{
Path *bzp;
gchar *name;
guint32 locked;
guint8 state;
guint32 closed;
guint32 num_points;
guint32 version; /* changed from num_paths */
Tattoo tattoo = 0;
GSList *pts_list = NULL;
PathType ptype;
Path *bzp;
gchar *name;
guint32 locked;
guint8 state;
guint32 closed;
guint32 num_points;
guint32 version; /* changed from num_paths */
Tattoo tattoo = 0;
GSList *pts_list = NULL;
PathType ptype;
info->cp += xcf_read_string (info->fp, &name, 1);
info->cp += xcf_read_int32 (info->fp, &locked, 1);
@ -926,14 +926,14 @@ write_bzpaths (PathList *paths,
g_slist_foreach( paths->bz_paths, write_one_path, info);
}
static PathList*
read_bzpaths (GImage *gimage,
XcfInfo *info)
static PathList *
read_bzpaths (GimpImage *gimage,
XcfInfo *info)
{
guint32 num_paths;
guint32 last_selected_row;
guint32 num_paths;
guint32 last_selected_row;
PathList *paths;
GSList *bzp_list = NULL;
GSList *bzp_list = NULL;
info->cp += xcf_read_int32 (info->fp, &last_selected_row, 1);
info->cp += xcf_read_int32 (info->fp, &num_paths, 1);
@ -1311,7 +1311,7 @@ xcf_save_prop (XcfInfo *info,
static void
xcf_save_layer (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer)
{
guint32 saved_pos;
@ -1371,7 +1371,7 @@ xcf_save_layer (XcfInfo *info,
static void
xcf_save_channel (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
guint32 saved_pos;
@ -1710,7 +1710,7 @@ xcf_save_tile_rle (XcfInfo *info,
static GimpImage *
xcf_load_image (XcfInfo *info)
{
GImage *gimage;
GimpImage *gimage;
GimpLayer *layer;
GimpChannel *channel;
guint32 saved_pos;
@ -1836,8 +1836,8 @@ xcf_load_image (XcfInfo *info)
}
static gboolean
xcf_load_image_props (XcfInfo *info,
GImage *gimage)
xcf_load_image_props (XcfInfo *info,
GimpImage *gimage)
{
PropType prop_type;
guint32 prop_size;
@ -2059,7 +2059,7 @@ xcf_load_image_props (XcfInfo *info,
static gboolean
xcf_load_layer_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpLayer *layer,
gboolean *apply_mask,
gboolean *edit_mask,
@ -2160,11 +2160,11 @@ xcf_load_layer_props (XcfInfo *info,
static gboolean
xcf_load_channel_props (XcfInfo *info,
GImage *gimage,
GimpImage *gimage,
GimpChannel *channel)
{
PropType prop_type;
guint32 prop_size;
guint32 prop_size;
while (TRUE)
{
@ -2264,8 +2264,8 @@ xcf_load_prop (XcfInfo *info,
}
static GimpLayer *
xcf_load_layer (XcfInfo *info,
GImage *gimage)
xcf_load_layer (XcfInfo *info,
GimpImage *gimage)
{
GimpLayer *layer;
GimpLayerMask *layer_mask;
@ -2349,8 +2349,8 @@ xcf_load_layer (XcfInfo *info,
}
static GimpChannel *
xcf_load_channel (XcfInfo *info,
GImage *gimage)
xcf_load_channel (XcfInfo *info,
GimpImage *gimage)
{
GimpChannel *channel;
guint32 hierarchy_offset;
@ -2406,8 +2406,8 @@ error:
}
static GimpLayerMask *
xcf_load_layer_mask (XcfInfo *info,
GImage *gimage)
xcf_load_layer_mask (XcfInfo *info,
GimpImage *gimage)
{
GimpLayerMask *layer_mask;
guint32 hierarchy_offset;