Michael Natterer <mitch@gimp.org>

2001-12-03  Sven Neumann  <sven@gimp.org>
	    Michael Natterer <mitch@gimp.org>

	* app/paint-funcs/paint-funcs-mmx.h: removed redefiniton of HAS_ALPHA
	macro.

	* app/core/gimp.c: reverted Daniel's change; it doesn't make the code
	simpler, only more error-prone.

	* app/gui/info-dialog.h
	* app/gui/resize-dialog.h
	* app/core/gimp.h
	* app/core/gimpbrushgenerated.h
	* app/core/gimpbrushpipe.h
	* app/core/gimpchannel.[ch]
	* app/core/gimpcontainer.h
	* app/core/gimpcoreconfig.h
	* app/core/gimpdata.h
	* app/core/gimpdatafactory.[ch]
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.h
	* app/core/gimpimagefile.h
	* app/core/gimplayer.h
	* app/core/gimplayermask.h
	* app/core/gimpmoduleinfo.h
	* app/core/gimppalette.h
	* app/core/gimpundo.h
	* app/widgets/gimpbrushfactoryview.h
	* app/widgets/gimpconstrainedhwrapbox.h
	* app/widgets/gimpcontainermenu.h
	* app/widgets/gimpcontainerview.h
	* app/widgets/gimpdialogfactory.h
	* app/widgets/gimpimagedock.h
	* app/widgets/gimplistitem.h
	* app/widgets/gimpmenuitem.h
	* app/widgets/gimpnavigationpreview.h
	* app/widgets/gimppreview.h
	* app/gimprc.h
	* app/pathP.h
	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpcolorbalancetool.h
	* app/tools/gimpcurvestool.h
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpfreeselecttool.h
	* app/tools/gimphuesaturationtool.h
	* app/tools/gimpinktool-blob.h
	* app/tools/gimpinktool.h
	* app/tools/gimpiscissorstool.h
	* app/tools/gimpmagnifytool.h
	* app/tools/gimpmeasuretool.h
	* app/tools/gimppainttool.h
	* app/tools/gimppathtool.h
	* app/tools/gimprectselecttool.h
	* app/tools/gimpthresholdtool.h
	* app/tools/gimptool.h
	* app/tools/gimptransformtool.h
	* app/base/base-config.h
	* app/base/gimplut.[ch]
	* app/base/pixel-region.h
	* app/base/pixel-surround.[ch]
	* app/base/temp-buf.[ch]
	* app/base/tile-manager-private.h
	* app/base/tile-manager.[ch]
	* app/base/tile-private.h
	* app/base/tile.[ch]
	* app/display/gimpdisplay.h
	* app/display/gimpdisplayshell-selection.h
	* app/display/gimpdisplayshell.h
	* app/gui/brush-select.h
	* app/gui/gradient-editor.h
	* app/gui/gradient-select.h: reverted most of Daniel's changes.

	There's no reason to use unsigned integers here and in lots of places
	it is even wrong.

	Then it's way too early to convert gbooleans into bitfields. This
	change may make sense in a few places but can happen later when the
	API has settled and the code is more stable.

	* app/gimprc.c: reverted Daniel's change. This is a GCC-ism and this
	code is about to die soon anyway.
This commit is contained in:
Sven Neumann
2001-12-03 13:44:59 +00:00
committed by Sven Neumann
parent ae3211fee4
commit 4ba6db4e94
97 changed files with 752 additions and 593 deletions

View File

@ -1,3 +1,86 @@
2001-12-03 Sven Neumann <sven@gimp.org>
Michael Natterer <mitch@gimp.org>
* app/paint-funcs/paint-funcs-mmx.h: removed redefiniton of HAS_ALPHA
macro.
* app/core/gimp.c: reverted Daniel's change; it doesn't make the code
simpler, only more error-prone.
* app/gui/info-dialog.h
* app/gui/resize-dialog.h
* app/core/gimp.h
* app/core/gimpbrushgenerated.h
* app/core/gimpbrushpipe.h
* app/core/gimpchannel.[ch]
* app/core/gimpcontainer.h
* app/core/gimpcoreconfig.h
* app/core/gimpdata.h
* app/core/gimpdatafactory.[ch]
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable.[ch]
* app/core/gimpimage.h
* app/core/gimpimagefile.h
* app/core/gimplayer.h
* app/core/gimplayermask.h
* app/core/gimpmoduleinfo.h
* app/core/gimppalette.h
* app/core/gimpundo.h
* app/widgets/gimpbrushfactoryview.h
* app/widgets/gimpconstrainedhwrapbox.h
* app/widgets/gimpcontainermenu.h
* app/widgets/gimpcontainerview.h
* app/widgets/gimpdialogfactory.h
* app/widgets/gimpimagedock.h
* app/widgets/gimplistitem.h
* app/widgets/gimpmenuitem.h
* app/widgets/gimpnavigationpreview.h
* app/widgets/gimppreview.h
* app/gimprc.h
* app/pathP.h
* app/tools/gimpbezierselecttool.h
* app/tools/gimpcolorbalancetool.h
* app/tools/gimpcurvestool.h
* app/tools/gimpdodgeburntool.c
* app/tools/gimpfreeselecttool.h
* app/tools/gimphuesaturationtool.h
* app/tools/gimpinktool-blob.h
* app/tools/gimpinktool.h
* app/tools/gimpiscissorstool.h
* app/tools/gimpmagnifytool.h
* app/tools/gimpmeasuretool.h
* app/tools/gimppainttool.h
* app/tools/gimppathtool.h
* app/tools/gimprectselecttool.h
* app/tools/gimpthresholdtool.h
* app/tools/gimptool.h
* app/tools/gimptransformtool.h
* app/base/base-config.h
* app/base/gimplut.[ch]
* app/base/pixel-region.h
* app/base/pixel-surround.[ch]
* app/base/temp-buf.[ch]
* app/base/tile-manager-private.h
* app/base/tile-manager.[ch]
* app/base/tile-private.h
* app/base/tile.[ch]
* app/display/gimpdisplay.h
* app/display/gimpdisplayshell-selection.h
* app/display/gimpdisplayshell.h
* app/gui/brush-select.h
* app/gui/gradient-editor.h
* app/gui/gradient-select.h: reverted most of Daniel's changes.
There's no reason to use unsigned integers here and in lots of places
it is even wrong.
Then it's way too early to convert gbooleans into bitfields. This
change may make sense in a few places but can happen later when the
API has settled and the code is more stable.
* app/gimprc.c: reverted Daniel's change. This is a GCC-ism and this
code is about to die soon anyway.
2001-12-03 Daniel Egger <degger@fhm.edu> 2001-12-03 Daniel Egger <degger@fhm.edu>
* app/core/gimp.c: Simplified logic thanks to bitfields. * app/core/gimp.c: Simplified logic thanks to bitfields.

View File

@ -29,7 +29,7 @@ struct _GimpBaseConfig
guint tile_cache_size; guint tile_cache_size;
gboolean stingy_memory_use; gboolean stingy_memory_use;
InterpolationType interpolation_type; InterpolationType interpolation_type;
guint num_processors; gint num_processors;
}; };

View File

@ -67,8 +67,8 @@ struct _ColorBalanceDialog
guchar g_lookup[256]; guchar g_lookup[256];
guchar b_lookup[256]; guchar b_lookup[256];
guint preserve_luminosity : 1; gboolean preserve_luminosity;
guint preview : 1; gboolean preview;
GimpTransferMode application_mode; GimpTransferMode application_mode;
}; };

View File

@ -70,7 +70,7 @@ struct _CurvesDialog
gint color; gint color;
gint channel; gint channel;
guint preview : 1; gboolean preview;
gint grab_point; gint grab_point;
gint last; gint last;

View File

@ -58,7 +58,7 @@ void
gimp_lut_setup (GimpLut *lut, gimp_lut_setup (GimpLut *lut,
GimpLutFunc func, GimpLutFunc func,
void *user_data, void *user_data,
guint nchannels) gint nchannels)
{ {
guint i, v; guint i, v;
gdouble val; gdouble val;
@ -92,7 +92,7 @@ void
gimp_lut_setup_exact (GimpLut *lut, gimp_lut_setup_exact (GimpLut *lut,
GimpLutFunc func, GimpLutFunc func,
void *user_data, void *user_data,
guint nchannels) gint nchannels)
{ {
gimp_lut_setup (lut, func, user_data, nchannels); gimp_lut_setup (lut, func, user_data, nchannels);
} }

View File

@ -25,7 +25,7 @@
struct _GimpLut struct _GimpLut
{ {
guchar **luts; guchar **luts;
guint nchannels; gint nchannels;
}; };
/* TODO: the GimpLutFunc should really be passed the ColorModel of the region, /* TODO: the GimpLutFunc should really be passed the ColorModel of the region,
@ -36,17 +36,18 @@ struct _GimpLut
* and do no correction as this will be handled by gimp_lut_setup * and do no correction as this will be handled by gimp_lut_setup
*/ */
typedef gfloat (*GimpLutFunc) (gpointer user_data, typedef gfloat (*GimpLutFunc) (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
GimpLut * gimp_lut_new (void); GimpLut * gimp_lut_new (void);
void gimp_lut_free (GimpLut *lut); void gimp_lut_free (GimpLut *lut);
void gimp_lut_setup (GimpLut *lut, void gimp_lut_setup (GimpLut *lut,
GimpLutFunc func, GimpLutFunc func,
gpointer user_data, gpointer user_data,
guint nchannels); gint nchannels);
/* gimp_lut_setup_exact is currently identical to gimp_lut_setup. It /* gimp_lut_setup_exact is currently identical to gimp_lut_setup. It
* however is guaranteed to never perform any interpolation or gamma * however is guaranteed to never perform any interpolation or gamma
@ -55,7 +56,7 @@ void gimp_lut_setup (GimpLut *lut,
void gimp_lut_setup_exact (GimpLut *lut, void gimp_lut_setup_exact (GimpLut *lut,
GimpLutFunc func, GimpLutFunc func,
gpointer user_data, gpointer user_data,
guint nchannels); gint nchannels);
void gimp_lut_process (GimpLut *lut, void gimp_lut_process (GimpLut *lut,
PixelRegion *srcPR, PixelRegion *srcPR,
@ -77,4 +78,5 @@ void gimp_lut_process_2 (PixelRegion *srcPR,
PixelRegion *destPR, PixelRegion *destPR,
GimpLut *lut); GimpLut *lut);
#endif /* __GIMP_LUT_H__ */ #endif /* __GIMP_LUT_H__ */

View File

@ -77,7 +77,7 @@ struct _HueSaturationDialog
gdouble saturation[7]; gdouble saturation[7];
HueRange hue_partition; HueRange hue_partition;
guint preview : 1; gboolean preview;
}; };

View File

@ -27,14 +27,14 @@ struct _PixelRegion
Tile *curtile; /* current tile */ Tile *curtile; /* current tile */
gint offx; /* tile offsets */ gint offx; /* tile offsets */
gint offy; /* tile offsets */ gint offy; /* tile offsets */
guint rowstride; /* bytes per pixel row */ gint rowstride; /* bytes per pixel row */
gint x; /* origin */ gint x; /* origin */
gint y; /* origin */ gint y; /* origin */
guint w; /* width of region */ gint w; /* width of region */
guint h; /* height of region */ gint h; /* height of region */
guint bytes; /* bytes per pixel */ gint bytes; /* bytes per pixel */
guint dirty : 1; /* will this region be dirtied? */ gboolean dirty; /* will this region be dirtied? */
guint process_count; /* used internally */ gint process_count; /* used internally */
}; };
struct _PixelRegionHolder struct _PixelRegionHolder
@ -43,18 +43,18 @@ struct _PixelRegionHolder
guchar *original_data; guchar *original_data;
gint startx; gint startx;
gint starty; gint starty;
guint count; gint count;
}; };
struct _PixelRegionIterator struct _PixelRegionIterator
{ {
GSList *pixel_regions; GSList *pixel_regions;
guint dirty_tiles; gint dirty_tiles;
guint region_width; gint region_width;
guint region_height; gint region_height;
guint portion_width; gint portion_width;
guint portion_height; gint portion_height;
guint process_count; gint process_count;
}; };

View File

@ -31,11 +31,11 @@
void void
pixel_surround_init (PixelSurround *ps, pixel_surround_init (PixelSurround *ps,
TileManager *tm, TileManager *tm,
guint w, gint w,
guint h, gint h,
guchar bg[MAX_CHANNELS]) guchar bg[MAX_CHANNELS])
{ {
guint i; gint i;
for (i = 0; i < MAX_CHANNELS; ++i) for (i = 0; i < MAX_CHANNELS; ++i)
{ {
@ -55,10 +55,10 @@ pixel_surround_init (PixelSurround *ps,
guchar * guchar *
pixel_surround_lock (PixelSurround *ps, pixel_surround_lock (PixelSurround *ps,
guint x, gint x,
guint y) gint y)
{ {
guint i, j; gint i, j;
guchar *k; guchar *k;
guchar *ptr; guchar *ptr;
@ -119,7 +119,7 @@ pixel_surround_lock (PixelSurround *ps,
return ps->buff; return ps->buff;
} }
guint gint
pixel_surround_rowstride (PixelSurround *ps) pixel_surround_rowstride (PixelSurround *ps)
{ {
return ps->row_stride; return ps->row_stride;

View File

@ -29,19 +29,19 @@ typedef struct _PixelSurround
Tile *tile; Tile *tile;
TileManager *mgr; TileManager *mgr;
guchar *buff; guchar *buff;
guint buff_size; gint buff_size;
guint bpp; gint bpp;
guint w; gint w;
guint h; gint h;
guchar bg[MAX_CHANNELS]; guchar bg[MAX_CHANNELS];
guint row_stride; gint row_stride;
} PixelSurround; } PixelSurround;
void pixel_surround_init (PixelSurround *ps, void pixel_surround_init (PixelSurround *ps,
TileManager *tm, TileManager *tm,
guint w, gint w,
guint h, gint h,
guchar bg[MAX_CHANNELS]); guchar bg[MAX_CHANNELS]);
/* return a pointer to a buffer which contains all the surrounding pixels /* return a pointer to a buffer which contains all the surrounding pixels
@ -49,10 +49,10 @@ void pixel_surround_init (PixelSurround *ps,
* otherwise just copy into our own malloced buffer and return that * otherwise just copy into our own malloced buffer and return that
*/ */
guchar * pixel_surround_lock (PixelSurround *ps, guchar * pixel_surround_lock (PixelSurround *ps,
guint x, gint x,
guint y); gint y);
guint pixel_surround_rowstride (PixelSurround *ps); gint pixel_surround_rowstride (PixelSurround *ps);
void pixel_surround_release (PixelSurround *ps); void pixel_surround_release (PixelSurround *ps);

View File

@ -54,7 +54,7 @@ static void temp_buf_to_gray (TempBuf *src_buf,
/* Memory management */ /* Memory management */
static inline guchar * static guchar *
temp_buf_allocate (guint size) temp_buf_allocate (guint size)
{ {
guchar *data; guchar *data;
@ -73,7 +73,7 @@ temp_buf_to_color (TempBuf *src_buf,
{ {
guchar *src; guchar *src;
guchar *dest; guchar *dest;
gulong num_bytes; glong num_bytes;
src = temp_buf_data (src_buf); src = temp_buf_data (src_buf);
dest = temp_buf_data (dest_buf); dest = temp_buf_data (dest_buf);
@ -97,7 +97,7 @@ temp_buf_to_gray (TempBuf *src_buf,
{ {
guchar *src; guchar *src;
guchar *dest; guchar *dest;
gulong num_bytes; glong num_bytes;
gfloat pix; gfloat pix;
src = temp_buf_data (src_buf); src = temp_buf_data (src_buf);
@ -117,20 +117,19 @@ temp_buf_to_gray (TempBuf *src_buf,
} }
TempBuf * TempBuf *
temp_buf_new (guint width, temp_buf_new (gint width,
guint height, gint height,
guint bytes, gint bytes,
gint x, gint x,
gint y, gint y,
guchar *col) guchar *col)
{ {
const gulong size = width * height * bytes; glong i;
glong i; gint j;
gint j; guchar *data;
guchar *data; TempBuf *temp;
TempBuf *temp;
g_return_val_if_fail (size > 0, NULL); g_return_val_if_fail (width > 0 && height > 0, NULL);
temp = g_new (TempBuf, 1); temp = g_new (TempBuf, 1);
@ -142,7 +141,7 @@ temp_buf_new (guint width,
temp->swapped = FALSE; temp->swapped = FALSE;
temp->filename = NULL; temp->filename = NULL;
temp->data = data = temp_buf_allocate (size); temp->data = data = temp_buf_allocate (width * height * bytes);
/* initialize the data */ /* initialize the data */
if (col) if (col)
@ -198,8 +197,8 @@ temp_buf_new (guint width,
parameters into a newly allocated tempbuf */ parameters into a newly allocated tempbuf */
TempBuf * TempBuf *
temp_buf_new_check (guint width, temp_buf_new_check (gint width,
guint height, gint height,
GimpCheckType check_type, GimpCheckType check_type,
GimpCheckSize check_size) GimpCheckSize check_size)
{ {
@ -208,7 +207,7 @@ temp_buf_new_check (guint width,
guchar check_shift = 0; guchar check_shift = 0;
guchar fg_color = 0; guchar fg_color = 0;
guchar bg_color = 0; guchar bg_color = 0;
guint i, j; gint i, j;
g_return_val_if_fail (width > 0 && height > 0, NULL); g_return_val_if_fail (width > 0 && height > 0, NULL);
@ -309,16 +308,18 @@ temp_buf_copy (TempBuf *src,
TempBuf * TempBuf *
temp_buf_resize (TempBuf *buf, temp_buf_resize (TempBuf *buf,
guint bytes, gint bytes,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint height) gint height)
{ {
/* calculate the requested size */ gint size;
const gulong size = width * height * bytes;
g_return_val_if_fail (size > 0, NULL); g_return_val_if_fail (width > 0 && height > 0, NULL);
/* calculate the requested size */
size = width * height * bytes;
/* First, configure the canvas buffer */ /* First, configure the canvas buffer */
if (!buf) if (!buf)
@ -349,11 +350,11 @@ temp_buf_resize (TempBuf *buf,
TempBuf * TempBuf *
temp_buf_scale (TempBuf *src, temp_buf_scale (TempBuf *src,
guint new_width, gint new_width,
guint new_height) gint new_height)
{ {
guint loop1; gint loop1;
guint loop2; gint loop2;
gdouble x_ratio; gdouble x_ratio;
gdouble y_ratio; gdouble y_ratio;
guchar *src_data; guchar *src_data;
@ -402,8 +403,8 @@ temp_buf_copy_area (TempBuf *src,
TempBuf *dest, TempBuf *dest,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint height, gint height,
gint dest_x, gint dest_x,
gint dest_y) gint dest_y)
{ {
@ -507,8 +508,8 @@ temp_buf_data_clear (TempBuf *temp_buf)
MaskBuf * MaskBuf *
mask_buf_new (guint width, mask_buf_new (gint width,
guint height) gint height)
{ {
static guchar empty = 0; static guchar empty = 0;

View File

@ -22,48 +22,48 @@
struct _TempBuf struct _TempBuf
{ {
guint width; gint bytes; /* the necessary info */
guint height; gint width;
gint x, y; /* origin of data source */ gint height;
gint x, y; /* origin of data source */
guint bytes : 4; /* the necessary info */ gboolean swapped; /* flag indicating whether buf is cached to disk */
guint swapped : 1; /* flag indicating whether buf is cached to disk */ gchar *filename; /* filename of cached information */
gchar *filename; /* filename of cached information */
guchar *data; /* The data buffer. Do never access this field guchar *data; /* The data buffer. Do never access this field
directly, use temp_buf_data() instead !! */ directly, use temp_buf_data() instead !! */
}; };
/* The temp buffer functions */ /* The temp buffer functions */
TempBuf * temp_buf_new (guint width, TempBuf * temp_buf_new (gint width,
guint height, gint height,
guint bytes, gint bytes,
gint x, gint x,
gint y, gint y,
guchar *col); guchar *col);
TempBuf * temp_buf_new_check (guint width, TempBuf * temp_buf_new_check (gint width,
guint height, gint height,
GimpCheckType check_type, GimpCheckType check_type,
GimpCheckSize check_size); GimpCheckSize check_size);
TempBuf * temp_buf_copy (TempBuf *src, TempBuf * temp_buf_copy (TempBuf *src,
TempBuf *dest); TempBuf *dest);
TempBuf * temp_buf_resize (TempBuf *buf, TempBuf * temp_buf_resize (TempBuf *buf,
guint bytes, gint bytes,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint height); gint height);
TempBuf * temp_buf_scale (TempBuf *buf, TempBuf * temp_buf_scale (TempBuf *buf,
guint width, gint width,
guint height); gint height);
TempBuf * temp_buf_copy_area (TempBuf *src, TempBuf * temp_buf_copy_area (TempBuf *src,
TempBuf *dest, TempBuf *dest,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint height, gint height,
gint dest_x, gint dest_x,
gint dest_y); gint dest_y);
void temp_buf_free (TempBuf *buf); void temp_buf_free (TempBuf *buf);
@ -72,8 +72,8 @@ guchar * temp_buf_data_clear (TempBuf *buf);
/* The mask buffer functions */ /* The mask buffer functions */
MaskBuf * mask_buf_new (guint width, MaskBuf * mask_buf_new (gint width,
guint height); gint height);
void mask_buf_free (MaskBuf *mask_buf); void mask_buf_free (MaskBuf *mask_buf);
guchar * mask_buf_data (MaskBuf *mask_buf); guchar * mask_buf_data (MaskBuf *mask_buf);
guchar * mask_buf_data_clear (MaskBuf *mask_buf); guchar * mask_buf_data_clear (MaskBuf *mask_buf);

View File

@ -57,14 +57,14 @@ struct _ThresholdDialog
GimpHistogramView *histogram; GimpHistogramView *histogram;
GimpHistogram *hist; GimpHistogram *hist;
GimpDrawable *drawable; GimpDrawable *drawable;
ImageMap *image_map; ImageMap *image_map;
gint color; gint color;
gint low_threshold; gint low_threshold;
gint high_threshold; gint high_threshold;
guint preview : 1; gboolean preview;
}; };

View File

@ -24,12 +24,12 @@ struct _TileManager
{ {
gint x, y; /* tile manager offsets */ gint x, y; /* tile manager offsets */
guint width; /* the width of the tiled area */ gint width; /* the width of the tiled area */
guint height; /* the height of the tiled area */ gint height; /* the height of the tiled area */
guint bpp; /* the bpp of each tile */ gint bpp; /* the bpp of each tile */
guint ntile_rows; /* the number of tiles in each row */ gint ntile_rows; /* the number of tiles in each row */
guint ntile_cols; /* the number of tiles in each columns */ gint ntile_cols; /* the number of tiles in each columns */
Tile **tiles; /* the tiles for this level */ Tile **tiles; /* the tiles for this level */
TileValidateProc validate_proc; /* this proc is called when an attempt TileValidateProc validate_proc; /* this proc is called when an attempt
@ -45,11 +45,11 @@ struct _PixelDataHandlePrivate
{ {
PixelDataHandle public; PixelDataHandle public;
TileManager *tm; TileManager *tm;
Tile *tile;
gint x1, x2, y1, y2; gint x1, x2, y1, y2;
guint readable : 1; gboolean readable;
guint writeable : 1; gboolean writeable;
guint local_buffer : 1; gboolean local_buffer;
Tile *tile;
}; };

View File

@ -32,17 +32,15 @@
#include "tile-swap.h" #include "tile-swap.h"
static inline gboolean static gint tile_manager_get_tile_num (TileManager *tm,
tile_manager_get_tile_num (TileManager *tm, gint xpixel,
gint xpixel, gint ypixel);
gint ypixel,
guint *tile_num);
TileManager * TileManager *
tile_manager_new (guint toplevel_width, tile_manager_new (gint toplevel_width,
guint toplevel_height, gint toplevel_height,
guint bpp) gint bpp)
{ {
TileManager *tm; TileManager *tm;
gint width; gint width;
@ -71,8 +69,8 @@ tile_manager_new (guint toplevel_width,
void void
tile_manager_destroy (TileManager *tm) tile_manager_destroy (TileManager *tm)
{ {
guint ntiles; gint ntiles;
guint i; gint i;
g_return_if_fail (tm != NULL); g_return_if_fail (tm != NULL);
@ -107,14 +105,15 @@ Tile *
tile_manager_get_tile (TileManager *tm, tile_manager_get_tile (TileManager *tm,
gint xpixel, gint xpixel,
gint ypixel, gint ypixel,
gboolean wantread, gint wantread,
gboolean wantwrite) gint wantwrite)
{ {
guint tile_num; gint tile_num;
g_return_val_if_fail (tm != NULL, NULL); g_return_val_if_fail (tm != NULL, NULL);
if (!tile_manager_get_tile_num (tm, xpixel, ypixel, &tile_num)) tile_num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (tile_num < 0)
return NULL; return NULL;
return tile_manager_get (tm, tile_num, wantread, wantwrite); return tile_manager_get (tm, tile_num, wantread, wantwrite);
@ -122,23 +121,23 @@ tile_manager_get_tile (TileManager *tm,
Tile * Tile *
tile_manager_get (TileManager *tm, tile_manager_get (TileManager *tm,
guint tile_num, gint tile_num,
gboolean wantread, gint wantread,
gboolean wantwrite) gint wantwrite)
{ {
Tile **tiles; Tile **tiles;
Tile **tile_ptr; Tile **tile_ptr;
guint ntiles; gint ntiles;
guint nrows, ncols; gint nrows, ncols;
gint right_tile; gint right_tile;
gint bottom_tile; gint bottom_tile;
guint i, j, k; gint i, j, k;
g_return_val_if_fail (tm != NULL, NULL); g_return_val_if_fail (tm != NULL, NULL);
ntiles = tm->ntile_rows * tm->ntile_cols; ntiles = tm->ntile_rows * tm->ntile_cols;
if (tile_num >= ntiles) if ((tile_num < 0) || (tile_num >= ntiles))
return NULL; return NULL;
if (!tm->tiles) if (!tm->tiles)
@ -176,6 +175,14 @@ tile_manager_get (TileManager *tm,
g_warning("WRITE-ONLY TILE... UNTESTED!"); g_warning("WRITE-ONLY TILE... UNTESTED!");
} }
/*
if ((*tile_ptr)->share_count &&
(*tile_ptr)->write_count)
fprintf(stderr," >> MEEPITY %d,%d << ",
(*tile_ptr)->share_count,
(*tile_ptr)->write_count
); */
if (wantread) if (wantread)
{ {
TILE_MUTEX_LOCK (*tile_ptr); TILE_MUTEX_LOCK (*tile_ptr);
@ -225,6 +232,11 @@ tile_manager_get (TileManager *tm,
(*tile_ptr)->write_count++; (*tile_ptr)->write_count++;
(*tile_ptr)->dirty = TRUE; (*tile_ptr)->dirty = TRUE;
} }
/* else
{
if ((*tile_ptr)->write_count)
fprintf(stderr,"STINK! r/o on r/w tile /%d\007 ",(*tile_ptr)->write_count);
} */
TILE_MUTEX_UNLOCK (*tile_ptr); TILE_MUTEX_UNLOCK (*tile_ptr);
tile_lock (*tile_ptr); tile_lock (*tile_ptr);
} }
@ -238,14 +250,16 @@ tile_manager_get_async (TileManager *tm,
gint ypixel) gint ypixel)
{ {
Tile *tile_ptr; Tile *tile_ptr;
guint tile_num; gint tile_num;
g_return_if_fail (tm != NULL); g_return_if_fail (tm != NULL);
if (!tile_manager_get_tile_num (tm, xpixel, ypixel, &tile_num)) tile_num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (tile_num < 0)
return; return;
tile_ptr = tm->tiles[tile_num]; tile_ptr = tm->tiles[tile_num];
tile_swap_in_async (tile_ptr); tile_swap_in_async (tile_ptr);
} }
@ -260,6 +274,17 @@ tile_manager_validate (TileManager *tm,
if (tm->validate_proc) if (tm->validate_proc)
(* tm->validate_proc) (tm, tile); (* tm->validate_proc) (tm, tile);
/* DEBUG STUFF -> if (tm->user_data)
{
fprintf(stderr,"V%p ",tm->user_data);
fprintf(stderr,"V");
}
else
{
fprintf(stderr,"v");
} */
} }
void void
@ -295,12 +320,13 @@ tile_invalidate_tile (Tile **tile_ptr,
gint xpixel, gint xpixel,
gint ypixel) gint ypixel)
{ {
guint tile_num; gint tile_num;
g_return_if_fail (tile_ptr != NULL); g_return_if_fail (tile_ptr != NULL);
g_return_if_fail (tm != NULL); g_return_if_fail (tm != NULL);
if (!tile_manager_get_tile_num (tm, xpixel, ypixel, &tile_num)) tile_num = tile_manager_get_tile_num (tm, xpixel, ypixel);
if (tile_num < 0)
return; return;
tile_invalidate (tile_ptr, tm, tile_num); tile_invalidate (tile_ptr, tm, tile_num);
@ -310,7 +336,7 @@ tile_invalidate_tile (Tile **tile_ptr,
void void
tile_invalidate (Tile **tile_ptr, tile_invalidate (Tile **tile_ptr,
TileManager *tm, TileManager *tm,
guint tile_num) gint tile_num)
{ {
Tile *tile = *tile_ptr; Tile *tile = *tile_ptr;
@ -364,13 +390,24 @@ tile_manager_map_tile (TileManager *tm,
gint ypixel, gint ypixel,
Tile *srctile) Tile *srctile)
{ {
guint tile_num; gint tile_row;
gint tile_col;
gint tile_num;
g_return_if_fail (tm != NULL);
g_return_if_fail (srctile != NULL); g_return_if_fail (srctile != NULL);
if (!tile_manager_get_tile_num (tm, xpixel, ypixel, &tile_num)) if ((xpixel < 0) || (xpixel >= tm->width) ||
return; (ypixel < 0) || (ypixel >= tm->height))
{
g_warning ("tile_manager_map_tile: tile co-ord out of range.");
return;
}
tile_row = ypixel / TILE_HEIGHT;
tile_col = xpixel / TILE_WIDTH;
tile_num = tile_row * tm->ntile_cols + tile_col;
tile_manager_map (tm, tile_num, srctile); tile_manager_map (tm, tile_num, srctile);
} }
@ -415,6 +452,8 @@ tile_manager_map (TileManager *tm,
{ {
for (j = 0; j < ncols; j++, k++) for (j = 0; j < ncols; j++, k++)
{ {
/* printf(",");fflush(stdout);*/
tiles[k] = g_new (Tile, 1); tiles[k] = g_new (Tile, 1);
tile_init (tiles[k], tm->bpp); tile_init (tiles[k], tm->bpp);
tile_attach (tiles[k], tm, k); tile_attach (tiles[k], tm, k);
@ -426,10 +465,14 @@ tile_manager_map (TileManager *tm,
tiles[k]->eheight = bottom_tile; tiles[k]->eheight = bottom_tile;
} }
} }
/* g_warning ("tile_manager_map: empty tile level - done.");*/
} }
tile_ptr = &tm->tiles[tile_num]; tile_ptr = &tm->tiles[tile_num];
/* printf(")");fflush(stdout);*/
if (!srctile->valid) if (!srctile->valid)
g_warning("tile_manager_map: srctile not validated yet! please report."); g_warning("tile_manager_map: srctile not validated yet! please report.");
@ -443,31 +486,41 @@ tile_manager_map (TileManager *tm,
} }
tile_detach (*tile_ptr, tm, tile_num); tile_detach (*tile_ptr, tm, tile_num);
/* printf(">");fflush(stdout);*/
TILE_MUTEX_LOCK (srctile); TILE_MUTEX_LOCK (srctile);
/* printf(" [src:%p tm:%p tn:%d] ", srctile, tm, tile_num); fflush(stdout);*/
tile_attach (srctile, tm, tile_num); tile_attach (srctile, tm, tile_num);
*tile_ptr = srctile; *tile_ptr = srctile;
TILE_MUTEX_UNLOCK (srctile); TILE_MUTEX_UNLOCK (srctile);
/* printf("}");fflush(stdout);*/
} }
static inline gboolean static gint
tile_manager_get_tile_num (TileManager *tm, tile_manager_get_tile_num (TileManager *tm,
gint xpixel, gint xpixel,
gint ypixel, gint ypixel)
guint *tile_num)
{ {
guint tile_row; gint tile_row;
guint tile_col; gint tile_col;
gint tile_num;
g_return_val_if_fail (tm != NULL, FALSE); g_return_val_if_fail (tm != NULL, -1);
if ((xpixel < 0) || (ypixel < 0) || if ((xpixel < 0) || (xpixel >= tm->width) ||
(xpixel >= tm->width) || (ypixel >= tm->height)) (ypixel < 0) || (ypixel >= tm->height))
return FALSE; return -1;
tile_row = ypixel / TILE_HEIGHT; tile_row = ypixel / TILE_HEIGHT;
tile_col = xpixel / TILE_WIDTH; tile_col = xpixel / TILE_WIDTH;
*tile_num = tile_row * tm->ntile_cols + tile_col; tile_num = tile_row * tm->ntile_cols + tile_col;
return TRUE;
return tile_num;
} }
void void
@ -609,10 +662,9 @@ request_pixel_data (TileManager *tm,
pdh->public.width = w = (x2-x1)+1; pdh->public.width = w = (x2-x1)+1;
pdh->public.height = h = (y2-y1)+1; pdh->public.height = h = (y2-y1)+1;
tile_manager_get_tile_num (tm, x1, y1, &tile_num_1); tile_num_1 = tile_manager_get_tile_num (tm, x1, y1);
tile_manager_get_tile_num (tm, x2, y2, &tile_num_2); tile_num_2 = tile_manager_get_tile_num (tm, x2, y2);
/* FIXME: What if both nums are -1 aka inavlid? */
if (tile_num_1 == tile_num_2) if (tile_num_1 == tile_num_2)
{ {
pdh->tile = tile_manager_get (tm, tile_num_1, wantread, wantwrite); pdh->tile = tile_manager_get (tm, tile_num_1, wantread, wantwrite);

View File

@ -22,10 +22,10 @@
struct _PixelDataHandle struct _PixelDataHandle
{ {
guchar *data; guchar *data;
guint width; gint width;
guint height; gint height;
guint stride; gint stride;
guint bpp; gint bpp;
}; };
/* Creates a new tile manager with the specified /* Creates a new tile manager with the specified
@ -38,9 +38,9 @@ struct _PixelDataHandle
* hierarchy is "nlevels - 1". That level will be smaller * hierarchy is "nlevels - 1". That level will be smaller
* than TILE_WIDTH x TILE_HEIGHT * than TILE_WIDTH x TILE_HEIGHT
*/ */
TileManager * tile_manager_new (guint toplevel_width, TileManager * tile_manager_new (gint toplevel_width,
guint toplevel_height, gint toplevel_height,
guint bpp); gint bpp);
/* Destroy a tile manager and all the tiles it contains. /* Destroy a tile manager and all the tiles it contains.
*/ */
@ -60,15 +60,15 @@ void tile_manager_set_validate_proc (TileManager *tm,
Tile * tile_manager_get_tile (TileManager *tm, Tile * tile_manager_get_tile (TileManager *tm,
gint xpixel, gint xpixel,
gint ypixel, gint ypixel,
gboolean wantread, gint wantread,
gboolean wantwrite); gint wantwrite);
/* Get a specified tile from a tile manager. /* Get a specified tile from a tile manager.
*/ */
Tile * tile_manager_get (TileManager *tm, Tile * tile_manager_get (TileManager *tm,
guint tile_num, gint tile_num,
gboolean wantread, gint wantread,
gboolean wantwrite); gint wantwrite);
/* Request that (if possible) the tile at x,y be swapped /* Request that (if possible) the tile at x,y be swapped
* in. This is only a hint to improve performance; no guarantees. * in. This is only a hint to improve performance; no guarantees.
@ -95,7 +95,7 @@ void tile_manager_validate (TileManager *tm,
void tile_invalidate (Tile **tile_ptr, void tile_invalidate (Tile **tile_ptr,
TileManager *tm, TileManager *tm,
guint tile_num); gint tile_num);
void tile_invalidate_tile (Tile **tile_ptr, void tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm, TileManager *tm,
gint xpixel, gint xpixel,

View File

@ -35,7 +35,7 @@ typedef struct _TileLink TileLink;
struct _TileLink struct _TileLink
{ {
TileLink *next; TileLink *next;
guint tile_num; /* the number of this tile within the drawable */ gint tile_num; /* the number of this tile within the drawable */
TileManager *tm; /* A pointer to the tile manager for this tile. TileManager *tm; /* A pointer to the tile manager for this tile.
* We need this in order to call the tile managers * We need this in order to call the tile managers
* validate proc whenever the tile is referenced * validate proc whenever the tile is referenced
@ -45,20 +45,20 @@ struct _TileLink
struct _Tile struct _Tile
{ {
gushort ref_count; /* reference count. when the reference count is gshort ref_count; /* reference count. when the reference count is
* non-zero then the "data" for this tile must * non-zero then the "data" for this tile must
* be valid. when the reference count for a tile * be valid. when the reference count for a tile
* is 0 then the "data" for this tile must be * is 0 then the "data" for this tile must be
* NULL. * NULL.
*/ */
gushort write_count;/* write count: number of references that are gshort write_count; /* write count: number of references that are
for write access */ for write access */
gushort share_count;/* share count: number of tile managers that gshort share_count; /* share count: number of tile managers that
hold this tile */ hold this tile */
guint dirty : 1; /* is the tile dirty? has it been modified? */ guint dirty : 1; /* is the tile dirty? has it been modified? */
guint valid : 1; /* is the tile valid? */ guint valid : 1; /* is the tile valid? */
guint bpp : 4; /* the bytes per pixel (1, 2, 3 or 4) */ guchar bpp; /* the bytes per pixel (1, 2, 3 or 4) */
gushort ewidth; /* the effective width of the tile */ gushort ewidth; /* the effective width of the tile */
gushort eheight; /* the effective height of the tile gushort eheight; /* the effective height of the tile
* a tile's effective width and height may be smaller * a tile's effective width and height may be smaller
@ -72,7 +72,7 @@ struct _Tile
* case the tile data is on disk. * case the tile data is on disk.
*/ */
guint swap_num; /* the index into the file table of the file to be used gint swap_num; /* the index into the file table of the file to be used
* for swapping. swap_num 1 is always the global * for swapping. swap_num 1 is always the global
* swap file. * swap file.
*/ */
@ -98,4 +98,5 @@ struct _Tile
#define TILE_MUTEX_UNLOCK(tile) /* nothing */ #define TILE_MUTEX_UNLOCK(tile) /* nothing */
#endif #endif
#endif /* __TILE_PRIVATE_H__ */ #endif /* __TILE_PRIVATE_H__ */

View File

@ -322,7 +322,7 @@ tile_mark_valid (Tile *tile)
void void
tile_attach (Tile *tile, tile_attach (Tile *tile,
void *tm, void *tm,
guint tile_num) gint tile_num)
{ {
TileLink *tmp; TileLink *tmp;
@ -351,7 +351,7 @@ tile_attach (Tile *tile,
void void
tile_detach (Tile *tile, tile_detach (Tile *tile,
void *tm, void *tm,
guint tile_num) gint tile_num)
{ {
TileLink **link; TileLink **link;
TileLink *tmp; TileLink *tmp;

View File

@ -101,10 +101,10 @@ void * tile_data_pointer (Tile *tile,
void tile_attach (Tile *tile, void tile_attach (Tile *tile,
void *tm, void *tm,
guint tile_num); gint tile_num);
void tile_detach (Tile *tile, void tile_detach (Tile *tile,
void *tm, void *tm,
guint tile_num); gint tile_num);
#endif /* __TILE_H__ */ #endif /* __TILE_H__ */

View File

@ -332,9 +332,9 @@ gimp_new (gboolean be_verbose,
gimp = g_object_new (GIMP_TYPE_GIMP, NULL); gimp = g_object_new (GIMP_TYPE_GIMP, NULL);
gimp->be_verbose = be_verbose; gimp->be_verbose = be_verbose ? TRUE : FALSE;
gimp->no_data = no_data; gimp->no_data = no_data ? TRUE : FALSE;
gimp->no_interface = no_interface; gimp->no_interface = no_interface ? TRUE : FALSE;
gimp->stack_trace_mode = stack_trace_mode; gimp->stack_trace_mode = stack_trace_mode;
return gimp; return gimp;

View File

@ -48,9 +48,9 @@ struct _Gimp
GimpCoreConfig *config; GimpCoreConfig *config;
guint be_verbose : 1; gboolean be_verbose;
guint no_data : 1; gboolean no_data;
guint no_interface : 1; gboolean no_interface;
GimpMessageHandlerType message_handler; GimpMessageHandlerType message_handler;
GimpStackTraceMode stack_trace_mode; GimpStackTraceMode stack_trace_mode;
@ -67,7 +67,7 @@ struct _Gimp
guint busy_idle_id; guint busy_idle_id;
GList *user_units; GList *user_units;
guint n_user_units; gint n_user_units;
GimpParasiteList *parasites; GimpParasiteList *parasites;
@ -105,7 +105,7 @@ struct _Gimp
GList *image_base_type_names; GList *image_base_type_names;
GList *fill_type_names; GList *fill_type_names;
GimpImageNewValues image_new_last_values; GimpImageNewValues image_new_last_values;
guint have_current_cut_buffer : 1; gboolean have_current_cut_buffer;
/* the list of all contexts */ /* the list of all contexts */
GList *context_list; GList *context_list;

View File

@ -48,7 +48,7 @@ struct _GimpBrushGenerated
gfloat aspect_ratio; /* y/x */ gfloat aspect_ratio; /* y/x */
/* private */ /* private */
guint freeze; gint freeze;
}; };
struct _GimpBrushGeneratedClass struct _GimpBrushGeneratedClass

View File

@ -61,7 +61,7 @@ struct _GimpBrushPipe
gint *index; /* Current index for incremental dimensions */ gint *index; /* Current index for incremental dimensions */
guint nbrushes; /* Might be less than the product of the gint nbrushes; /* Might be less than the product of the
* ranks in some odd special case */ * ranks in some odd special case */
GimpBrush **brushes; GimpBrush **brushes;
GimpBrush *current; /* Currently selected brush */ GimpBrush *current; /* Currently selected brush */

View File

@ -118,6 +118,7 @@ gimp_channel_init (GimpChannel *channel)
channel->y1 = 0; channel->y1 = 0;
channel->x2 = 0; channel->x2 = 0;
channel->y2 = 0; channel->y2 = 0;
} }
static void static void
@ -155,8 +156,8 @@ gimp_channel_validate (TileManager *tm,
GimpChannel * GimpChannel *
gimp_channel_new (GimpImage *gimage, gimp_channel_new (GimpImage *gimage,
guint width, gint width,
guint height, gint height,
const gchar *name, const gchar *name,
const GimpRGB *color) const GimpRGB *color)
{ {
@ -171,6 +172,7 @@ gimp_channel_new (GimpImage *gimage,
/* set the channel color and opacity */ /* set the channel color and opacity */
channel->color = *color; channel->color = *color;
channel->show_masked = TRUE; channel->show_masked = TRUE;
/* selection mask variables */ /* selection mask variables */
@ -268,17 +270,17 @@ gimp_channel_get_color (const GimpChannel *channel)
return &channel->color; return &channel->color;
} }
guint gint
gimp_channel_get_opacity (const GimpChannel *channel) gimp_channel_get_opacity (const GimpChannel *channel)
{ {
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0); g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0);
return (guint) (channel->color.a * 100.999); return (gint) (channel->color.a * 100.999);
} }
void void
gimp_channel_set_opacity (GimpChannel *channel, gimp_channel_set_opacity (GimpChannel *channel,
guint opacity) gint opacity)
{ {
g_return_if_fail (GIMP_IS_CHANNEL (channel)); g_return_if_fail (GIMP_IS_CHANNEL (channel));
@ -289,8 +291,8 @@ gimp_channel_set_opacity (GimpChannel *channel,
void void
gimp_channel_scale (GimpChannel *channel, gimp_channel_scale (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height) gint new_height)
{ {
PixelRegion srcPR, destPR; PixelRegion srcPR, destPR;
TileManager *new_tiles; TileManager *new_tiles;
@ -339,8 +341,8 @@ gimp_channel_scale (GimpChannel *channel,
void void
gimp_channel_resize (GimpChannel *channel, gimp_channel_resize (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height, gint new_height,
gint offx, gint offx,
gint offy) gint offy)
{ {
@ -443,8 +445,8 @@ gimp_channel_resize (GimpChannel *channel,
GimpChannel * GimpChannel *
gimp_channel_new_mask (GimpImage *gimage, gimp_channel_new_mask (GimpImage *gimage,
guint width, gint width,
guint height) gint height)
{ {
GimpRGB black = { 0.0, 0.0, 0.0, 0.5 }; GimpRGB black = { 0.0, 0.0, 0.0, 0.5 };
GimpChannel *new_channel; GimpChannel *new_channel;
@ -534,13 +536,13 @@ gimp_channel_boundary (GimpChannel *mask,
return TRUE; return TRUE;
} }
guchar gint
gimp_channel_value (GimpChannel *mask, gimp_channel_value (GimpChannel *mask,
gint x, gint x,
gint y) gint y)
{ {
Tile *tile; Tile *tile;
guchar val; gint val;
g_return_val_if_fail (GIMP_IS_CHANNEL (mask), 0); g_return_val_if_fail (GIMP_IS_CHANNEL (mask), 0);
@ -739,8 +741,8 @@ void
gimp_channel_add_segment (GimpChannel *mask, gimp_channel_add_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value) gint value)
{ {
PixelRegion maskPR; PixelRegion maskPR;
guchar *data; guchar *data;
@ -784,8 +786,8 @@ void
gimp_channel_sub_segment (GimpChannel *mask, gimp_channel_sub_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value) gint value)
{ {
PixelRegion maskPR; PixelRegion maskPR;
guchar *data; guchar *data;
@ -829,8 +831,8 @@ gimp_channel_combine_rect (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h) gint h)
{ {
gint x2, y2; gint x2, y2;
PixelRegion maskPR; PixelRegion maskPR;
@ -891,8 +893,8 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h, gint h,
gboolean antialias) gboolean antialias)
{ {
gint i, j; gint i, j;
@ -1341,14 +1343,17 @@ gimp_channel_all (GimpChannel *mask)
void void
gimp_channel_border (GimpChannel *mask, gimp_channel_border (GimpChannel *mask,
guint radius_x, gint radius_x,
guint radius_y) gint radius_y)
{ {
PixelRegion bPR; PixelRegion bPR;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (radius_x < 0 || radius_y < 0)
return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return; return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))
@ -1385,8 +1390,8 @@ gimp_channel_border (GimpChannel *mask,
void void
gimp_channel_grow (GimpChannel *mask, gimp_channel_grow (GimpChannel *mask,
gint radius_x, gint radius_x,
gint radius_y) gint radius_y)
{ {
PixelRegion bPR; PixelRegion bPR;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
@ -1396,15 +1401,17 @@ gimp_channel_grow (GimpChannel *mask,
if (radius_x == 0 && radius_y == 0) if (radius_x == 0 && radius_y == 0)
return; return;
if (radius_x < 0 && radius_y < 0) if (radius_x <= 0 && radius_y <= 0)
{ {
gimp_channel_shrink (mask, -radius_x, -radius_y, FALSE); gimp_channel_shrink (mask, -radius_x, -radius_y, FALSE);
return; return;
} }
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (radius_x < 0 || radius_y < 0)
return; return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))
return; return;
@ -1451,12 +1458,15 @@ gimp_channel_shrink (GimpChannel *mask,
if (radius_x == 0 && radius_y == 0) if (radius_x == 0 && radius_y == 0)
return; return;
if (radius_x < 0 && radius_y < 0) if (radius_x <= 0 && radius_y <= 0)
{ {
gimp_channel_grow (mask, -radius_x, -radius_y); gimp_channel_grow (mask, -radius_x, -radius_y);
return; return;
} }
if (radius_x < 0 || radius_y < 0)
return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return; return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))

View File

@ -42,17 +42,17 @@ struct _GimpChannel
GimpDrawable parent_instance; GimpDrawable parent_instance;
GimpRGB color; /* Also stored the opacity */ GimpRGB color; /* Also stored the opacity */
guint show_masked; /* Show masked areas--as */ gboolean show_masked; /* Show masked areas--as */
/* opposed to selected areas */ /* opposed to selected areas */
/* Selection mask variables */ /* Selection mask variables */
guint boundary_known : 1;/* is the current boundary valid */ gboolean boundary_known; /* is the current boundary valid */
guint empty : 1; /* is the region empty? */
guint bounds_known : 1; /* recalculate the bounds? */
BoundSeg *segs_in; /* outline of selected region */ BoundSeg *segs_in; /* outline of selected region */
BoundSeg *segs_out; /* outline of selected region */ BoundSeg *segs_out; /* outline of selected region */
guint num_segs_in; /* number of lines in boundary */ gint num_segs_in; /* number of lines in boundary */
guint num_segs_out; /* number of lines in boundary */ gint num_segs_out; /* number of lines in boundary */
gboolean empty; /* is the region empty? */
gboolean bounds_known; /* recalculate the bounds? */
gint x1, y1; /* coordinates for bounding box */ gint x1, y1; /* coordinates for bounding box */
gint x2, y2; /* lower right hand coordinate */ gint x2, y2; /* lower right hand coordinate */
}; };
@ -87,27 +87,27 @@ struct _MaskUndo
GType gimp_channel_get_type (void) G_GNUC_CONST; GType gimp_channel_get_type (void) G_GNUC_CONST;
GimpChannel * gimp_channel_new (GimpImage *gimage, GimpChannel * gimp_channel_new (GimpImage *gimage,
guint width, gint width,
guint height, gint height,
const gchar *name, const gchar *name,
const GimpRGB *color); const GimpRGB *color);
GimpChannel * gimp_channel_copy (const GimpChannel *channel, GimpChannel * gimp_channel_copy (const GimpChannel *channel,
gboolean dummy); gboolean dummy);
guint gimp_channel_get_opacity (const GimpChannel *channel); gint gimp_channel_get_opacity (const GimpChannel *channel);
void gimp_channel_set_opacity (GimpChannel *channel, void gimp_channel_set_opacity (GimpChannel *channel,
guint opacity); gint opacity);
const GimpRGB * gimp_channel_get_color (const GimpChannel *channel); const GimpRGB * gimp_channel_get_color (const GimpChannel *channel);
void gimp_channel_set_color (GimpChannel *channel, void gimp_channel_set_color (GimpChannel *channel,
const GimpRGB *color); const GimpRGB *color);
void gimp_channel_scale (GimpChannel *channel, void gimp_channel_scale (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height); gint new_height);
void gimp_channel_resize (GimpChannel *channel, void gimp_channel_resize (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height, gint new_height,
gint offx, gint offx,
gint offy); gint offy);
@ -115,8 +115,8 @@ void gimp_channel_resize (GimpChannel *channel,
/* selection mask functions */ /* selection mask functions */
GimpChannel * gimp_channel_new_mask (GimpImage *gimage, GimpChannel * gimp_channel_new_mask (GimpImage *gimage,
guint width, gint width,
guint height); gint height);
gboolean gimp_channel_boundary (GimpChannel *mask, gboolean gimp_channel_boundary (GimpChannel *mask,
BoundSeg **segs_in, BoundSeg **segs_in,
BoundSeg **segs_out, BoundSeg **segs_out,
@ -131,32 +131,32 @@ gboolean gimp_channel_bounds (GimpChannel *mask,
gint *y1, gint *y1,
gint *x2, gint *x2,
gint *y2); gint *y2);
guchar gimp_channel_value (GimpChannel *mask, gint gimp_channel_value (GimpChannel *mask,
gint x, gint x,
gint y); gint y);
gboolean gimp_channel_is_empty (GimpChannel *mask); gboolean gimp_channel_is_empty (GimpChannel *mask);
void gimp_channel_add_segment (GimpChannel *mask, void gimp_channel_add_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value); gint value);
void gimp_channel_sub_segment (GimpChannel *mask, void gimp_channel_sub_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value); gint value);
void gimp_channel_combine_rect (GimpChannel *mask, void gimp_channel_combine_rect (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h); gint h);
void gimp_channel_combine_ellipse (GimpChannel *mask, void gimp_channel_combine_ellipse (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h, gint h,
gboolean antialias); gboolean antialias);
void gimp_channel_combine_mask (GimpChannel *mask, void gimp_channel_combine_mask (GimpChannel *mask,
GimpChannel *add_on, GimpChannel *add_on,
@ -175,8 +175,8 @@ void gimp_channel_sharpen (GimpChannel *mask);
void gimp_channel_all (GimpChannel *mask); void gimp_channel_all (GimpChannel *mask);
void gimp_channel_border (GimpChannel *mask, void gimp_channel_border (GimpChannel *mask,
guint radius_x, gint radius_x,
guint radius_y); gint radius_y);
void gimp_channel_grow (GimpChannel *mask, void gimp_channel_grow (GimpChannel *mask,
gint radius_x, gint radius_x,
gint radius_y); gint radius_y);

View File

@ -118,6 +118,7 @@ gimp_channel_init (GimpChannel *channel)
channel->y1 = 0; channel->y1 = 0;
channel->x2 = 0; channel->x2 = 0;
channel->y2 = 0; channel->y2 = 0;
} }
static void static void
@ -155,8 +156,8 @@ gimp_channel_validate (TileManager *tm,
GimpChannel * GimpChannel *
gimp_channel_new (GimpImage *gimage, gimp_channel_new (GimpImage *gimage,
guint width, gint width,
guint height, gint height,
const gchar *name, const gchar *name,
const GimpRGB *color) const GimpRGB *color)
{ {
@ -171,6 +172,7 @@ gimp_channel_new (GimpImage *gimage,
/* set the channel color and opacity */ /* set the channel color and opacity */
channel->color = *color; channel->color = *color;
channel->show_masked = TRUE; channel->show_masked = TRUE;
/* selection mask variables */ /* selection mask variables */
@ -268,17 +270,17 @@ gimp_channel_get_color (const GimpChannel *channel)
return &channel->color; return &channel->color;
} }
guint gint
gimp_channel_get_opacity (const GimpChannel *channel) gimp_channel_get_opacity (const GimpChannel *channel)
{ {
g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0); g_return_val_if_fail (GIMP_IS_CHANNEL (channel), 0);
return (guint) (channel->color.a * 100.999); return (gint) (channel->color.a * 100.999);
} }
void void
gimp_channel_set_opacity (GimpChannel *channel, gimp_channel_set_opacity (GimpChannel *channel,
guint opacity) gint opacity)
{ {
g_return_if_fail (GIMP_IS_CHANNEL (channel)); g_return_if_fail (GIMP_IS_CHANNEL (channel));
@ -289,8 +291,8 @@ gimp_channel_set_opacity (GimpChannel *channel,
void void
gimp_channel_scale (GimpChannel *channel, gimp_channel_scale (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height) gint new_height)
{ {
PixelRegion srcPR, destPR; PixelRegion srcPR, destPR;
TileManager *new_tiles; TileManager *new_tiles;
@ -339,8 +341,8 @@ gimp_channel_scale (GimpChannel *channel,
void void
gimp_channel_resize (GimpChannel *channel, gimp_channel_resize (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height, gint new_height,
gint offx, gint offx,
gint offy) gint offy)
{ {
@ -443,8 +445,8 @@ gimp_channel_resize (GimpChannel *channel,
GimpChannel * GimpChannel *
gimp_channel_new_mask (GimpImage *gimage, gimp_channel_new_mask (GimpImage *gimage,
guint width, gint width,
guint height) gint height)
{ {
GimpRGB black = { 0.0, 0.0, 0.0, 0.5 }; GimpRGB black = { 0.0, 0.0, 0.0, 0.5 };
GimpChannel *new_channel; GimpChannel *new_channel;
@ -534,13 +536,13 @@ gimp_channel_boundary (GimpChannel *mask,
return TRUE; return TRUE;
} }
guchar gint
gimp_channel_value (GimpChannel *mask, gimp_channel_value (GimpChannel *mask,
gint x, gint x,
gint y) gint y)
{ {
Tile *tile; Tile *tile;
guchar val; gint val;
g_return_val_if_fail (GIMP_IS_CHANNEL (mask), 0); g_return_val_if_fail (GIMP_IS_CHANNEL (mask), 0);
@ -739,8 +741,8 @@ void
gimp_channel_add_segment (GimpChannel *mask, gimp_channel_add_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value) gint value)
{ {
PixelRegion maskPR; PixelRegion maskPR;
guchar *data; guchar *data;
@ -784,8 +786,8 @@ void
gimp_channel_sub_segment (GimpChannel *mask, gimp_channel_sub_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value) gint value)
{ {
PixelRegion maskPR; PixelRegion maskPR;
guchar *data; guchar *data;
@ -829,8 +831,8 @@ gimp_channel_combine_rect (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h) gint h)
{ {
gint x2, y2; gint x2, y2;
PixelRegion maskPR; PixelRegion maskPR;
@ -891,8 +893,8 @@ gimp_channel_combine_ellipse (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h, gint h,
gboolean antialias) gboolean antialias)
{ {
gint i, j; gint i, j;
@ -1341,14 +1343,17 @@ gimp_channel_all (GimpChannel *mask)
void void
gimp_channel_border (GimpChannel *mask, gimp_channel_border (GimpChannel *mask,
guint radius_x, gint radius_x,
guint radius_y) gint radius_y)
{ {
PixelRegion bPR; PixelRegion bPR;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (radius_x < 0 || radius_y < 0)
return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return; return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))
@ -1385,8 +1390,8 @@ gimp_channel_border (GimpChannel *mask,
void void
gimp_channel_grow (GimpChannel *mask, gimp_channel_grow (GimpChannel *mask,
gint radius_x, gint radius_x,
gint radius_y) gint radius_y)
{ {
PixelRegion bPR; PixelRegion bPR;
gint x1, y1, x2, y2; gint x1, y1, x2, y2;
@ -1396,15 +1401,17 @@ gimp_channel_grow (GimpChannel *mask,
if (radius_x == 0 && radius_y == 0) if (radius_x == 0 && radius_y == 0)
return; return;
if (radius_x < 0 && radius_y < 0) if (radius_x <= 0 && radius_y <= 0)
{ {
gimp_channel_shrink (mask, -radius_x, -radius_y, FALSE); gimp_channel_shrink (mask, -radius_x, -radius_y, FALSE);
return; return;
} }
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (radius_x < 0 || radius_y < 0)
return; return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))
return; return;
@ -1451,12 +1458,15 @@ gimp_channel_shrink (GimpChannel *mask,
if (radius_x == 0 && radius_y == 0) if (radius_x == 0 && radius_y == 0)
return; return;
if (radius_x < 0 && radius_y < 0) if (radius_x <= 0 && radius_y <= 0)
{ {
gimp_channel_grow (mask, -radius_x, -radius_y); gimp_channel_grow (mask, -radius_x, -radius_y);
return; return;
} }
if (radius_x < 0 || radius_y < 0)
return;
if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2)) if (! gimp_channel_bounds (mask, &x1, &y1, &x2, &y2))
return; return;
if (gimp_channel_is_empty (mask)) if (gimp_channel_is_empty (mask))

View File

@ -42,17 +42,17 @@ struct _GimpChannel
GimpDrawable parent_instance; GimpDrawable parent_instance;
GimpRGB color; /* Also stored the opacity */ GimpRGB color; /* Also stored the opacity */
guint show_masked; /* Show masked areas--as */ gboolean show_masked; /* Show masked areas--as */
/* opposed to selected areas */ /* opposed to selected areas */
/* Selection mask variables */ /* Selection mask variables */
guint boundary_known : 1;/* is the current boundary valid */ gboolean boundary_known; /* is the current boundary valid */
guint empty : 1; /* is the region empty? */
guint bounds_known : 1; /* recalculate the bounds? */
BoundSeg *segs_in; /* outline of selected region */ BoundSeg *segs_in; /* outline of selected region */
BoundSeg *segs_out; /* outline of selected region */ BoundSeg *segs_out; /* outline of selected region */
guint num_segs_in; /* number of lines in boundary */ gint num_segs_in; /* number of lines in boundary */
guint num_segs_out; /* number of lines in boundary */ gint num_segs_out; /* number of lines in boundary */
gboolean empty; /* is the region empty? */
gboolean bounds_known; /* recalculate the bounds? */
gint x1, y1; /* coordinates for bounding box */ gint x1, y1; /* coordinates for bounding box */
gint x2, y2; /* lower right hand coordinate */ gint x2, y2; /* lower right hand coordinate */
}; };
@ -87,27 +87,27 @@ struct _MaskUndo
GType gimp_channel_get_type (void) G_GNUC_CONST; GType gimp_channel_get_type (void) G_GNUC_CONST;
GimpChannel * gimp_channel_new (GimpImage *gimage, GimpChannel * gimp_channel_new (GimpImage *gimage,
guint width, gint width,
guint height, gint height,
const gchar *name, const gchar *name,
const GimpRGB *color); const GimpRGB *color);
GimpChannel * gimp_channel_copy (const GimpChannel *channel, GimpChannel * gimp_channel_copy (const GimpChannel *channel,
gboolean dummy); gboolean dummy);
guint gimp_channel_get_opacity (const GimpChannel *channel); gint gimp_channel_get_opacity (const GimpChannel *channel);
void gimp_channel_set_opacity (GimpChannel *channel, void gimp_channel_set_opacity (GimpChannel *channel,
guint opacity); gint opacity);
const GimpRGB * gimp_channel_get_color (const GimpChannel *channel); const GimpRGB * gimp_channel_get_color (const GimpChannel *channel);
void gimp_channel_set_color (GimpChannel *channel, void gimp_channel_set_color (GimpChannel *channel,
const GimpRGB *color); const GimpRGB *color);
void gimp_channel_scale (GimpChannel *channel, void gimp_channel_scale (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height); gint new_height);
void gimp_channel_resize (GimpChannel *channel, void gimp_channel_resize (GimpChannel *channel,
guint new_width, gint new_width,
guint new_height, gint new_height,
gint offx, gint offx,
gint offy); gint offy);
@ -115,8 +115,8 @@ void gimp_channel_resize (GimpChannel *channel,
/* selection mask functions */ /* selection mask functions */
GimpChannel * gimp_channel_new_mask (GimpImage *gimage, GimpChannel * gimp_channel_new_mask (GimpImage *gimage,
guint width, gint width,
guint height); gint height);
gboolean gimp_channel_boundary (GimpChannel *mask, gboolean gimp_channel_boundary (GimpChannel *mask,
BoundSeg **segs_in, BoundSeg **segs_in,
BoundSeg **segs_out, BoundSeg **segs_out,
@ -131,32 +131,32 @@ gboolean gimp_channel_bounds (GimpChannel *mask,
gint *y1, gint *y1,
gint *x2, gint *x2,
gint *y2); gint *y2);
guchar gimp_channel_value (GimpChannel *mask, gint gimp_channel_value (GimpChannel *mask,
gint x, gint x,
gint y); gint y);
gboolean gimp_channel_is_empty (GimpChannel *mask); gboolean gimp_channel_is_empty (GimpChannel *mask);
void gimp_channel_add_segment (GimpChannel *mask, void gimp_channel_add_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value); gint value);
void gimp_channel_sub_segment (GimpChannel *mask, void gimp_channel_sub_segment (GimpChannel *mask,
gint x, gint x,
gint y, gint y,
guint width, gint width,
guint value); gint value);
void gimp_channel_combine_rect (GimpChannel *mask, void gimp_channel_combine_rect (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h); gint h);
void gimp_channel_combine_ellipse (GimpChannel *mask, void gimp_channel_combine_ellipse (GimpChannel *mask,
ChannelOps op, ChannelOps op,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h, gint h,
gboolean antialias); gboolean antialias);
void gimp_channel_combine_mask (GimpChannel *mask, void gimp_channel_combine_mask (GimpChannel *mask,
GimpChannel *add_on, GimpChannel *add_on,
@ -175,8 +175,8 @@ void gimp_channel_sharpen (GimpChannel *mask);
void gimp_channel_all (GimpChannel *mask); void gimp_channel_all (GimpChannel *mask);
void gimp_channel_border (GimpChannel *mask, void gimp_channel_border (GimpChannel *mask,
guint radius_x, gint radius_x,
guint radius_y); gint radius_y);
void gimp_channel_grow (GimpChannel *mask, void gimp_channel_grow (GimpChannel *mask,
gint radius_x, gint radius_x,
gint radius_y); gint radius_y);

View File

@ -51,11 +51,11 @@ struct _GimpContainer
/* public, read-only */ /* public, read-only */
GType children_type; GType children_type;
GimpContainerPolicy policy; GimpContainerPolicy policy;
guint num_children; gint num_children;
/* private */ /* private */
GList *handlers; GList *handlers;
guint freeze_count; gint freeze_count;
}; };
struct _GimpContainerClass struct _GimpContainerClass

View File

@ -37,17 +37,17 @@ struct _GimpCoreConfig
gchar *default_comment; gchar *default_comment;
GimpImageBaseType default_type; GimpImageBaseType default_type;
guint default_width; gint default_width;
guint default_height; gint default_height;
GimpUnit default_units; GimpUnit default_units;
gdouble default_xresolution; gdouble default_xresolution;
gdouble default_yresolution; gdouble default_yresolution;
GimpUnit default_resolution_units; GimpUnit default_resolution_units;
guint levels_of_undo; gint levels_of_undo;
gchar *pluginrc_path; gchar *pluginrc_path;
gchar *module_db_load_inhibit; gchar *module_db_load_inhibit;
guint thumbnail_mode; gint thumbnail_mode;
}; };

View File

@ -41,7 +41,7 @@ struct _GimpData
GimpViewable parent_instance; GimpViewable parent_instance;
gchar *filename; gchar *filename;
guint dirty : 1; gboolean dirty;
}; };
struct _GimpDataClass struct _GimpDataClass

View File

@ -117,7 +117,7 @@ GimpDataFactory *
gimp_data_factory_new (GType data_type, gimp_data_factory_new (GType data_type,
const gchar **data_path, const gchar **data_path,
const GimpDataFactoryLoaderEntry *loader_entries, const GimpDataFactoryLoaderEntry *loader_entries,
guint n_loader_entries, gint n_loader_entries,
GimpDataNewFunc new_func, GimpDataNewFunc new_func,
GimpDataGetStandardFunc standard_func) GimpDataGetStandardFunc standard_func)
{ {
@ -261,7 +261,7 @@ gimp_data_factory_data_load_callback (const gchar *filename,
gpointer callback_data) gpointer callback_data)
{ {
GimpDataFactory *factory; GimpDataFactory *factory;
guint i; gint i;
factory = (GimpDataFactory *) callback_data; factory = (GimpDataFactory *) callback_data;

View File

@ -59,7 +59,7 @@ struct _GimpDataFactory
const gchar **data_path; const gchar **data_path;
const GimpDataFactoryLoaderEntry *loader_entries; const GimpDataFactoryLoaderEntry *loader_entries;
guint n_loader_entries; gint n_loader_entries;
GimpDataNewFunc data_new_func; GimpDataNewFunc data_new_func;
GimpDataGetStandardFunc data_get_standard_func; GimpDataGetStandardFunc data_get_standard_func;
@ -76,7 +76,7 @@ GType gimp_data_factory_get_type (void) G_GNUC_CONST;
GimpDataFactory * gimp_data_factory_new (GType data_type, GimpDataFactory * gimp_data_factory_new (GType data_type,
const gchar **data_path, const gchar **data_path,
const GimpDataFactoryLoaderEntry *loader_entries, const GimpDataFactoryLoaderEntry *loader_entries,
guint n_loader_entries, gint n_loader_entries,
GimpDataNewFunc new_func, GimpDataNewFunc new_func,
GimpDataGetStandardFunc standard_func); GimpDataGetStandardFunc standard_func);

View File

@ -61,8 +61,8 @@ typedef struct
{ {
PixelRegion *PR; PixelRegion *PR;
guchar *row_data; guchar *row_data;
guint bytes; gint bytes;
guint width; gint width;
} PutPixelData; } PutPixelData;

View File

@ -326,8 +326,8 @@ gimp_drawable_invalidate_preview (GimpViewable *viewable)
void void
gimp_drawable_configure (GimpDrawable *drawable, gimp_drawable_configure (GimpDrawable *drawable,
GimpImage *gimage, GimpImage *gimage,
guint width, gint width,
guint height, gint height,
GimpImageType type, GimpImageType type,
const gchar *name) const gchar *name)
{ {
@ -438,8 +438,8 @@ void
gimp_drawable_update (GimpDrawable *drawable, gimp_drawable_update (GimpDrawable *drawable,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h) gint h)
{ {
GimpImage *gimage; GimpImage *gimage;
gint offset_x; gint offset_x;
@ -467,11 +467,11 @@ gimp_drawable_apply_image (GimpDrawable *drawable,
gint x2, gint x2,
gint y2, gint y2,
TileManager *tiles, TileManager *tiles,
gboolean sparse) gint sparse)
{ {
g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
if (!tiles) if (! tiles)
undo_push_image (drawable->gimage, drawable, undo_push_image (drawable->gimage, drawable,
x1, y1, x2, y2); x1, y1, x2, y2);
else else

View File

@ -38,22 +38,22 @@ struct _GimpDrawable
GimpViewable parent_instance; GimpViewable parent_instance;
TileManager *tiles; /* tiles for drawable data */ TileManager *tiles; /* tiles for drawable data */
guint visible : 1; /* controls visibility */ gboolean visible; /* controls visibility */
guint width, height; /* size of drawable */ gint width, height; /* size of drawable */
gint offset_x, offset_y; /* offset of layer in image */ gint offset_x, offset_y; /* offset of layer in image */
guint bytes : 4; /* bytes per pixel */ gint bytes; /* bytes per pixel */
guint has_alpha : 1; /* drawable has alpha */
gint ID; /* provides a unique ID */ gint ID; /* provides a unique ID */
guint32 tattoo; /* provides a perminant ID */ guint32 tattoo; /* provides a perminant ID */
GimpImage *gimage; /* gimage owner */ GimpImage *gimage; /* gimage owner */
GimpImageType type; /* type of drawable */ GimpImageType type; /* type of drawable */
gboolean has_alpha; /* drawable has alpha */
GimpParasiteList *parasites; /* Plug-in parasite data */ GimpParasiteList *parasites; /* Plug-in parasite data */
/* Preview variables */ /* Preview variables */
GSList *preview_cache; /* preview caches of the channel */ GSList *preview_cache; /* preview caches of the channel */
guint preview_valid : 1; /* is the preview valid? */ gboolean preview_valid; /* is the preview valid? */
}; };
struct _GimpDrawableClass struct _GimpDrawableClass
@ -71,8 +71,8 @@ GType gimp_drawable_get_type (void) G_GNUC_CONST;
void gimp_drawable_configure (GimpDrawable *drawable, void gimp_drawable_configure (GimpDrawable *drawable,
GimpImage *gimage, GimpImage *gimage,
guint width, gint width,
guint height, gint height,
GimpImageType type, GimpImageType type,
const gchar *name); const gchar *name);
@ -87,8 +87,8 @@ void gimp_drawable_set_gimage (GimpDrawable *drawable,
void gimp_drawable_update (GimpDrawable *drawable, void gimp_drawable_update (GimpDrawable *drawable,
gint x, gint x,
gint y, gint y,
guint w, gint w,
guint h); gint h);
void gimp_drawable_apply_image (GimpDrawable *drawable, void gimp_drawable_apply_image (GimpDrawable *drawable,
gint x1, gint x1,
@ -96,7 +96,7 @@ void gimp_drawable_apply_image (GimpDrawable *drawable,
gint x2, gint x2,
gint y2, gint y2,
TileManager *tiles, TileManager *tiles,
gboolean sparse); gint sparse);
void gimp_drawable_merge_shadow (GimpDrawable *drawable, void gimp_drawable_merge_shadow (GimpDrawable *drawable,
gboolean undo); gboolean undo);

View File

@ -32,7 +32,7 @@
struct _GimpGuide struct _GimpGuide
{ {
guint ref_count; gint ref_count;
gint position; gint position;
InternalOrientationType orientation; InternalOrientationType orientation;
guint32 guide_ID; guint32 guide_ID;
@ -59,7 +59,7 @@ struct _GimpImage
PlugInProcDef *save_proc; /* last PDB save proc used */ PlugInProcDef *save_proc; /* last PDB save proc used */
guint width, height; /* width and height attributes */ gint width, height; /* width and height attributes */
gdouble xresolution; /* image x-res, in dpi */ gdouble xresolution; /* image x-res, in dpi */
gdouble yresolution; /* image y-res, in dpi */ gdouble yresolution; /* image y-res, in dpi */
GimpUnit unit; /* image unit */ GimpUnit unit; /* image unit */
@ -68,18 +68,18 @@ struct _GimpImage
guchar *cmap; /* colormap--for indexed */ guchar *cmap; /* colormap--for indexed */
gint num_cols; /* number of cols--for indexed */ gint num_cols; /* number of cols--for indexed */
guint dirty; /* dirty flag -- # of ops */ gint dirty; /* dirty flag -- # of ops */
guint undo_on : 1; /* Is undo enabled? */ gboolean undo_on; /* Is undo enabled? */
guint instance_count; /* number of instances */ gint instance_count; /* number of instances */
guint disp_count; /* number of displays */ gint disp_count; /* number of displays */
GimpTattoo tattoo_state; /* the next unique tattoo to use*/ GimpTattoo tattoo_state; /* the next unique tattoo to use*/
TileManager *shadow; /* shadow buffer tiles */ TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */ /* Projection attributes */
guint construct_flag : 1; /* flag for construction */ gboolean construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */ GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */ gint proj_bytes; /* bpp in projection image */
gint proj_level; /* projection level */ gint proj_level; /* projection level */
@ -102,19 +102,19 @@ struct _GimpImage
PathList *paths; /* Paths data for this image */ PathList *paths; /* Paths data for this image */
gboolean visible[MAX_CHANNELS]; /* visible channels */ gboolean visible[MAX_CHANNELS]; /* visible channels */
gboolean active[MAX_CHANNELS]; /* active channels */ gboolean active[MAX_CHANNELS]; /* active channels */
guint qmask_state : 1; /* TRUE if qmask is on */ gboolean qmask_state; /* TRUE if qmask is on */
guint qmask_inverted : 1; /* TRUE if qmask is inverted */ gboolean qmask_inverted; /* TRUE if qmask is inverted */
GimpRGB qmask_color; /* rgba triplet of the color */ GimpRGB qmask_color; /* rgba triplet of the color */
/* Old undo apparatus */ /* Old undo apparatus */
GSList *undo_stack; /* stack for undo operations */ GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */ GSList *redo_stack; /* stack for redo operations */
guint undo_bytes; /* bytes in undo stack */ gint undo_bytes; /* bytes in undo stack */
guint undo_levels; /* levels in undo stack */ gint undo_levels; /* levels in undo stack */
guint group_count; /* nested undo groups */ gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */ UndoType pushing_undo_group; /* undo group status flag */
/* New undo apparatus */ /* New undo apparatus */
@ -123,7 +123,7 @@ struct _GimpImage
/* Composite preview */ /* Composite preview */
TempBuf *comp_preview; /* the composite preview */ TempBuf *comp_preview; /* the composite preview */
guint comp_preview_valid : 1;/* preview valid-1/channel */ gboolean comp_preview_valid; /* preview valid-1/channel */
}; };
struct _GimpImageClass struct _GimpImageClass

View File

@ -40,9 +40,9 @@ struct _GimpImagefile
{ {
GimpViewable parent_instance; GimpViewable parent_instance;
guint width; gint width;
guint height; gint height;
guint size; gint size;
}; };
struct _GimpImagefileClass struct _GimpImagefileClass

View File

@ -37,11 +37,12 @@ struct _GimpLayer
{ {
GimpDrawable parent_instance; GimpDrawable parent_instance;
guint opacity; /* layer opacity */ gint opacity; /* layer opacity */
LayerModeEffects mode; /* layer combination mode */ LayerModeEffects mode; /* layer combination mode */
guint preserve_trans; /* preserve transparency */ gboolean preserve_trans; /* preserve transparency */
guint linked; /* control linkage */
gboolean linked; /* control linkage */
GimpLayerMask *mask; /* possible layer mask */ GimpLayerMask *mask; /* possible layer mask */
/* Floating selections */ /* Floating selections */
@ -49,10 +50,11 @@ struct _GimpLayer
{ {
TileManager *backing_store; /* for obscured regions */ TileManager *backing_store; /* for obscured regions */
GimpDrawable *drawable; /* floating sel is attached to */ GimpDrawable *drawable; /* floating sel is attached to */
guint initial : 1; /* is fs composited yet? */ gboolean initial; /* is fs composited yet? */
guint boundary_known : 1; /* is the current boundary valid */
gboolean boundary_known; /* is the current boundary valid */
BoundSeg *segs; /* boundary of floating sel */ BoundSeg *segs; /* boundary of floating sel */
guint num_segs; /* number of segs in boundary */ gint num_segs; /* number of segs in boundary */
} fs; } fs;
}; };

View File

@ -39,9 +39,9 @@ struct _GimpLayerMask
GimpLayer *layer; GimpLayer *layer;
guint apply_mask : 1; /* controls mask application */ gboolean apply_mask; /* controls mask application */
guint edit_mask : 1; /* edit mask or layer? */ gboolean edit_mask; /* edit mask or layer? */
guint show_mask : 1; /* show mask or layer? */ gboolean show_mask; /* show mask or layer? */
}; };
struct _GimpLayerMaskClass struct _GimpLayerMaskClass

View File

@ -54,8 +54,8 @@ struct _GimpModuleInfoObj
gchar *fullpath; /* path to the module */ gchar *fullpath; /* path to the module */
GimpModuleState state; /* what's happened to the module */ GimpModuleState state; /* what's happened to the module */
guint on_disk : 1; /* TRUE if file still exists */ gboolean on_disk; /* TRUE if file still exists */
guint load_inhibit : 1; /* user requests not to load at boot time */ gboolean load_inhibit; /* user requests not to load at boot time */
/* Count of times main gimp is within the module. Normally, this /* Count of times main gimp is within the module. Normally, this
* will be 1, and we assume that the module won't call its * will be 1, and we assume that the module won't call its
@ -64,7 +64,7 @@ struct _GimpModuleInfoObj
* unload function, to stop the module attempting to unload * unload function, to stop the module attempting to unload
* itself. * itself.
*/ */
guint refs; gint refs;
/* stuff from now on may be NULL depending on the state the module is in */ /* stuff from now on may be NULL depending on the state the module is in */
GimpModuleInfo *info; /* returned values from module_init */ GimpModuleInfo *info; /* returned values from module_init */

View File

@ -53,8 +53,9 @@ struct _GimpPalette
GimpData parent_instance; GimpData parent_instance;
GList *colors; GList *colors;
guint n_colors; gint n_colors;
guint n_columns;
gint n_columns;
}; };
struct _GimpPaletteClass struct _GimpPaletteClass

View File

@ -57,8 +57,8 @@ typedef struct _IdleRenderStruct IdleRenderStruct;
struct _IdleRenderStruct struct _IdleRenderStruct
{ {
guint width; gint width;
guint height; gint height;
gint x; gint x;
gint y; gint y;
gint basex; gint basex;
@ -94,9 +94,9 @@ struct _GimpDisplay
GtkWidget *shell; /* shell widget for this gdisplay */ GtkWidget *shell; /* shell widget for this gdisplay */
gint scale; /* scale factor from original raw image */ gint scale; /* scale factor from original raw image */
guint dot_for_dot : 1; /* is monitor resolution being ignored? */ gboolean dot_for_dot; /* is monitor resolution being ignored? */
guint draw_guides : 1; /* should the guides be drawn? */ gboolean draw_guides; /* should the guides be drawn? */
guint snap_to_guides : 1; /* should the guides be snapped to? */ gboolean snap_to_guides; /* should the guides be snapped to? */
GSList *update_areas; /* Update areas list */ GSList *update_areas; /* Update areas list */

View File

@ -43,7 +43,7 @@ struct _GimpUndo
gpointer data; /* data to implement the undo */ gpointer data; /* data to implement the undo */
glong size; /* size of undo item */ glong size; /* size of undo item */
guint dirties_image : 1; /* TRUE if undo mutates image */ gboolean dirties_image; /* TRUE if undo mutates image */
GimpUndoPopFunc pop_func; /* function pointer to undo pop proc */ GimpUndoPopFunc pop_func; /* function pointer to undo pop proc */
GimpUndoFreeFunc free_func; /* function pointer to free undo data */ GimpUndoFreeFunc free_func; /* function pointer to free undo data */

View File

@ -50,7 +50,7 @@ struct _InfoDialog
GtkWidget *info_notebook; GtkWidget *info_notebook;
GSList *field_list; GSList *field_list;
guint nfields; gint nfields;
void *user_data; void *user_data;
}; };

View File

@ -42,8 +42,8 @@ struct _Resize
ResizeType type; ResizeType type;
ResizeTarget target; ResizeTarget target;
guint width; gint width;
guint height; gint height;
gdouble resolution_x; gdouble resolution_x;
gdouble resolution_y; gdouble resolution_y;

View File

@ -57,8 +57,8 @@ typedef struct _IdleRenderStruct IdleRenderStruct;
struct _IdleRenderStruct struct _IdleRenderStruct
{ {
guint width; gint width;
guint height; gint height;
gint x; gint x;
gint y; gint y;
gint basex; gint basex;
@ -94,9 +94,9 @@ struct _GimpDisplay
GtkWidget *shell; /* shell widget for this gdisplay */ GtkWidget *shell; /* shell widget for this gdisplay */
gint scale; /* scale factor from original raw image */ gint scale; /* scale factor from original raw image */
guint dot_for_dot : 1; /* is monitor resolution being ignored? */ gboolean dot_for_dot; /* is monitor resolution being ignored? */
guint draw_guides : 1; /* should the guides be drawn? */ gboolean draw_guides; /* should the guides be drawn? */
guint snap_to_guides : 1; /* should the guides be snapped to? */ gboolean snap_to_guides; /* should the guides be snapped to? */
GSList *update_areas; /* Update areas list */ GSList *update_areas; /* Update areas list */

View File

@ -57,12 +57,12 @@ struct _GimpDisplayShell
gint offset_x; /* offset of display image into raw image */ gint offset_x; /* offset of display image into raw image */
gint offset_y; gint offset_y;
guint disp_width; /* width of drawing area */ gint disp_width; /* width of drawing area */
guint disp_height; /* height of drawing area */ gint disp_height; /* height of drawing area */
gint disp_xoffset; gint disp_xoffset;
gint disp_yoffset; gint disp_yoffset;
guint proximity : 1; /* is a device in proximity */ gboolean proximity; /* is a device in proximity */
Selection *select; /* Selection object */ Selection *select; /* Selection object */
@ -91,7 +91,7 @@ struct _GimpDisplayShell
guchar *render_buf; /* buffer for rendering the image */ guchar *render_buf; /* buffer for rendering the image */
GdkGC *render_gc; /* GC for rendering the image */ GdkGC *render_gc; /* GC for rendering the image */
guint icon_size; /* size of the icon pixmap */ gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */ guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */ GdkCursorType current_cursor; /* Currently installed main cursor */
@ -99,10 +99,10 @@ struct _GimpDisplayShell
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */ GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor */ GdkCursorType override_cursor; /* Overriding cursor */
guint using_override_cursor : 1; /* is the cursor overridden? */ gboolean using_override_cursor; /* is the cursor overridden? */
guint draw_cursor : 1; /* should we draw software cursor ? */ gboolean draw_cursor; /* should we draw software cursor ? */
guint have_cursor : 1; /* is cursor currently drawn ? */ gboolean have_cursor; /* is cursor currently drawn ? */
gint cursor_x; /* software cursor X value */ gint cursor_x; /* software cursor X value */
gint cursor_y; /* software cursor Y value */ gint cursor_y; /* software cursor Y value */

View File

@ -42,10 +42,10 @@ struct _Selection
gint index_layer; /* index of current stipple pattern */ gint index_layer; /* index of current stipple pattern */
gint state; /* internal drawing state */ gint state; /* internal drawing state */
gint paused; /* count of pause requests */ gint paused; /* count of pause requests */
guint speed; /* speed of marching ants */ gboolean recalc; /* flag to recalculate the selection */
guint recalc : 1; /* flag to recalculate the selection */ gint speed; /* speed of marching ants */
guint hidden : 1; /* is the selection hidden? */ gboolean hidden; /* is the selection hidden? */
guint layer_hidden : 1; /* is the layer boundary hidden? */ gboolean layer_hidden; /* is the layer boundary hidden? */
guint timeout_id; /* timer for successive draws */ guint timeout_id; /* timer for successive draws */
gint cycle; /* color cycling turned on */ gint cycle; /* color cycling turned on */
GdkPixmap *cycle_pix; /* cycling pixmap */ GdkPixmap *cycle_pix; /* cycling pixmap */

View File

@ -57,12 +57,12 @@ struct _GimpDisplayShell
gint offset_x; /* offset of display image into raw image */ gint offset_x; /* offset of display image into raw image */
gint offset_y; gint offset_y;
guint disp_width; /* width of drawing area */ gint disp_width; /* width of drawing area */
guint disp_height; /* height of drawing area */ gint disp_height; /* height of drawing area */
gint disp_xoffset; gint disp_xoffset;
gint disp_yoffset; gint disp_yoffset;
guint proximity : 1; /* is a device in proximity */ gboolean proximity; /* is a device in proximity */
Selection *select; /* Selection object */ Selection *select; /* Selection object */
@ -91,7 +91,7 @@ struct _GimpDisplayShell
guchar *render_buf; /* buffer for rendering the image */ guchar *render_buf; /* buffer for rendering the image */
GdkGC *render_gc; /* GC for rendering the image */ GdkGC *render_gc; /* GC for rendering the image */
guint icon_size; /* size of the icon pixmap */ gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */ guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */ GdkCursorType current_cursor; /* Currently installed main cursor */
@ -99,10 +99,10 @@ struct _GimpDisplayShell
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */ GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor */ GdkCursorType override_cursor; /* Overriding cursor */
guint using_override_cursor : 1; /* is the cursor overridden? */ gboolean using_override_cursor; /* is the cursor overridden? */
guint draw_cursor : 1; /* should we draw software cursor ? */ gboolean draw_cursor; /* should we draw software cursor ? */
guint have_cursor : 1; /* is cursor currently drawn ? */ gboolean have_cursor; /* is cursor currently drawn ? */
gint cursor_x; /* software cursor X value */ gint cursor_x; /* software cursor X value */
gint cursor_y; /* software cursor Y value */ gint cursor_y; /* software cursor Y value */

View File

@ -195,48 +195,48 @@ static gchar * open_backup_file (gchar *filename,
/* global gimprc variables */ /* global gimprc variables */
GimpRc gimprc = GimpRc gimprc =
{ {
marching_speed : 300, /* 300 ms */ /* marching_speed */ 300, /* 300 ms */
last_opened_size : 4, /* last_opened_size */ 4,
gamma_val : 1.0, /* gamma_val */ 1.0,
transparency_type : 1, /* Mid-Tone Checks */ /* transparency_type */ 1, /* Mid-Tone Checks */
perfectmouse : FALSE, /* off (fast and sloppy) */ /* perfectmouse */ FALSE, /* off (fast and sloppy) */
transparency_size : 1, /* Medium sized */ /* transparency_size */ 1, /* Medium sized */
min_colors : 144, /* 6*6*4 */ /* min_colors */ 144, /* 6*6*4 */
install_cmap : FALSE, /* install_cmap */ FALSE,
cycled_marching_ants : 0, /* cycled_marching_ants */ 0,
default_threshold : 15, /* default_threshold */ 15,
resize_windows_on_zoom : FALSE, /* resize_windows_on_zoom */ FALSE,
resize_windows_on_resize : FALSE, /* resize_windows_on_resize */ FALSE,
no_cursor_updating : FALSE, /* no_cursor_updating */ FALSE,
preview_size : GIMP_PREVIEW_SIZE_SMALL, /* preview_size */ GIMP_PREVIEW_SIZE_SMALL,
nav_preview_size : GIMP_PREVIEW_SIZE_HUGE, /* nav_preview_size */ GIMP_PREVIEW_SIZE_HUGE,
show_rulers : TRUE, /* show_rulers */ TRUE,
show_statusbar : TRUE, /* show_statusbar */ TRUE,
auto_save : TRUE, /* auto_save */ TRUE,
confirm_on_close : TRUE, /* confirm_on_close */ TRUE,
default_dot_for_dot : TRUE, /* default_dot_for_dot */ TRUE,
save_session_info : TRUE, /* save_session_info */ TRUE,
save_device_status : FALSE, /* save_device_status */ FALSE,
always_restore_session : TRUE, /* always_restore_session */ TRUE,
show_tips : TRUE, /* show_tips */ TRUE,
last_tip : -1, /* last_tip */ -1,
show_tool_tips : TRUE, /* show_tool_tips */ TRUE,
monitor_xres : 72.0, /* monitor_xres */ 72.0,
monitor_yres : 72.0, /* monitor_yres */ 72.0,
using_xserver_resolution : FALSE, /* using_xserver_resolution */ FALSE,
image_title_format : NULL, /* image_title_format */ NULL,
global_paint_options : FALSE, /* global_paint_options */ FALSE,
show_indicators : TRUE, /* show_indicators */ TRUE,
max_new_image_size : 33554432, /* 32 MB */ /* max_new_image_size */ 33554432, /* 32 MB */
trust_dirty_flag : FALSE, /* trust_dirty_flag */ FALSE,
use_help : TRUE, /* use_help */ TRUE,
nav_window_per_display : FALSE, /* nav_window_per_display */ FALSE,
info_window_follows_mouse : TRUE, /* info_window_follows_mouse */ TRUE,
help_browser : HELP_BROWSER_GIMP, /* help_browser */ HELP_BROWSER_GIMP,
cursor_mode : CURSOR_MODE_TOOL_ICON, /* cursor_mode */ CURSOR_MODE_TOOL_ICON,
disable_tearoff_menus : FALSE, /* disable_tearoff_menus */ FALSE,
theme_path : NULL, /* theme_path */ NULL,
theme : NULL /* theme */ NULL
}; };
static GHashTable *parse_func_hash = NULL; static GHashTable *parse_func_hash = NULL;

View File

@ -25,21 +25,21 @@ typedef struct _GimpRc GimpRc;
/* global gimprc variables - need some comments on this stuff */ /* global gimprc variables - need some comments on this stuff */
struct _GimpRc struct _GimpRc
{ {
guint marching_speed; gint marching_speed;
guint last_opened_size; gint last_opened_size;
gdouble gamma_val; gdouble gamma_val;
guint transparency_type; gint transparency_type;
gboolean perfectmouse; gboolean perfectmouse;
guint transparency_size; gint transparency_size;
guint min_colors; gint min_colors;
gboolean install_cmap; gboolean install_cmap;
gboolean cycled_marching_ants; gboolean cycled_marching_ants;
guint default_threshold; gint default_threshold;
gboolean resize_windows_on_zoom; gboolean resize_windows_on_zoom;
gboolean resize_windows_on_resize; gboolean resize_windows_on_resize;
gboolean no_cursor_updating; gboolean no_cursor_updating;
guint preview_size; gint preview_size;
guint nav_preview_size; gint nav_preview_size;
gboolean show_rulers; gboolean show_rulers;
gboolean show_statusbar; gboolean show_statusbar;
gboolean auto_save; gboolean auto_save;

View File

@ -37,7 +37,7 @@ struct _BrushSelect
/* Context to store the current brush & paint options */ /* Context to store the current brush & paint options */
GimpContext *context; GimpContext *context;
guint spacing_value; gint spacing_value;
}; };

View File

@ -61,12 +61,12 @@ struct _GradientEditor
GtkObject *scroll_data; GtkObject *scroll_data;
/* Instant update */ /* Instant update */
guint instant_update : 1; gboolean instant_update;
/* Gradient preview */ /* Gradient preview */
guchar *preview_rows[2]; /* For caching redraw info */ guchar *preview_rows[2]; /* For caching redraw info */
gint preview_last_x; gint preview_last_x;
guint preview_button_down : 1; gboolean preview_button_down;
/* Gradient control */ /* Gradient control */
GdkPixmap *control_pixmap; GdkPixmap *control_pixmap;
@ -75,7 +75,7 @@ struct _GradientEditor
GimpGradientSegment *control_sel_r; /* Right segment of selection */ GimpGradientSegment *control_sel_r; /* Right segment of selection */
GradientEditorDragMode control_drag_mode; /* What is being dragged? */ GradientEditorDragMode control_drag_mode; /* What is being dragged? */
guint32 control_click_time; /* Time when mouse was pressed */ guint32 control_click_time; /* Time when mouse was pressed */
guint control_compress : 1; /* Compressing/expanding handles */ gboolean control_compress; /* Compressing/expanding handles */
gint control_last_x; /* Last mouse position when dragging */ gint control_last_x; /* Last mouse position when dragging */
gdouble control_last_gx; /* Last position (wrt gradient) when dragging */ gdouble control_last_gx; /* Last position (wrt gradient) when dragging */
gdouble control_orig_pos; /* Original click position when dragging */ gdouble control_orig_pos; /* Original click position when dragging */
@ -91,10 +91,10 @@ struct _GradientEditor
/* Color dialogs */ /* Color dialogs */
GimpGradientSegment *left_saved_segments; GimpGradientSegment *left_saved_segments;
gboolean left_saved_dirty;
GimpGradientSegment *right_saved_segments; GimpGradientSegment *right_saved_segments;
gboolean right_saved_dirty;
guint left_saved_dirty : 1;
guint right_saved_dirty : 1;
}; };

View File

@ -30,7 +30,7 @@ struct _GradientSelect
GimpContext *context; GimpContext *context;
gchar *callback_name; gchar *callback_name;
guint sample_size; gint sample_size;
}; };

View File

@ -50,7 +50,7 @@ struct _InfoDialog
GtkWidget *info_notebook; GtkWidget *info_notebook;
GSList *field_list; GSList *field_list;
guint nfields; gint nfields;
void *user_data; void *user_data;
}; };

View File

@ -42,8 +42,8 @@ struct _Resize
ResizeType type; ResizeType type;
ResizeTarget target; ResizeTarget target;
guint width; gint width;
guint height; gint height;
gdouble resolution_x; gdouble resolution_x;
gdouble resolution_y; gdouble resolution_y;

View File

@ -35,12 +35,6 @@ x( \
guint count, \ guint count, \
guchar *dst) __attribute((regparm(3))); guchar *dst) __attribute((regparm(3)));
/* A drawable has an alphachannel if contains either 4 or 2 bytes data
* aka GRAYA and RGBA and thus the macro below works. This will have
* to change if we support bigger formats. We'll do it so for now because
* masking is always cheaper than passing parameters over the stack. */
#define HAS_ALPHA(bytes) (~##bytes & 1)
#define MMX_PIXEL_OP_3A_1A(op) \ #define MMX_PIXEL_OP_3A_1A(op) \
MMX_PIXEL_OP(op##_pixels_3a_3a) \ MMX_PIXEL_OP(op##_pixels_3a_3a) \
MMX_PIXEL_OP(op##_pixels_1a_1a) MMX_PIXEL_OP(op##_pixels_1a_1a)

View File

@ -106,16 +106,16 @@ static void gimp_dodgeburn_tool_motion (GimpPaintTool *paint_t
GimpLut *lut); GimpLut *lut);
static gfloat gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static gfloat gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static GimpToolOptions * gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info); static GimpToolOptions * gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info);
@ -459,8 +459,8 @@ gimp_dodgeburn_tool_motion (GimpPaintTool *paint_tool,
static gfloat static gfloat
gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data, gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;
@ -476,8 +476,8 @@ gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
static gfloat static gfloat
gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data, gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;
@ -498,8 +498,8 @@ gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
static gfloat static gfloat
gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data, gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;

View File

@ -45,7 +45,7 @@ struct _BlobSpan
struct _Blob struct _Blob
{ {
gint y; gint y;
guint height; gint height;
BlobSpan data[1]; BlobSpan data[1];
}; };

View File

@ -59,7 +59,7 @@ struct _GimpInkTool
gdouble last_time; /* previous time of a motion event */ gdouble last_time; /* previous time of a motion event */
gdouble lastx, lasty; /* previous position of a motion event */ gdouble lastx, lasty; /* previous position of a motion event */
guint init_velocity : 1; gboolean init_velocity;
}; };
struct _GimpInkToolClass struct _GimpInkToolClass

View File

@ -80,8 +80,8 @@ struct _GimpPaintTool
GimpBrush * brush; /* current brush */ GimpBrush * brush; /* current brush */
guint pick_colors : 1; /* pick color if ctrl or alt is pressed */ gboolean pick_colors; /* pick color if ctrl or alt is pressed */
guint pick_state : 1; /* was ctrl or alt pressed when clicked? */ gboolean pick_state; /* was ctrl or alt pressed when clicked? */
ToolFlags flags; /* tool flags, see ToolFlags above */ ToolFlags flags; /* tool flags, see ToolFlags above */
guint context_id; /* for the statusbar */ guint context_id; /* for the statusbar */

View File

@ -30,7 +30,7 @@ struct _Path
{ {
GSList *path_details; GSList *path_details;
gint pathtype; /* Only beziers to start with */ gint pathtype; /* Only beziers to start with */
guint closed : 1; gboolean closed;
guint32 state; guint32 state;
guint32 locked; /* Only bottom bit used */ guint32 locked; /* Only bottom bit used */
GimpTattoo tattoo; /* The tattoo for the path */ GimpTattoo tattoo; /* The tattoo for the path */

View File

@ -63,8 +63,9 @@ struct _GimpBezierSelectPoint
GimpBezierSelectPoint *prev; /* prev point on curve */ GimpBezierSelectPoint *prev; /* prev point on curve */
GimpBezierSelectPoint *next_curve; /* Next curve segment */ GimpBezierSelectPoint *next_curve; /* Next curve segment */
guint pointflags : 1; /* Status of point 0 = not selected gint pointflags; /* Status of point 0 = not selected
* 1 = selected */ * 1 = selected
*/
}; };
struct _GimpBezierSelectTool struct _GimpBezierSelectTool
@ -80,7 +81,7 @@ struct _GimpBezierSelectTool
GimpBezierSelectPoint *cur_control; /* the current active control point */ GimpBezierSelectPoint *cur_control; /* the current active control point */
GimpBezierSelectPoint *last_point; /* the last point on the curve */ GimpBezierSelectPoint *last_point; /* the last point on the curve */
guint num_points; /* number of points in the curve */ gint num_points; /* number of points in the curve */
GimpChannel *mask; /* null if the curve is open */ GimpChannel *mask; /* null if the curve is open */
GSList **scanlines; /* used in converting a curve */ GSList **scanlines; /* used in converting a curve */
}; };
@ -98,7 +99,7 @@ typedef void (* GimpBezierSelectPointsFunc) (GimpBezierSelectTool *bezier_sel,
typedef struct typedef struct
{ {
guint count; gint count;
} CountCurves; } CountCurves;

View File

@ -80,8 +80,8 @@ struct _GimpPaintTool
GimpBrush * brush; /* current brush */ GimpBrush * brush; /* current brush */
guint pick_colors : 1; /* pick color if ctrl or alt is pressed */ gboolean pick_colors; /* pick color if ctrl or alt is pressed */
guint pick_state : 1; /* was ctrl or alt pressed when clicked? */ gboolean pick_state; /* was ctrl or alt pressed when clicked? */
ToolFlags flags; /* tool flags, see ToolFlags above */ ToolFlags flags; /* tool flags, see ToolFlags above */
guint context_id; /* for the statusbar */ guint context_id; /* for the statusbar */

View File

@ -67,8 +67,8 @@ struct _ColorBalanceDialog
guchar g_lookup[256]; guchar g_lookup[256];
guchar b_lookup[256]; guchar b_lookup[256];
guint preserve_luminosity : 1; gboolean preserve_luminosity;
guint preview : 1; gboolean preview;
GimpTransferMode application_mode; GimpTransferMode application_mode;
}; };

View File

@ -70,7 +70,7 @@ struct _CurvesDialog
gint color; gint color;
gint channel; gint channel;
guint preview : 1; gboolean preview;
gint grab_point; gint grab_point;
gint last; gint last;

View File

@ -106,16 +106,16 @@ static void gimp_dodgeburn_tool_motion (GimpPaintTool *paint_t
GimpLut *lut); GimpLut *lut);
static gfloat gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static gfloat gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data, static gfloat gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value); gfloat value);
static GimpToolOptions * gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info); static GimpToolOptions * gimp_dodgeburn_tool_options_new (GimpToolInfo *tool_info);
@ -459,8 +459,8 @@ gimp_dodgeburn_tool_motion (GimpPaintTool *paint_tool,
static gfloat static gfloat
gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data, gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;
@ -476,8 +476,8 @@ gimp_dodgeburn_tool_highlights_lut_func (gpointer user_data,
static gfloat static gfloat
gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data, gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;
@ -498,8 +498,8 @@ gimp_dodgeburn_tool_midtones_lut_func (gpointer user_data,
static gfloat static gfloat
gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data, gimp_dodgeburn_tool_shadows_lut_func (gpointer user_data,
guint nchannels, gint nchannels,
guint channel, gint channel,
gfloat value) gfloat value)
{ {
gfloat *exposure_ptr = (gfloat *) user_data; gfloat *exposure_ptr = (gfloat *) user_data;

View File

@ -39,8 +39,8 @@ struct _GimpFreeSelectTool
GimpSelectionTool parent_instance; GimpSelectionTool parent_instance;
GimpVector2 *points; GimpVector2 *points;
guint num_points; gint num_points;
guint max_segs; gint max_segs;
}; };
struct _GimpFreeSelectToolClass struct _GimpFreeSelectToolClass

View File

@ -77,7 +77,7 @@ struct _HueSaturationDialog
gdouble saturation[7]; gdouble saturation[7];
HueRange hue_partition; HueRange hue_partition;
guint preview : 1; gboolean preview;
}; };

View File

@ -45,7 +45,7 @@ struct _BlobSpan
struct _Blob struct _Blob
{ {
gint y; gint y;
guint height; gint height;
BlobSpan data[1]; BlobSpan data[1];
}; };

View File

@ -59,7 +59,7 @@ struct _GimpInkTool
gdouble last_time; /* previous time of a motion event */ gdouble last_time; /* previous time of a motion event */
gdouble lastx, lasty; /* previous position of a motion event */ gdouble lastx, lasty; /* previous position of a motion event */
guint init_velocity : 1; gboolean init_velocity;
}; };
struct _GimpInkToolClass struct _GimpInkToolClass

View File

@ -77,8 +77,8 @@ struct _GimpIscissorsTool
GSList *curves; /* the list of curves */ GSList *curves; /* the list of curves */
guint first_point : 1; /* is this the first point? */ gboolean first_point; /* is this the first point? */
guint connected : 1; /* is the region closed? */ gboolean connected; /* is the region closed? */
Iscissors_state state; /* state of iscissors */ Iscissors_state state; /* state of iscissors */
Iscissors_draw draw; /* items to draw on a draw request */ Iscissors_draw draw; /* items to draw on a draw request */

View File

@ -39,7 +39,7 @@ struct _GimpMagnifyTool
GimpDrawTool parent_instance; GimpDrawTool parent_instance;
gint x, y; /* upper left hand coordinate */ gint x, y; /* upper left hand coordinate */
guint w, h; /* width and height */ gint w, h; /* width and height */
GimpZoomType op; /* magnify operation */ GimpZoomType op; /* magnify operation */
}; };

View File

@ -54,7 +54,7 @@ struct _GimpMeasureTool
gint last_x; /* last x coordinate */ gint last_x; /* last x coordinate */
gint last_y; /* last y coordinate */ gint last_y; /* last y coordinate */
gint point; /* what are we manipulating? */ gint point; /* what are we manipulating? */
guint num_points; /* how many points? */ gint num_points; /* how many points? */
gint x[3]; /* three x coordinates */ gint x[3]; /* three x coordinates */
gint y[3]; /* three y coordinates */ gint y[3]; /* three y coordinates */
gdouble angle1; /* first angle */ gdouble angle1; /* first angle */

View File

@ -80,8 +80,8 @@ struct _GimpPaintTool
GimpBrush * brush; /* current brush */ GimpBrush * brush; /* current brush */
guint pick_colors : 1; /* pick color if ctrl or alt is pressed */ gboolean pick_colors; /* pick color if ctrl or alt is pressed */
guint pick_state : 1; /* was ctrl or alt pressed when clicked? */ gboolean pick_state; /* was ctrl or alt pressed when clicked? */
ToolFlags flags; /* tool flags, see ToolFlags above */ ToolFlags flags; /* tool flags, see ToolFlags above */
guint context_id; /* for the statusbar */ guint context_id; /* for the statusbar */

View File

@ -50,7 +50,7 @@ struct _GimpPathTool
gdouble click_position; /* The position on the segment */ gdouble click_position; /* The position on the segment */
gint click_handle_id; /* The handle ID of the segment */ gint click_handle_id; /* The handle ID of the segment */
guint active_count; /* How many segments are active? */ gint active_count; /* How many segments are active? */
/* /*
* WARNING: single_active_segment may contain non NULL Values * WARNING: single_active_segment may contain non NULL Values
* which point to the nirvana. But they are important! * which point to the nirvana. But they are important!

View File

@ -39,7 +39,7 @@ struct _GimpRectSelectTool
GimpSelectionTool parent_instance; GimpSelectionTool parent_instance;
gint x, y; /* upper left hand coordinate */ gint x, y; /* upper left hand coordinate */
guint w, h; /* width and height */ gint w, h; /* width and height */
gint center; /* is the selection being created from the gint center; /* is the selection being created from the
* center out? */ * center out? */

View File

@ -57,14 +57,14 @@ struct _ThresholdDialog
GimpHistogramView *histogram; GimpHistogramView *histogram;
GimpHistogram *hist; GimpHistogram *hist;
GimpDrawable *drawable; GimpDrawable *drawable;
ImageMap *image_map; ImageMap *image_map;
gint color; gint color;
gint low_threshold; gint low_threshold;
gint high_threshold; gint high_threshold;
guint preview : 1; gboolean preview;
}; };

View File

@ -49,16 +49,14 @@ struct _GimpTool
ToolState state; /* state of tool activity */ ToolState state; /* state of tool activity */
gint paused_count; /* paused control count */ gint paused_count; /* paused control count */
guint scroll_lock : 1; /* allow scrolling or not */ gboolean scroll_lock; /* allow scrolling or not */
guint auto_snap_to : 1; /* snap to guides automatically */ gboolean auto_snap_to; /* snap to guides automatically */
guint handle_empty_image : 1; /* invoke the tool on images without gboolean handle_empty_image; /* invoke the tool on images without
* active drawable */ * active drawable
*/
guint preserve : 1; /* Preserve this tool across drawable changes */ gboolean preserve; /* Preserve this tool across drawable changes */
guint toggled : 1; /* Bad hack to let the paint_core show the
* right toggle cursors
*/
GimpDisplay *gdisp; /* pointer to currently active gdisp */ GimpDisplay *gdisp; /* pointer to currently active gdisp */
GimpDrawable *drawable; /* pointer to the tool's current drawable */ GimpDrawable *drawable; /* pointer to the tool's current drawable */
@ -68,6 +66,10 @@ struct _GimpTool
* functions are properly * functions are properly
* virtualized * virtualized
*/ */
gboolean toggled; /* Bad hack to let the paint_core show the
* right toggle cursors
*/
}; };
struct _GimpToolClass struct _GimpToolClass

View File

@ -79,8 +79,8 @@ struct _GimpTransformTool
TransformAction function; /* current tool activity */ TransformAction function; /* current tool activity */
guint use_grid : 1; /* does the tool use the grid */ gboolean use_grid; /* does the tool use the grid */
guint use_center : 1; /* use the center handle */ gboolean use_center; /* use the center handle */
gint ngx, ngy; /* number of grid lines in original gint ngx, ngy; /* number of grid lines in original
* x and y directions * x and y directions

View File

@ -42,7 +42,7 @@ struct _GimpBrushFactoryView
GtkWidget *spacing_scale; GtkWidget *spacing_scale;
GtkAdjustment *spacing_adjustment; GtkAdjustment *spacing_adjustment;
guint change_brush_spacing : 1; gboolean change_brush_spacing;
GQuark spacing_changed_handler_id; GQuark spacing_changed_handler_id;
}; };

View File

@ -41,8 +41,8 @@ struct _GimpConstrainedHWrapBox
{ {
GtkHWrapBox parent_instance; GtkHWrapBox parent_instance;
guint rows; gint rows;
guint columns; gint columns;
}; };
struct _GimpConstrainedHWrapBoxClass struct _GimpConstrainedHWrapBoxClass

View File

@ -49,7 +49,7 @@ struct _GimpContainerMenu
GHashTable *hash_table; GHashTable *hash_table;
guint preview_size; gint preview_size;
GimpItemGetNameFunc get_name_func; GimpItemGetNameFunc get_name_func;
}; };

View File

@ -45,8 +45,8 @@ struct _GimpContainerView
GHashTable *hash_table; GHashTable *hash_table;
guint preview_size; gint preview_size;
guint reorderable : 1; gboolean reorderable;
GimpItemGetNameFunc get_name_func; GimpItemGetNameFunc get_name_func;

View File

@ -40,24 +40,24 @@ struct _GimpDialogFactoryEntry
{ {
gchar *identifier; gchar *identifier;
GimpDialogNewFunc new_func; GimpDialogNewFunc new_func;
guint preview_size; gint preview_size;
guint singleton : 1; gboolean singleton;
guint session_managed : 1; gboolean session_managed;
guint remember_size : 1; gboolean remember_size;
guint remember_if_open : 1; gboolean remember_if_open;
}; };
struct _GimpSessionInfo struct _GimpSessionInfo
{ {
gint x; gint x;
gint y; gint y;
guint width; gint width;
guint height; gint height;
GtkWidget *widget; GtkWidget *widget;
/* only valid while restoring and saving the session */ /* only valid while restoring and saving the session */
guint open : 1; gboolean open;
/* GList of gchar* of optional additional dialog specific info */ /* GList of gchar* of optional additional dialog specific info */
GList *aux_info; GList *aux_info;

View File

@ -61,12 +61,12 @@ struct _GradientEditor
GtkObject *scroll_data; GtkObject *scroll_data;
/* Instant update */ /* Instant update */
guint instant_update : 1; gboolean instant_update;
/* Gradient preview */ /* Gradient preview */
guchar *preview_rows[2]; /* For caching redraw info */ guchar *preview_rows[2]; /* For caching redraw info */
gint preview_last_x; gint preview_last_x;
guint preview_button_down : 1; gboolean preview_button_down;
/* Gradient control */ /* Gradient control */
GdkPixmap *control_pixmap; GdkPixmap *control_pixmap;
@ -75,7 +75,7 @@ struct _GradientEditor
GimpGradientSegment *control_sel_r; /* Right segment of selection */ GimpGradientSegment *control_sel_r; /* Right segment of selection */
GradientEditorDragMode control_drag_mode; /* What is being dragged? */ GradientEditorDragMode control_drag_mode; /* What is being dragged? */
guint32 control_click_time; /* Time when mouse was pressed */ guint32 control_click_time; /* Time when mouse was pressed */
guint control_compress : 1; /* Compressing/expanding handles */ gboolean control_compress; /* Compressing/expanding handles */
gint control_last_x; /* Last mouse position when dragging */ gint control_last_x; /* Last mouse position when dragging */
gdouble control_last_gx; /* Last position (wrt gradient) when dragging */ gdouble control_last_gx; /* Last position (wrt gradient) when dragging */
gdouble control_orig_pos; /* Original click position when dragging */ gdouble control_orig_pos; /* Original click position when dragging */
@ -91,10 +91,10 @@ struct _GradientEditor
/* Color dialogs */ /* Color dialogs */
GimpGradientSegment *left_saved_segments; GimpGradientSegment *left_saved_segments;
gboolean left_saved_dirty;
GimpGradientSegment *right_saved_segments; GimpGradientSegment *right_saved_segments;
gboolean right_saved_dirty;
guint left_saved_dirty : 1;
guint right_saved_dirty : 1;
}; };

View File

@ -42,7 +42,7 @@ struct _GimpImageDock
GimpContainer *image_container; GimpContainer *image_container;
guint show_image_menu : 1; gboolean show_image_menu;
gboolean auto_follow_active; gboolean auto_follow_active;
GtkWidget *option_menu; GtkWidget *option_menu;

View File

@ -45,10 +45,10 @@ struct _GimpListItem
GtkWidget *name_label; GtkWidget *name_label;
/*< protected >*/ /*< protected >*/
guint preview_size; gint preview_size;
/*< private >*/ /*< private >*/
guint reorderable : 1; gboolean reorderable;
GimpContainer *container; GimpContainer *container;
GimpDropType drop_type; GimpDropType drop_type;
GimpItemGetNameFunc get_name_func; GimpItemGetNameFunc get_name_func;

View File

@ -42,7 +42,7 @@ struct _GimpImageDock
GimpContainer *image_container; GimpContainer *image_container;
guint show_image_menu : 1; gboolean show_image_menu;
gboolean auto_follow_active; gboolean auto_follow_active;
GtkWidget *option_menu; GtkWidget *option_menu;

View File

@ -45,7 +45,7 @@ struct _GimpMenuItem
GtkWidget *name_label; GtkWidget *name_label;
/*< protected >*/ /*< protected >*/
guint preview_size; gint preview_size;
/*< private >*/ /*< private >*/
GimpItemGetNameFunc get_name_func; GimpItemGetNameFunc get_name_func;

View File

@ -42,18 +42,18 @@ struct _GimpNavigationPreview
/* values in image coordinates */ /* values in image coordinates */
gint x; gint x;
gint y; gint y;
guint width; gint width;
guint height; gint height;
/* values in preview coordinates */ /* values in preview coordinates */
gint p_x; gint p_x;
gint p_y; gint p_y;
guint p_width; gint p_width;
guint p_height; gint p_height;
gint motion_offset_x; gint motion_offset_x;
gint motion_offset_y; gint motion_offset_y;
guint has_grab : 1; gboolean has_grab;
GdkGC *gc; GdkGC *gc;
}; };

View File

@ -42,18 +42,18 @@ struct _GimpNavigationPreview
/* values in image coordinates */ /* values in image coordinates */
gint x; gint x;
gint y; gint y;
guint width; gint width;
guint height; gint height;
/* values in preview coordinates */ /* values in preview coordinates */
gint p_x; gint p_x;
gint p_y; gint p_y;
guint p_width; gint p_width;
guint p_height; gint p_height;
gint motion_offset_x; gint motion_offset_x;
gint motion_offset_y; gint motion_offset_y;
guint has_grab : 1; gboolean has_grab;
GdkGC *gc; GdkGC *gc;
}; };

View File

@ -41,20 +41,20 @@ struct _GimpPreview
GimpViewable *viewable; GimpViewable *viewable;
GimpRGB border_color;
gint width; gint width;
gint height; gint height;
gint border_width; gint border_width;
guint dot_for_dot : 1; gboolean dot_for_dot;
guint is_popup : 1; GimpRGB border_color;
guint clickable : 1;
guint show_popup : 1; gboolean is_popup;
gboolean clickable;
gboolean show_popup;
/*< private >*/ /*< private >*/
guint size; gint size;
guint in_button : 1; gboolean in_button;
guint press_state; guint press_state;
guint idle_id; guint idle_id;
guint popup_id; guint popup_id;

View File

@ -41,20 +41,20 @@ struct _GimpPreview
GimpViewable *viewable; GimpViewable *viewable;
GimpRGB border_color;
gint width; gint width;
gint height; gint height;
gint border_width; gint border_width;
guint dot_for_dot : 1; gboolean dot_for_dot;
guint is_popup : 1; GimpRGB border_color;
guint clickable : 1;
guint show_popup : 1; gboolean is_popup;
gboolean clickable;
gboolean show_popup;
/*< private >*/ /*< private >*/
guint size; gint size;
guint in_button : 1; gboolean in_button;
guint press_state; guint press_state;
guint idle_id; guint idle_id;
guint popup_id; guint popup_id;

View File

@ -41,20 +41,20 @@ struct _GimpPreview
GimpViewable *viewable; GimpViewable *viewable;
GimpRGB border_color;
gint width; gint width;
gint height; gint height;
gint border_width; gint border_width;
guint dot_for_dot : 1; gboolean dot_for_dot;
guint is_popup : 1; GimpRGB border_color;
guint clickable : 1;
guint show_popup : 1; gboolean is_popup;
gboolean clickable;
gboolean show_popup;
/*< private >*/ /*< private >*/
guint size; gint size;
guint in_button : 1; gboolean in_button;
guint press_state; guint press_state;
guint idle_id; guint idle_id;
guint popup_id; guint popup_id;

View File

@ -41,20 +41,20 @@ struct _GimpPreview
GimpViewable *viewable; GimpViewable *viewable;
GimpRGB border_color;
gint width; gint width;
gint height; gint height;
gint border_width; gint border_width;
guint dot_for_dot : 1; gboolean dot_for_dot;
guint is_popup : 1; GimpRGB border_color;
guint clickable : 1;
guint show_popup : 1; gboolean is_popup;
gboolean clickable;
gboolean show_popup;
/*< private >*/ /*< private >*/
guint size; gint size;
guint in_button : 1; gboolean in_button;
guint press_state; guint press_state;
guint idle_id; guint idle_id;
guint popup_id; guint popup_id;

View File

@ -54,8 +54,8 @@ struct _GimpModuleInfoObj
gchar *fullpath; /* path to the module */ gchar *fullpath; /* path to the module */
GimpModuleState state; /* what's happened to the module */ GimpModuleState state; /* what's happened to the module */
guint on_disk : 1; /* TRUE if file still exists */ gboolean on_disk; /* TRUE if file still exists */
guint load_inhibit : 1; /* user requests not to load at boot time */ gboolean load_inhibit; /* user requests not to load at boot time */
/* Count of times main gimp is within the module. Normally, this /* Count of times main gimp is within the module. Normally, this
* will be 1, and we assume that the module won't call its * will be 1, and we assume that the module won't call its
@ -64,7 +64,7 @@ struct _GimpModuleInfoObj
* unload function, to stop the module attempting to unload * unload function, to stop the module attempting to unload
* itself. * itself.
*/ */
guint refs; gint refs;
/* stuff from now on may be NULL depending on the state the module is in */ /* stuff from now on may be NULL depending on the state the module is in */
GimpModuleInfo *info; /* returned values from module_init */ GimpModuleInfo *info; /* returned values from module_init */