Convert ugly comments into named structure fields. Much cleaner and less

2001-12-02  Daniel Egger  <degger@fhm.edu>

	* app/gimprc.c: Convert ugly comments into named structure fields.
	Much cleaner and less errorprone though may cause troubles on
	older compilers and then needs to be reverted. Please report!

	* app/base/base-types.h: Add FIXME reminder.

	* app/base/gimplut.c: Use CLAMP macro instead of if-cascade.

	* app/base/temp-buf.c: Remove duplicated calculations and simplify
	checks.

	* app/base/tile-manager.c:
	- (tile_manager_get_tile_num): Return success and take an additional
	  pointer for the tilenumber.
	- Simplify logic in the rest of the file as a result.
	- Remove rotten debugging cruft.

	* app/core/gimpbrushgenerated.c: Fix two stylistic nits.

	* app/app_procs.c: Include <stdlib.h> for exit () prototype.

	* app/core/gimpdrawable-blend.c: Include <stdlib.h> for abs ()
	prototype.

	* app/display/gimpdisplay.c: Include <string.h> for memcpy ()
	prototype.

	* app/core/gimpimage-convert.c: (HIST_RGB): First parameter is
	not const. Fixes a gcc warning for a wrong return value.

	* libgimpwidgets/gimpunitmenu.c
	* app/core/gimpunit.c: Add suggested (by gcc 3.1 cvs) parentheses
	to group correct logic tests together.

	* app/paint-funcs/paint-funcs-generic.h: Fix my HAS_ALPHA macro
	to avoid gcc 3.1 cvs warning.

	* app/gimprc.h
	* pathP.h
	* base-config.h
	* app/base/boundary.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.c
	* app/base/tile-private.h
	* app/base/tile.[ch]
	* 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/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
	* app/gui/info-dialog.h
	* app/gui/resize-dialog.h
	* app/tools/gimpbezierselecttool.h
	* app/tools/gimpcolorbalancetool.h
	* app/tools/gimpcolorpickertool.h
	* app/tools/gimpcurvestool.h
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpfreeselecttool.h
	* app/tools/gimpfuzzyselecttool.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/tools/path_toolP.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: Unsignify lots of variables and
	parameters and use bitfields in structs where possible. First
	part of a huge cleanup all over the code...
This commit is contained in:
Daniel Egger 2001-12-02 14:59:30 +00:00 committed by Daniel Egger
parent 6d0e5c3450
commit 1ed9180112
111 changed files with 735 additions and 711 deletions

109
ChangeLog
View File

@ -1,3 +1,112 @@
2001-12-02 Daniel Egger <degger@fhm.edu>
* app/gimprc.c: Convert ugly comments into named structure fields.
Much cleaner and less errorprone though may cause troubles on
older compilers and then needs to be reverted. Please report!
* app/base/base-types.h: Add FIXME reminder.
* app/base/gimplut.c: Use CLAMP macro instead of if-cascade.
* app/base/temp-buf.c: Remove duplicated calculations and simplify
checks.
* app/base/tile-manager.c:
- (tile_manager_get_tile_num): Return success and take an additional
pointer for the tilenumber.
- Simplify logic in the rest of the file as a result.
- Remove rotten debugging cruft.
* app/core/gimpbrushgenerated.c: Fix two stylistic nits.
* app/app_procs.c: Include <stdlib.h> for exit () prototype.
* app/core/gimpdrawable-blend.c: Include <stdlib.h> for abs ()
prototype.
* app/display/gimpdisplay.c: Include <string.h> for memcpy ()
prototype.
* app/core/gimpimage-convert.c: (HIST_RGB): First parameter is
not const. Fixes a gcc warning for a wrong return value.
* libgimpwidgets/gimpunitmenu.c
* app/core/gimpunit.c: Add suggested (by gcc 3.1 cvs) parentheses
to group correct logic tests together.
* app/paint-funcs/paint-funcs-generic.h: Fix my HAS_ALPHA macro
to avoid gcc 3.1 cvs warning.
* app/gimprc.h
* pathP.h
* base-config.h
* app/base/boundary.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.c
* app/base/tile-private.h
* app/base/tile.[ch]
* 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/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
* app/gui/info-dialog.h
* app/gui/resize-dialog.h
* app/tools/gimpbezierselecttool.h
* app/tools/gimpcolorbalancetool.h
* app/tools/gimpcolorpickertool.h
* app/tools/gimpcurvestool.h
* app/tools/gimpdodgeburntool.c
* app/tools/gimpfreeselecttool.h
* app/tools/gimpfuzzyselecttool.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/tools/path_toolP.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: Unsignify lots of variables and
parameters and use bitfields in structs where possible. First
part of a huge cleanup all over the code...
2001-12-01 Michael Natterer <mitch@gimp.org>
* app/errors.c: forgot a "return".

View File

@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

View File

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

View File

@ -24,7 +24,7 @@
/* magic constants */
/* FIXME: Remove magic constants! */
#define MAX_CHANNELS 4
#define GRAY_PIX 0

View File

@ -33,8 +33,8 @@ struct _BoundSeg
gint y1;
gint x2;
gint y2;
gboolean open;
gboolean visited;
guint open : 1;
guint visited : 1;
};

View File

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

View File

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

View File

@ -58,9 +58,9 @@ void
gimp_lut_setup (GimpLut *lut,
GimpLutFunc func,
void *user_data,
gint nchannels)
guint nchannels)
{
gint i, v;
guint i, v;
gdouble val;
if (lut->luts)
@ -83,12 +83,7 @@ gimp_lut_setup (GimpLut *lut,
/* to add gamma correction use func(v ^ g) ^ 1/g instead. */
val = 255.0 * func (user_data, lut->nchannels, i, v/255.0) + 0.5;
if (val < 0.0)
lut->luts[i][v] = 0;
else if (val >= 255.0)
lut->luts[i][v] = 255;
else
lut->luts[i][v] = val;
lut->luts[i][v] = CLAMP (val, 0, 255);
}
}
}
@ -97,7 +92,7 @@ void
gimp_lut_setup_exact (GimpLut *lut,
GimpLutFunc func,
void *user_data,
gint nchannels)
guint nchannels)
{
gimp_lut_setup (lut, func, user_data, nchannels);
}
@ -107,7 +102,7 @@ gimp_lut_process (GimpLut *lut,
PixelRegion *srcPR,
PixelRegion *destPR)
{
gint h, width, src_r_i, dest_r_i;
guint h, width, src_r_i, dest_r_i;
guchar *src, *dest;
guchar *lut0 = NULL, *lut1 = NULL, *lut2 = NULL, *lut3 = NULL;
@ -189,7 +184,7 @@ void
gimp_lut_process_inline (GimpLut *lut,
PixelRegion *srcPR)
{
gint h, width, src_r_i;
guint h, width, src_r_i;
guchar *src;
guchar *lut0 = NULL, *lut1 = NULL, *lut2 = NULL, *lut3 = NULL;

View File

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

View File

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

View File

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

View File

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

View File

@ -29,19 +29,19 @@ typedef struct _PixelSurround
Tile *tile;
TileManager *mgr;
guchar *buff;
gint buff_size;
gint bpp;
gint w;
gint h;
guint buff_size;
guint bpp;
guint w;
guint h;
guchar bg[MAX_CHANNELS];
gint row_stride;
guint row_stride;
} PixelSurround;
void pixel_surround_init (PixelSurround *ps,
TileManager *tm,
gint w,
gint h,
guint w,
guint h,
guchar bg[MAX_CHANNELS]);
/* 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
*/
guchar * pixel_surround_lock (PixelSurround *ps,
gint x,
gint y);
guint x,
guint y);
gint pixel_surround_rowstride (PixelSurround *ps);
guint pixel_surround_rowstride (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 */
static guchar *
static inline guchar *
temp_buf_allocate (guint size)
{
guchar *data;
@ -73,7 +73,7 @@ temp_buf_to_color (TempBuf *src_buf,
{
guchar *src;
guchar *dest;
glong num_bytes;
gulong num_bytes;
src = temp_buf_data (src_buf);
dest = temp_buf_data (dest_buf);
@ -97,7 +97,7 @@ temp_buf_to_gray (TempBuf *src_buf,
{
guchar *src;
guchar *dest;
glong num_bytes;
gulong num_bytes;
gfloat pix;
src = temp_buf_data (src_buf);
@ -117,19 +117,20 @@ temp_buf_to_gray (TempBuf *src_buf,
}
TempBuf *
temp_buf_new (gint width,
gint height,
gint bytes,
temp_buf_new (guint width,
guint height,
guint bytes,
gint x,
gint y,
guchar *col)
{
glong i;
gint j;
guchar *data;
TempBuf *temp;
const gulong size = width * height * bytes;
glong i;
gint j;
guchar *data;
TempBuf *temp;
g_return_val_if_fail (width > 0 && height > 0, NULL);
g_return_val_if_fail (size > 0, NULL);
temp = g_new (TempBuf, 1);
@ -141,7 +142,7 @@ temp_buf_new (gint width,
temp->swapped = FALSE;
temp->filename = NULL;
temp->data = data = temp_buf_allocate (width * height * bytes);
temp->data = data = temp_buf_allocate (size);
/* initialize the data */
if (col)
@ -197,8 +198,8 @@ temp_buf_new (gint width,
parameters into a newly allocated tempbuf */
TempBuf *
temp_buf_new_check (gint width,
gint height,
temp_buf_new_check (guint width,
guint height,
GimpCheckType check_type,
GimpCheckSize check_size)
{
@ -207,7 +208,7 @@ temp_buf_new_check (gint width,
guchar check_shift = 0;
guchar fg_color = 0;
guchar bg_color = 0;
gint i, j;
guint i, j;
g_return_val_if_fail (width > 0 && height > 0, NULL);
@ -308,18 +309,16 @@ temp_buf_copy (TempBuf *src,
TempBuf *
temp_buf_resize (TempBuf *buf,
gint bytes,
guint bytes,
gint x,
gint y,
gint width,
gint height)
guint width,
guint height)
{
gint size;
g_return_val_if_fail (width > 0 && height > 0, NULL);
/* calculate the requested size */
size = width * height * bytes;
const gulong size = width * height * bytes;
g_return_val_if_fail (size > 0, NULL);
/* First, configure the canvas buffer */
if (!buf)
@ -350,11 +349,11 @@ temp_buf_resize (TempBuf *buf,
TempBuf *
temp_buf_scale (TempBuf *src,
gint new_width,
gint new_height)
guint new_width,
guint new_height)
{
gint loop1;
gint loop2;
guint loop1;
guint loop2;
gdouble x_ratio;
gdouble y_ratio;
guchar *src_data;
@ -403,8 +402,8 @@ temp_buf_copy_area (TempBuf *src,
TempBuf *dest,
gint x,
gint y,
gint width,
gint height,
guint width,
guint height,
gint dest_x,
gint dest_y)
{
@ -508,8 +507,8 @@ temp_buf_data_clear (TempBuf *temp_buf)
MaskBuf *
mask_buf_new (gint width,
gint height)
mask_buf_new (guint width,
guint height)
{
static guchar empty = 0;

View File

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

View File

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

View File

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

View File

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

View File

@ -22,10 +22,10 @@
struct _PixelDataHandle
{
guchar *data;
gint width;
gint height;
gint stride;
gint bpp;
guint width;
guint height;
guint stride;
guint bpp;
};
/* Creates a new tile manager with the specified
@ -38,9 +38,9 @@ struct _PixelDataHandle
* hierarchy is "nlevels - 1". That level will be smaller
* than TILE_WIDTH x TILE_HEIGHT
*/
TileManager * tile_manager_new (gint toplevel_width,
gint toplevel_height,
gint bpp);
TileManager * tile_manager_new (guint toplevel_width,
guint toplevel_height,
guint bpp);
/* 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,
gint xpixel,
gint ypixel,
gint wantread,
gint wantwrite);
gboolean wantread,
gboolean wantwrite);
/* Get a specified tile from a tile manager.
*/
Tile * tile_manager_get (TileManager *tm,
gint tile_num,
gint wantread,
gint wantwrite);
guint tile_num,
gboolean wantread,
gboolean wantwrite);
/* Request that (if possible) the tile at x,y be swapped
* 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,
TileManager *tm,
gint tile_num);
guint tile_num);
void tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm,
gint xpixel,

View File

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

View File

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

View File

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

View File

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

View File

@ -440,7 +440,7 @@ gimp_brush_generated_thaw (GimpBrushGenerated *brush)
if (brush->freeze > 0)
brush->freeze--;
if (brush->freeze == 0)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
}
@ -460,7 +460,7 @@ gimp_brush_generated_set_radius (GimpBrushGenerated *brush,
brush->radius = radius;
if (! brush->freeze)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
return brush->radius;

View File

@ -440,7 +440,7 @@ gimp_brush_generated_thaw (GimpBrushGenerated *brush)
if (brush->freeze > 0)
brush->freeze--;
if (brush->freeze == 0)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
}
@ -460,7 +460,7 @@ gimp_brush_generated_set_radius (GimpBrushGenerated *brush,
brush->radius = radius;
if (! brush->freeze)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
return brush->radius;

View File

@ -440,7 +440,7 @@ gimp_brush_generated_thaw (GimpBrushGenerated *brush)
if (brush->freeze > 0)
brush->freeze--;
if (brush->freeze == 0)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
}
@ -460,7 +460,7 @@ gimp_brush_generated_set_radius (GimpBrushGenerated *brush,
brush->radius = radius;
if (! brush->freeze)
if (!brush->freeze)
gimp_data_dirty (GIMP_DATA (brush));
return brush->radius;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -59,7 +59,7 @@ struct _GimpDataFactory
const gchar **data_path;
const GimpDataFactoryLoaderEntry *loader_entries;
gint n_loader_entries;
guint n_loader_entries;
GimpDataNewFunc data_new_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,
const gchar **data_path,
const GimpDataFactoryLoaderEntry *loader_entries,
gint n_loader_entries,
guint n_loader_entries,
GimpDataNewFunc new_func,
GimpDataGetStandardFunc standard_func);

View File

@ -18,6 +18,7 @@
#include "config.h"
#include <stdlib.h>
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
@ -60,8 +61,8 @@ typedef struct
{
PixelRegion *PR;
guchar *row_data;
gint bytes;
gint width;
guint bytes;
guint width;
} PutPixelData;

View File

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

View File

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

View File

@ -402,7 +402,7 @@ typedef ColorFreq *CFHistogram;
#define HIST_RGB(hist_ptr,r,g,b) (&(hist_ptr)[REF_FUNC((r),(g),(b))])
*/
static inline
ColorFreq * HIST_RGB(const ColorFreq *hist_ptr,
ColorFreq * HIST_RGB(ColorFreq *hist_ptr,
const int r, const int g, const int b)
{
return (&(hist_ptr)[

View File

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

View File

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

View File

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

View File

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

View File

@ -54,8 +54,8 @@ struct _GimpModuleInfoObj
gchar *fullpath; /* path to the module */
GimpModuleState state; /* what's happened to the module */
gboolean on_disk; /* TRUE if file still exists */
gboolean load_inhibit; /* user requests not to load at boot time */
guint on_disk : 1; /* TRUE if file still exists */
guint load_inhibit : 1; /* user requests not to load at boot time */
/* Count of times main gimp is within the module. Normally, this
* 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
* itself.
*/
gint refs;
guint refs;
/* stuff from now on may be NULL depending on the state the module is in */
GimpModuleInfo *info; /* returned values from module_init */

View File

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

View File

@ -18,6 +18,7 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "display-types.h"

View File

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

View File

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

View File

@ -186,8 +186,8 @@ gchar *
_gimp_unit_get_identifier (Gimp *gimp,
GimpUnit unit)
{
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
g_return_val_if_fail (((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units))) ||
(unit == GIMP_UNIT_PERCENT),
gimp_unit_defs[GIMP_UNIT_INCH].identifier);
@ -204,8 +204,8 @@ gchar *
_gimp_unit_get_symbol (Gimp *gimp,
GimpUnit unit)
{
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
g_return_val_if_fail (((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units))) ||
(unit == GIMP_UNIT_PERCENT),
gimp_unit_defs[GIMP_UNIT_INCH].symbol);
@ -222,8 +222,8 @@ gchar *
_gimp_unit_get_abbreviation (Gimp *gimp,
GimpUnit unit)
{
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
g_return_val_if_fail (((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units))) ||
(unit == GIMP_UNIT_PERCENT),
gimp_unit_defs[GIMP_UNIT_INCH].abbreviation);
@ -240,8 +240,8 @@ gchar *
_gimp_unit_get_singular (Gimp *gimp,
GimpUnit unit)
{
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
g_return_val_if_fail (((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units))) ||
(unit == GIMP_UNIT_PERCENT),
gettext (gimp_unit_defs[GIMP_UNIT_INCH].singular));
@ -258,8 +258,8 @@ gchar *
_gimp_unit_get_plural (Gimp *gimp,
GimpUnit unit)
{
g_return_val_if_fail ((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units)) ||
g_return_val_if_fail (((unit >= GIMP_UNIT_PIXEL) &&
(unit < (GIMP_UNIT_END + gimp->n_user_units))) ||
(unit == GIMP_UNIT_PERCENT),
gettext (gimp_unit_defs[GIMP_UNIT_INCH].plural));

View File

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

View File

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

View File

@ -18,6 +18,7 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include "display-types.h"

View File

@ -57,8 +57,8 @@ typedef struct _IdleRenderStruct IdleRenderStruct;
struct _IdleRenderStruct
{
gint width;
gint height;
guint width;
guint height;
gint x;
gint y;
gint basex;
@ -94,9 +94,9 @@ struct _GimpDisplay
GtkWidget *shell; /* shell widget for this gdisplay */
gint scale; /* scale factor from original raw image */
gboolean dot_for_dot; /* is monitor resolution being ignored? */
gboolean draw_guides; /* should the guides be drawn? */
gboolean snap_to_guides; /* should the guides be snapped to? */
guint dot_for_dot : 1; /* is monitor resolution being ignored? */
guint draw_guides : 1; /* should the guides be drawn? */
guint snap_to_guides : 1; /* should the guides be snapped to? */
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_y;
gint disp_width; /* width of drawing area */
gint disp_height; /* height of drawing area */
guint disp_width; /* width of drawing area */
guint disp_height; /* height of drawing area */
gint disp_xoffset;
gint disp_yoffset;
gboolean proximity; /* is a device in proximity */
guint proximity : 1; /* is a device in proximity */
Selection *select; /* Selection object */
@ -91,7 +91,7 @@ struct _GimpDisplayShell
guchar *render_buf; /* buffer for rendering the image */
GdkGC *render_gc; /* GC for rendering the image */
gint icon_size; /* size of the icon pixmap */
guint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */
@ -99,10 +99,10 @@ struct _GimpDisplayShell
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor */
gboolean using_override_cursor; /* is the cursor overridden? */
guint using_override_cursor : 1; /* is the cursor overridden? */
gboolean draw_cursor; /* should we draw software cursor ? */
gboolean have_cursor; /* is cursor currently drawn ? */
guint draw_cursor : 1; /* should we draw software cursor ? */
guint have_cursor : 1; /* is cursor currently drawn ? */
gint cursor_x; /* software cursor X 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 state; /* internal drawing state */
gint paused; /* count of pause requests */
gboolean recalc; /* flag to recalculate the selection */
gint speed; /* speed of marching ants */
gboolean hidden; /* is the selection hidden? */
gboolean layer_hidden; /* is the layer boundary hidden? */
guint speed; /* speed of marching ants */
guint recalc : 1; /* flag to recalculate the selection */
guint hidden : 1; /* is the selection hidden? */
guint layer_hidden : 1; /* is the layer boundary hidden? */
guint timeout_id; /* timer for successive draws */
gint cycle; /* color cycling turned on */
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_y;
gint disp_width; /* width of drawing area */
gint disp_height; /* height of drawing area */
guint disp_width; /* width of drawing area */
guint disp_height; /* height of drawing area */
gint disp_xoffset;
gint disp_yoffset;
gboolean proximity; /* is a device in proximity */
guint proximity : 1; /* is a device in proximity */
Selection *select; /* Selection object */
@ -91,7 +91,7 @@ struct _GimpDisplayShell
guchar *render_buf; /* buffer for rendering the image */
GdkGC *render_gc; /* GC for rendering the image */
gint icon_size; /* size of the icon pixmap */
guint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */
@ -99,10 +99,10 @@ struct _GimpDisplayShell
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor */
gboolean using_override_cursor; /* is the cursor overridden? */
guint using_override_cursor : 1; /* is the cursor overridden? */
gboolean draw_cursor; /* should we draw software cursor ? */
gboolean have_cursor; /* is cursor currently drawn ? */
guint draw_cursor : 1; /* should we draw software cursor ? */
guint have_cursor : 1; /* is cursor currently drawn ? */
gint cursor_x; /* software cursor X value */
gint cursor_y; /* software cursor Y value */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@
* 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. */
/* FIXME: Move to a global place */
#define HAS_ALPHA(bytes) (~##bytes & 1)
#define HAS_ALPHA(bytes) (~bytes & 1)
/* FIXME: Move to a more global place */
struct apply_layer_mode_struct

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -40,7 +40,6 @@ struct _GimpColorPickerTool
gint centerx; /* starting x coord */
gint centery; /* starting y coord */
};
struct _GimpColorPickerToolClass

View File

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

View File

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

View File

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

View File

@ -38,12 +38,12 @@ struct _GimpFuzzySelectTool
{
GimpSelectionTool parent_instance;
gint x, y; /* Point from which to execute seed fill */
gint first_x; /* */
gint first_y; /* variables to keep track of sensitivity */
gdouble first_threshold; /* initial value of threshold slider */
gint x, y; /* Point from which to execute seed fill */
gint first_x; /* */
gint first_y; /* variables to keep track of sensitivity */
gdouble first_threshold; /* initial value of threshold slider */
GimpChannel *fuzzy_mask;
GimpChannel *fuzzy_mask;
};
struct _GimpFuzzySelectToolClass

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -38,12 +38,12 @@ struct _GimpFuzzySelectTool
{
GimpSelectionTool parent_instance;
gint x, y; /* Point from which to execute seed fill */
gint first_x; /* */
gint first_y; /* variables to keep track of sensitivity */
gdouble first_threshold; /* initial value of threshold slider */
gint x, y; /* Point from which to execute seed fill */
gint first_x; /* */
gint first_y; /* variables to keep track of sensitivity */
gdouble first_threshold; /* initial value of threshold slider */
GimpChannel *fuzzy_mask;
GimpChannel *fuzzy_mask;
};
struct _GimpFuzzySelectToolClass

View File

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

View File

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

View File

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

View File

@ -59,7 +59,6 @@ struct _path_segment
PathCurve *parent; /* the parent Curve */
PathSegment *next; /* Next Segment or NULL */
PathSegment *prev; /* Previous Segment or NULL */
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More