Commit 3018ec35 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

first set of plug-ins adapted to the constified libgimp API.

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

	* plug-ins/common: first set of plug-ins adapted to the constified
	libgimp API.
parent 4d61cc56
2003-07-01 Sven Neumann <sven@gimp.org>
* plug-ins/common: first set of plug-ins adapted to the constified
libgimp API.
2003-07-01 Sven Neumann <sven@gimp.org>
* libgimp/gimp.[ch]
......@@ -99,9 +99,9 @@ all other GIMP Library headers.
</para>
@name:
@nparams:
@n_params:
@param:
@nreturn_vals:
@n_return_vals:
@return_vals:
......
......@@ -66,8 +66,13 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
guchar *bg);
typedef void (* GimpRgnFunc1) (guchar *src, gint bpp, gpointer);
typedef void (* GimpRgnFunc2) (guchar *src, guchar *dest, gint bpp, gpointer);
typedef void (* GimpRgnFunc1) (const guchar *src,
gint bpp,
gpointer data);
typedef void (* GimpRgnFunc2) (const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
......
......@@ -66,8 +66,13 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
guchar *bg);
typedef void (* GimpRgnFunc1) (guchar *src, gint bpp, gpointer);
typedef void (* GimpRgnFunc2) (guchar *src, guchar *dest, gint bpp, gpointer);
typedef void (* GimpRgnFunc1) (const guchar *src,
gint bpp,
gpointer data);
typedef void (* GimpRgnFunc2) (const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
......
......@@ -66,8 +66,13 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
guchar *bg);
typedef void (* GimpRgnFunc1) (guchar *src, gint bpp, gpointer);
typedef void (* GimpRgnFunc2) (guchar *src, guchar *dest, gint bpp, gpointer);
typedef void (* GimpRgnFunc1) (const guchar *src,
gint bpp,
gpointer data);
typedef void (* GimpRgnFunc2) (const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
......
......@@ -861,11 +861,11 @@ typedef struct
/* Declare local functions. */
static void query (void);
static void run (char *name,
int nparams,
GimpParam *param,
int *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void alienmap (GimpDrawable *drawable);
static void transform (guchar *, guchar *, guchar *,
......@@ -882,7 +882,7 @@ static void alienmap_logo_dialog (void);
/***** Variables *****/
static GimpRunMode run_mode;
static GimpRunMode run_mode;
static GimpFixMePreview *preview;
GimpPlugInInfo PLUG_IN_INFO =
......@@ -1015,11 +1015,11 @@ transform (guchar *r,
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
......@@ -1108,7 +1108,10 @@ run (gchar *name,
}
static void
alienmap_func (guchar *src, guchar *dest, gint bpp, gpointer data)
alienmap_func (const guchar *src,
guchar *dest,
gint bpp,
gpointer data)
{
guchar v1, v2, v3;
......
......@@ -860,11 +860,11 @@ typedef struct
/* Declare local functions. */
static void query (void);
static void run (char *name,
int nparams,
GimpParam *param,
int *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void alienmap2 (GimpDrawable *drawable);
static void transform (guchar*, guchar*, guchar*);
......@@ -1001,11 +1001,11 @@ transform (guchar *r,
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
......@@ -1099,7 +1099,10 @@ run (gchar *name,
}
static void
alienmap2_func (guchar *src, guchar *dest, gint bpp, gpointer data)
alienmap2_func (const guchar *src,
guchar *dest,
gint bpp,
gpointer data)
{
guchar v1, v2, v3;
......
......@@ -40,11 +40,11 @@
#include "libgimp/stdplugins-intl.h"
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gint load_palette (FILE *fp,
guchar palette[]);
......@@ -135,16 +135,16 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2]; /* Return values */
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image;
static GimpParam values[2]; /* Return values */
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image;
run_mode = param[0].data.d_int32;
......
......@@ -305,11 +305,11 @@ static gchar *channel_names[] =
};
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static GimpPDBStatusType CML_main_function (gint preview_p);
static void CML_compute_next_step (gint size,
......@@ -403,7 +403,7 @@ GimpPlugInInfo PLUG_IN_INFO =
typedef struct
{
gint run;
gboolean run;
} Interface;
static Interface INTERFACE =
......@@ -480,11 +480,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
......
......@@ -27,16 +27,16 @@
* Declare some local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gboolean save_aa (gint32 drawable_ID,
gchar *filename,
gint output_type);
static void gimp2aa (gint32 drawable_ID,
aa_context *context);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gboolean save_aa (gint32 drawable_ID,
gchar *filename,
gint output_type);
static void gimp2aa (gint32 drawable_ID,
aa_context *context);
static gint type_dialog (gint selected);
static void type_dialog_toggle_update (GtkWidget *widget,
......@@ -119,11 +119,11 @@ get_type_from_string (const gchar *string)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2];
GimpRunMode run_mode;
......
......@@ -70,11 +70,11 @@ enum
};
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static GimpPDBStatusType align_layers (gint32 image_id);
static void align_layers_get_align_offsets (gint32 drawable_id,
......@@ -119,7 +119,7 @@ static ValueType VALS =
typedef struct
{
gint run;
gboolean run;
} Interface;
static Interface INTERFACE =
......@@ -156,11 +156,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
......
......@@ -134,11 +134,11 @@ typedef enum
/* Declare local functions. */
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void do_playback (void);
......@@ -246,11 +246,11 @@ query (void)
}
static void
run (gchar *name,
gint n_params,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint n_params,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpRunMode run_mode;
......
......@@ -101,11 +101,11 @@ typedef enum
/* Declare local functions. */
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gint32 do_optimizations (GimpRunMode run_mode);
......@@ -230,11 +230,11 @@ query (void)
}
static void
run (gchar *name,
gint n_params,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint n_params,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2];
GimpRunMode run_mode;
......
......@@ -62,11 +62,11 @@
/* Declare local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void drawlens (GimpDrawable *drawable);
......@@ -98,7 +98,7 @@ static LensValues lvals =
typedef struct
{
gint run;
gboolean run;
} LensInterface;
static LensInterface bint =
......@@ -136,11 +136,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpDrawable *drawable;
......
......@@ -23,11 +23,11 @@
/* Declare local functions. */
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gint colors_equal (guchar *col1,
guchar *col2,
......@@ -80,15 +80,15 @@ query (void)
}
static void
run (gchar *name,
gint n_params,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint n_params,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_id;
gboolean interactive;
......
......@@ -42,11 +42,11 @@
/* Declare local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void autostretch_hsv (GimpDrawable *drawable);
static void indexed_autostretch_hsv (gint32 image_ID);
......@@ -97,11 +97,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpDrawable *drawable;
......
......@@ -91,7 +91,7 @@ typedef struct
{
GtkWidget *preview;
guchar preview_row[PREVIEW_SIZE * 4];
gint run;
gboolean run;
guchar *pv_cache;
gint img_bpp;
} BlindsInterface;
......@@ -114,11 +114,11 @@ gint fanwidths[MAX_FANS];
GimpDrawable *blindsdrawable;
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gint blinds_dialog (void);
......@@ -190,11 +190,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpDrawable *drawable;
......
......@@ -108,7 +108,7 @@ static BlurVals pivals =
typedef struct
{
gint run;
gboolean run;
} BlurInterface;
static BlurInterface blur_int =
......@@ -123,11 +123,11 @@ static BlurInterface blur_int =
********************************/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
GimpPlugInInfo PLUG_IN_INFO =
{
......@@ -222,11 +222,11 @@ query (void)
********************************/
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
GimpDrawable *drawable;
GimpRunMode run_mode;
......
......@@ -32,11 +32,11 @@
/* Declare local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void borderaverage (GimpDrawable *drawable,
GimpRGB *result);
......@@ -105,11 +105,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[3];
GimpDrawable *drawable;
......
......@@ -206,18 +206,18 @@ typedef struct
bumpmap_params_t params;
gint run;
gboolean run;
} bumpmap_interface_t;
/***** Prototypes *****/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void bumpmap (void);
static void bumpmap_init_params (bumpmap_params_t *params);
......@@ -399,11 +399,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
......
......@@ -54,11 +54,11 @@
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static gint32 load_image (gchar *filename,
gint32 run_mode,
......@@ -139,11 +139,11 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2];
GimpRunMode run_mode;
......
......@@ -40,14 +40,14 @@
/* Declare local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,