libgimp/gimp.[ch] libgimp/gimpchannel.[ch] libgimp/gimpdrawable.[ch]

2003-07-01  Sven Neumann  <sven@gimp.org>

	* libgimp/gimp.[ch]
	* libgimp/gimpchannel.[ch]
	* libgimp/gimpdrawable.[ch]
	* libgimp/gimpimage.[ch]
	* libgimp/gimplayer.[ch]
	* libgimp/gimpmisc.[ch]
	* libgimp/gimpmiscui.[ch]
	* libgimp/gimppixelrgn.[ch]
	* libgimp/gimpproceduraldb.[ch]: added const qualifiers to the
	libgimp API. Will cause lots of compiler warnings until the
	generated PDB code has been constified as well.

	* libgimpbase/gimpparasite.[ch]: use gconstpointer, not const
	gpointer.
This commit is contained in:
Sven Neumann 2003-07-01 18:11:18 +00:00 committed by Sven Neumann
parent a6264ada31
commit 4d61cc563d
25 changed files with 275 additions and 238 deletions

View File

@ -1,3 +1,20 @@
2003-07-01 Sven Neumann <sven@gimp.org>
* libgimp/gimp.[ch]
* libgimp/gimpchannel.[ch]
* libgimp/gimpdrawable.[ch]
* libgimp/gimpimage.[ch]
* libgimp/gimplayer.[ch]
* libgimp/gimpmisc.[ch]
* libgimp/gimpmiscui.[ch]
* libgimp/gimppixelrgn.[ch]
* libgimp/gimpproceduraldb.[ch]: added const qualifiers to the
libgimp API. Will cause lots of compiler warnings until the
generated PDB code has been constified as well.
* libgimpbase/gimpparasite.[ch]: use gconstpointer, not const
gpointer.
2003-07-01 Sven Neumann <sven@gimp.org>
* plug-ins/common/ripple.c (average_four_pixels): fixed the

View File

@ -496,8 +496,8 @@ gimp_install_procedure (const gchar *name,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
GimpParamDef *params,
GimpParamDef *return_vals)
const GimpParamDef *params,
const GimpParamDef *return_vals)
{
GPProcInstall proc_install;
@ -577,8 +577,8 @@ gimp_install_temp_proc (const gchar *name,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
GimpParamDef *params,
GimpParamDef *return_vals,
const GimpParamDef *params,
const GimpParamDef *return_vals,
GimpRunProc run_proc)
{
g_return_if_fail (name != NULL);
@ -872,7 +872,7 @@ GimpParam *
gimp_run_procedure2 (const gchar *name,
gint *n_return_vals,
gint n_params,
GimpParam *params)
const GimpParam *params)
{
GPProcRun proc_run;
GPProcReturn *proc_return;
@ -1238,7 +1238,7 @@ void
gimp_attach_new_parasite (const gchar *name,
gint flags,
gint size,
const gpointer data)
gconstpointer data)
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);

View File

@ -74,10 +74,10 @@ GIMPVAR const guint gimp_micro_version;
typedef void (* GimpInitProc) (void);
typedef void (* GimpQuitProc) (void);
typedef void (* GimpQueryProc) (void);
typedef void (* GimpRunProc) (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
typedef void (* GimpRunProc) (const gchar *name,
gint n_params,
const GimpParam *param,
gint *n_return_vals,
GimpParam **return_vals);
@ -228,8 +228,8 @@ void gimp_install_procedure (const gchar *name,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
GimpParamDef *params,
GimpParamDef *return_vals);
const GimpParamDef *params,
const GimpParamDef *return_vals);
/* Install a temporary procedure in the procedure database.
*/
@ -244,8 +244,8 @@ void gimp_install_temp_proc (const gchar *name,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
GimpParamDef *params,
GimpParamDef *return_vals,
const GimpParamDef *params,
const GimpParamDef *return_vals,
GimpRunProc run_proc);
/* Uninstall a temporary procedure
@ -279,7 +279,7 @@ GimpParam * gimp_run_procedure (const gchar *name,
GimpParam * gimp_run_procedure2 (const gchar *name,
gint *n_return_vals,
gint n_params,
GimpParam *params);
const GimpParam *params);
/* Destroy the an array of parameters. This is useful for
* destroying the return values returned by a call to
@ -314,7 +314,7 @@ const gchar * gimp_get_progname (void) G_GNUC_CONST;
void gimp_attach_new_parasite (const gchar *name,
gint flags,
gint size,
const gpointer data);
gconstpointer data);
G_END_DECLS

View File

@ -47,11 +47,11 @@
*/
gint32
gimp_channel_new (gint32 image_ID,
gchar *name,
const gchar *name,
guint width,
guint height,
gdouble opacity,
GimpRGB *color)
const GimpRGB *color)
{
return _gimp_channel_new (image_ID,
width,

View File

@ -31,11 +31,11 @@ G_BEGIN_DECLS
gint32 gimp_channel_new (gint32 image_ID,
gchar *name,
const gchar *name,
guint width,
guint height,
gdouble opacity,
GimpRGB *color);
const GimpRGB *color);
G_END_DECLS

View File

@ -103,7 +103,6 @@ gimp_drawable_delete (GimpDrawable *drawable)
}
}
gchar *
gimp_drawable_name (gint32 drawable_ID)
{
@ -113,7 +112,6 @@ gimp_drawable_name (gint32 drawable_ID)
return gimp_channel_get_name (drawable_ID);
}
gboolean
gimp_drawable_visible (gint32 drawable_ID)
{
@ -123,10 +121,9 @@ gimp_drawable_visible (gint32 drawable_ID)
return gimp_channel_get_visible (drawable_ID);
}
void
gimp_drawable_set_name (gint32 drawable_ID,
gchar *name)
const gchar *name)
{
if (gimp_drawable_is_layer (drawable_ID))
gimp_layer_set_name (drawable_ID, name);
@ -268,7 +265,7 @@ gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
gint size,
const gpointer data)
gconstpointer data)
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);

View File

@ -50,7 +50,7 @@ void gimp_drawable_delete (GimpDrawable *drawable);
gchar * gimp_drawable_name (gint32 drawable_ID);
gboolean gimp_drawable_visible (gint32 drawable_ID);
void gimp_drawable_set_name (gint32 drawable_ID,
gchar *name);
const gchar *name);
void gimp_drawable_set_visible (gint32 drawable_ID,
gboolean visible);
GimpTile * gimp_drawable_get_tile (GimpDrawable *drawable,
@ -71,7 +71,7 @@ void gimp_drawable_attach_new_parasite (gint32 drawable_ID,
const gchar *name,
gint flags,
gint size,
const gpointer data);
gconstpointer data);
G_END_DECLS

View File

@ -69,7 +69,7 @@ gimp_image_get_cmap (gint32 image_ID,
*/
gboolean
gimp_image_set_cmap (gint32 image_ID,
guchar *cmap,
const guchar *cmap,
gint num_colors)
{
return _gimp_image_set_cmap (image_ID,
@ -121,7 +121,7 @@ gimp_image_attach_new_parasite (gint32 image_ID,
const gchar *name,
gint flags,
gint size,
const gpointer data)
gconstpointer data)
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);

View File

@ -34,7 +34,7 @@ G_BEGIN_DECLS
guchar * gimp_image_get_cmap (gint32 image_ID,
gint *num_colors);
gboolean gimp_image_set_cmap (gint32 image_ID,
guchar *cmap,
const guchar *cmap,
gint num_colors);
guchar * gimp_image_get_thumbnail_data (gint32 image_ID,
@ -46,7 +46,7 @@ void gimp_image_attach_new_parasite (gint32 image_ID,
const gchar *name,
gint flags,
gint size,
const gpointer data);
gconstpointer data);
G_END_DECLS

View File

@ -47,7 +47,7 @@
*/
gint32
gimp_layer_new (gint32 image_ID,
gchar *name,
const gchar *name,
gint width,
gint height,
GimpImageType type,

View File

@ -34,7 +34,7 @@ G_BEGIN_DECLS
gint32 gimp_layer_new (gint32 image_ID,
gchar *name,
const gchar *name,
gint width,
gint height,
GimpImageType type,

View File

@ -169,7 +169,7 @@ void
gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel)
const guchar *pixel)
{
guchar *p;
gint i;

View File

@ -57,7 +57,7 @@ void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
const guchar *pixel);
void gimp_pixel_fetcher_destroy (GimpPixelFetcher *pf);

View File

@ -92,12 +92,15 @@ gimp_fixme_preview_free (GimpFixMePreview *preview)
}
GimpFixMePreview*
gimp_fixme_preview_new2 (GimpImageType drawable_type, gboolean has_frame)
gimp_fixme_preview_new2 (GimpImageType drawable_type,
gboolean has_frame)
{
GimpFixMePreview *preview = g_new0 (GimpFixMePreview, 1);
GimpFixMePreview *preview;
guchar *buf = NULL;
gint y;
preview = g_new0 (GimpFixMePreview, 1);
switch (drawable_type)
{
case GIMP_GRAY_IMAGE:
@ -146,8 +149,8 @@ gimp_fixme_preview_put_pixel (GimpFixMePreview *preview,
{
guchar *dest;
g_assert (x >= 0 && x < PREVIEW_SIZE);
g_assert (y >= 0 && y < PREVIEW_SIZE);
g_return_if_fail (x >= 0 && x < PREVIEW_SIZE);
g_return_if_fail (y >= 0 && y < PREVIEW_SIZE);
dest = preview->buffer + y * preview->rowstride;
@ -171,10 +174,10 @@ gimp_fixme_preview_get_pixel (GimpFixMePreview *preview,
gint y,
guchar *pixel)
{
guchar *src;
const guchar *src;
g_assert (x >= 0 && x < PREVIEW_SIZE);
g_assert (y >= 0 && y < PREVIEW_SIZE);
g_return_if_fail (x >= 0 && x < PREVIEW_SIZE);
g_return_if_fail (y >= 0 && y < PREVIEW_SIZE);
src = preview->buffer + y * preview->rowstride;
@ -196,7 +199,7 @@ void
gimp_fixme_preview_do_row (GimpFixMePreview *preview,
gint row,
gint width,
guchar *src)
const guchar *src)
{
gint x;
guchar *p0 = preview->even;
@ -207,40 +210,42 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
for (x = 0; x < width; x++)
{
if (bpp == 4)
switch (bpp)
{
case 4:
r = ((gdouble) src[x*4 + 0]) / 255.0;
g = ((gdouble) src[x*4 + 1]) / 255.0;
b = ((gdouble) src[x*4 + 2]) / 255.0;
a = ((gdouble) src[x*4 + 3]) / 255.0;
}
else if (bpp == 3)
{
break;
case 3:
r = ((gdouble) src[x*3 + 0]) / 255.0;
g = ((gdouble) src[x*3 + 1]) / 255.0;
b = ((gdouble) src[x*3 + 2]) / 255.0;
a = 1.0;
}
else
{
break;
default:
if (preview->cmap)
{
gint index = MIN (src[x*bpp], preview->ncolors - 1);
r = ((gdouble)preview->cmap[index * 3 + 0]) / 255.0;
g = ((gdouble)preview->cmap[index * 3 + 1]) / 255.0;
b = ((gdouble)preview->cmap[index * 3 + 2]) / 255.0;
r = ((gdouble) preview->cmap[index * 3 + 0]) / 255.0;
g = ((gdouble) preview->cmap[index * 3 + 1]) / 255.0;
b = ((gdouble) preview->cmap[index * 3 + 2]) / 255.0;
}
else
{
r = ((gdouble)src[x*bpp + 0]) / 255.0;
r = ((gdouble) src[x*bpp + 0]) / 255.0;
g = b = r;
}
if (bpp == 2)
a = ((gdouble)src[x*2 + 1]) / 255.0;
a = ((gdouble) src[x*2 + 1]) / 255.0;
else
a = 1.0;
break;
}
if ((x / GIMP_CHECK_SIZE_SM) & 1)
@ -266,12 +271,12 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
if ((row / GIMP_CHECK_SIZE_SM) & 1)
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
(guchar *) preview->odd, 0, row, width);
preview->odd, 0, row, width);
}
else
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
(guchar *) preview->even, 0, row, width);
preview->even, 0, row, width);
}
}
@ -280,8 +285,8 @@ gimp_fixme_preview_update (GimpFixMePreview *preview,
GimpFixeMePreviewFunc func,
gpointer data)
{
gint x, y;
guchar *buffer;
gint x, y;
gint bpp;
bpp = preview->bpp;
@ -289,7 +294,7 @@ gimp_fixme_preview_update (GimpFixMePreview *preview,
for (y = 0; y < preview->height; y++)
{
guchar *src = preview->cache + y * preview->rowstride;
const guchar *src = preview->cache + y * preview->rowstride;
guchar *dest = buffer;
for (x = 0; x < preview->width; x++)
@ -312,11 +317,11 @@ void
gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint32 drawable_ID)
{
const guchar *src;
gint bpp;
gint y;
gint width = PREVIEW_SIZE;
gint height = PREVIEW_SIZE;
guchar *src;
preview->cache =
gimp_drawable_get_thumbnail_data (drawable_ID, &width, &height, &bpp);
@ -369,7 +374,7 @@ gimp_fixme_preview_fill (GimpFixMePreview *preview,
gint x1, x2, y1, y2;
gint bpp;
gint y;
guchar *src;
const guchar *src;
gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
@ -504,8 +509,8 @@ gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
preview->height = GTK_PREVIEW (preview->widget)->buffer_height;
}
GList*
gimp_plug_in_parse_path (gchar *path_name,
GList *
gimp_plug_in_parse_path (const gchar *path_name,
const gchar *dir_name)
{
GList *path_list = NULL;

View File

@ -39,7 +39,8 @@ G_BEGIN_DECLS
* Don't say I didn't warn you (Maurits).
*/
typedef struct {
typedef struct
{
GtkWidget *widget;
GtkWidget *frame;
guchar *cache;
@ -57,12 +58,14 @@ typedef struct {
gboolean is_gray;
} GimpFixMePreview;
typedef void (*GimpFixeMePreviewFunc)(guchar *src, guchar *dest,
gint bpp, gpointer data);
typedef void (*GimpFixeMePreviewFunc) (const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
GimpFixMePreview *gimp_fixme_preview_new (GimpDrawable *drawable,
GimpFixMePreview * gimp_fixme_preview_new (GimpDrawable *drawable,
gboolean has_frame);
GimpFixMePreview *gimp_fixme_preview_new2 (GimpImageType drawable_type,
GimpFixMePreview * gimp_fixme_preview_new2 (GimpImageType drawable_type,
gboolean has_frame);
void gimp_fixme_preview_free (GimpFixMePreview *preview);
@ -76,10 +79,11 @@ void gimp_fixme_preview_fill (GimpFixMePreview *preview,
GimpDrawable *drawable);
void gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
GimpDrawable *drawable);
void gimp_fixme_preview_do_row (GimpFixMePreview *preview,
gint row,
gint width,
guchar *src);
const guchar *src);
void gimp_fixme_preview_put_pixel (GimpFixMePreview *preview,
gint x,
@ -90,7 +94,9 @@ void gimp_fixme_preview_get_pixel (GimpFixMePreview *preview,
gint y,
guchar *pixel);
GList *gimp_plug_in_parse_path (gchar *path_name, const gchar *dir_name);
GList * gimp_plug_in_parse_path (const gchar *path_name,
const gchar *dir_name);
G_END_DECLS

View File

@ -169,7 +169,7 @@ void
gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel)
const guchar *pixel)
{
guchar *p;
gint i;

View File

@ -57,7 +57,7 @@ void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
const guchar *pixel);
void gimp_pixel_fetcher_destroy (GimpPixelFetcher *pf);

View File

@ -322,7 +322,7 @@ gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
void
gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y)
{
@ -338,7 +338,8 @@ gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
tile = gimp_drawable_get_tile2 (pr->drawable, pr->shadow, x, y);
gimp_tile_ref (tile);
tile_data = tile->data + tile->bpp * (tile->ewidth * (y % TILE_HEIGHT) + (x % TILE_WIDTH));
tile_data = tile->data + tile->bpp * (tile->ewidth *
(y % TILE_HEIGHT) + (x % TILE_WIDTH));
for (b = 0; b < tile->bpp; b++)
*tile_data++ = *buf++;
@ -348,7 +349,7 @@ gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
void
gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint width)
@ -399,7 +400,7 @@ gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
void
gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint height)
@ -441,7 +442,7 @@ gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
void
gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint width,
@ -495,7 +496,8 @@ gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
for (ty = y; ty < yboundary; ty++)
{
src = buf + bufstride * (ty - ystart) + bpp * (x - xstart);
dest = tile->data + tile->bpp * (tile->ewidth * (ty % TILE_HEIGHT) + (x % TILE_WIDTH));
dest = tile->data + tile->bpp * (tile->ewidth *
(ty % TILE_HEIGHT) + (x % TILE_WIDTH));
#ifdef MEMCPY_IS_NICE
memcpy ((void *)dest, (const void *)src, (xboundary-x)*bpp);
@ -592,9 +594,9 @@ gimp_pixel_rgns_register (gint nrgns,
gpointer
gimp_pixel_rgns_process (gpointer pri_ptr)
{
GSList *list;
GimpPixelRgnHolder *prh;
GimpPixelRgnIterator *pri;
GSList *list;
pri = (GimpPixelRgnIterator*) pri_ptr;
pri->process_count++;
@ -614,11 +616,15 @@ gimp_pixel_rgns_process (gpointer pri_ptr)
*/
prh->pr->process_count++;
/* Unref the last referenced tile if the underlying region is a tile manager */
/* Unref the last referenced tile if the underlying region
* is a tile manager
*/
if (prh->pr->drawable)
{
GimpTile *tile = gimp_drawable_get_tile2 (prh->pr->drawable, prh->pr->shadow,
prh->pr->x, prh->pr->y);
GimpTile *tile = gimp_drawable_get_tile2 (prh->pr->drawable,
prh->pr->shadow,
prh->pr->x,
prh->pr->y);
gimp_tile_unref (tile, prh->pr->dirty);
}
@ -644,8 +650,9 @@ gimp_get_portion_width (GimpPixelRgnIterator *pri)
gint min_width = G_MAXINT;
gint width;
/* Find the minimum width to the next vertical tile (in the case of a tile manager)
* or to the end of the pixel region (in the case of no tile manager)
/* Find the minimum width to the next vertical tile (in the case of
* a tile manager) or to the end of the pixel region (in the case of
* no tile manager)
*/
list = pri->pixel_regions;
@ -687,8 +694,9 @@ gimp_get_portion_height (GimpPixelRgnIterator *pri)
gint min_height = G_MAXINT;
gint height;
/* Find the minimum height to the next vertical tile (in the case of a tile manager)
* or to the end of the pixel region (in the case of no tile manager)
/* Find the minimum height to the next vertical tile (in the case of
* a tile manager) or to the end of the pixel region (in the case of
* no tile manager)
*/
list = pri->pixel_regions;
@ -781,14 +789,18 @@ gimp_pixel_rgn_configure (GimpPixelRgnHolder *prh,
gint offx;
gint offy;
tile = gimp_drawable_get_tile2 (prh->pr->drawable, prh->pr->shadow, prh->pr->x, prh->pr->y);
tile = gimp_drawable_get_tile2 (prh->pr->drawable,
prh->pr->shadow,
prh->pr->x,
prh->pr->y);
gimp_tile_ref (tile);
offx = prh->pr->x % TILE_WIDTH;
offy = prh->pr->y % TILE_HEIGHT;
prh->pr->rowstride = tile->ewidth * prh->pr->bpp;
prh->pr->data = tile->data + offy * prh->pr->rowstride + offx * prh->pr->bpp;
prh->pr->data = (tile->data +
offy * prh->pr->rowstride + offx * prh->pr->bpp);
}
else
{

View File

@ -75,21 +75,21 @@ void gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
gint width,
gint height);
void gimp_pixel_rgn_set_pixel (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y);
void gimp_pixel_rgn_set_row (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint width);
void gimp_pixel_rgn_set_col (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint height);
void gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
guchar *buf,
const guchar *buf,
gint x,
gint y,
gint width,

View File

@ -51,7 +51,7 @@
* Returns: TRUE on success.
*/
gboolean
gimp_procedural_db_proc_info (gchar *procedure,
gimp_procedural_db_proc_info (const gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
@ -130,7 +130,7 @@ gimp_procedural_db_proc_info (gchar *procedure,
* the identifier
*/
gboolean
gimp_procedural_db_get_data (gchar *identifier,
gimp_procedural_db_get_data (const gchar *identifier,
gpointer data)
{
gint size;
@ -164,7 +164,7 @@ gimp_procedural_db_get_data (gchar *identifier,
* Returns: TRUE on success.
*/
gboolean
gimp_procedural_db_set_data (gchar *identifier,
gimp_procedural_db_set_data (const gchar *identifier,
gpointer data,
guint32 bytes)
{

View File

@ -27,7 +27,7 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
gboolean gimp_procedural_db_proc_info (gchar *procedure,
gboolean gimp_procedural_db_proc_info (const gchar *procedure,
gchar **blurb,
gchar **help,
gchar **author,
@ -38,9 +38,9 @@ gboolean gimp_procedural_db_proc_info (gchar *procedure,
gint *num_values,
GimpParamDef **args,
GimpParamDef **return_vals);
gboolean gimp_procedural_db_get_data (gchar *identifier,
gboolean gimp_procedural_db_get_data (const gchar *identifier,
gpointer data);
gboolean gimp_procedural_db_set_data (gchar *identifier,
gboolean gimp_procedural_db_set_data (const gchar *identifier,
gpointer data,
guint32 bytes);

View File

@ -169,7 +169,7 @@ void
gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel)
const guchar *pixel)
{
guchar *p;
gint i;

View File

@ -57,7 +57,7 @@ void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
const guchar *pixel);
void gimp_pixel_fetcher_destroy (GimpPixelFetcher *pf);

View File

@ -66,7 +66,7 @@ GimpParasite *
gimp_parasite_new (const gchar *name,
guint32 flags,
guint32 size,
const gpointer data)
gconstpointer data)
{
GimpParasite *parasite;

View File

@ -53,7 +53,7 @@ struct _GimpParasite
GimpParasite * gimp_parasite_new (const gchar *name,
guint32 flags,
guint32 size,
const gpointer data);
gconstpointer data);
void gimp_parasite_free (GimpParasite *parasite);
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);