mirror of https://github.com/GNOME/gimp.git
more plug-ins adapted to libgimp changes.
2003-07-02 Sven Neumann <sven@gimp.org> * plug-ins: more plug-ins adapted to libgimp changes.
This commit is contained in:
parent
1240214a0a
commit
1016c682c8
|
@ -1,3 +1,7 @@
|
|||
2003-07-02 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins: more plug-ins adapted to libgimp changes.
|
||||
|
||||
2003-07-01 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpbrushselect.c
|
||||
|
|
|
@ -93,11 +93,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 void explorer (GimpDrawable *drawable);
|
||||
static void explorer_render_row (const guchar *src_row,
|
||||
|
@ -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)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
gint32 image_ID;
|
||||
|
|
|
@ -171,11 +171,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;
|
||||
|
|
|
@ -207,11 +207,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;
|
||||
|
|
|
@ -73,11 +73,11 @@ struct Bitmap_Head_Struct Bitmap_Head;
|
|||
/* Declare some 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);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -147,18 +147,18 @@ 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;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gint32 image_ID;
|
||||
gint32 drawable_ID;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
static GimpParam values[2];
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gint32 image_ID;
|
||||
gint32 drawable_ID;
|
||||
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
|
||||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
||||
|
|
|
@ -58,11 +58,11 @@ static char ident[] = "@(#) GIMP Compose plug-in v1.03 17-Mar-99";
|
|||
/* 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 compose (const gchar *compose_type,
|
||||
gint32 *compose_ID,
|
||||
|
@ -76,18 +76,27 @@ static gint32 create_new_image (const gchar *filename,
|
|||
GimpDrawable **drawable,
|
||||
GimpPixelRgn *pixel_rgn);
|
||||
|
||||
static void compose_rgb (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_rgba (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_hsv (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_cmy (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_cmyk (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr470 (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr709 (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr470f (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr709f (guchar **src, gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_rgb (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_rgba (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_hsv (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_cmy (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_cmyk (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr470 (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr709 (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr470f (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
static void compose_ycbcr709f (const guchar **src,
|
||||
const gint *incr, gint numpix, guchar *dst);
|
||||
|
||||
static gboolean compose_dialog (gchar *compose_type,
|
||||
gint32 drawable_ID);
|
||||
static gboolean compose_dialog (const gchar *compose_type,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gboolean check_gray (gint32 image_id,
|
||||
gint32 drawable_id,
|
||||
|
@ -115,10 +124,10 @@ typedef struct
|
|||
const gchar *channel_icon[MAX_COMPOSE_IMAGES];
|
||||
const gchar *filename; /* Name of new image */
|
||||
/* Compose functon */
|
||||
void (*compose_fun) (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst);
|
||||
void (* compose_fun) (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst);
|
||||
} COMPOSE_DSC;
|
||||
|
||||
/* Array of available compositions. */
|
||||
|
@ -313,11 +322,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];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
@ -538,7 +547,8 @@ compose (const gchar *compose_type,
|
|||
? GIMP_RGBA_IMAGE : GIMP_RGB_IMAGE;
|
||||
image_ID_dst = create_new_image (compose_dsc[compose_idx].filename,
|
||||
width, height, gdtype_dst,
|
||||
&layer_ID_dst, &drawable_dst, &pixel_rgn_dst);
|
||||
&layer_ID_dst, &drawable_dst,
|
||||
&pixel_rgn_dst);
|
||||
dst = g_new (guchar, tile_height * width * drawable_dst->bpp);
|
||||
|
||||
/* Do the composition */
|
||||
|
@ -553,7 +563,10 @@ compose (const gchar *compose_type,
|
|||
width, scan_lines);
|
||||
|
||||
/* Do the composition */
|
||||
compose_dsc[compose_idx].compose_fun (src,incr_src,width*tile_height,dst);
|
||||
compose_dsc[compose_idx].compose_fun (src,
|
||||
incr_src,
|
||||
width * tile_height,
|
||||
dst);
|
||||
|
||||
/* Set destination pixel region */
|
||||
gimp_pixel_rgn_set_rect (&pixel_rgn_dst, dst, 0, i, width, scan_lines);
|
||||
|
@ -613,16 +626,16 @@ create_new_image (const gchar *filename,
|
|||
}
|
||||
|
||||
static void
|
||||
compose_rgb (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_rgb (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *red_src = src[0];
|
||||
register guchar *green_src = src[1];
|
||||
register guchar *blue_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *red_src = src[0];
|
||||
register const guchar *green_src = src[1];
|
||||
register const guchar *blue_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint red_incr = incr_src[0], green_incr = incr_src[1], blue_incr = incr_src[2];
|
||||
|
||||
if ((red_incr == 1) && (green_incr == 1) && (blue_incr == 1))
|
||||
|
@ -647,17 +660,17 @@ compose_rgb (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_rgba (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_rgba (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *red_src = src[0];
|
||||
register guchar *green_src = src[1];
|
||||
register guchar *blue_src = src[2];
|
||||
register guchar *alpha_src = src[3];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *red_src = src[0];
|
||||
register const guchar *green_src = src[1];
|
||||
register const guchar *blue_src = src[2];
|
||||
register const guchar *alpha_src = src[3];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint red_incr = incr_src[0], green_incr = incr_src[1],
|
||||
blue_incr = incr_src[2], alpha_incr = incr_src[3];
|
||||
|
||||
|
@ -686,16 +699,16 @@ compose_rgba (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_hsv (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_hsv (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *hue_src = src[0];
|
||||
register guchar *sat_src = src[1];
|
||||
register guchar *val_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *hue_src = src[0];
|
||||
register const guchar *sat_src = src[1];
|
||||
register const guchar *val_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint hue_incr = incr_src[0], sat_incr = incr_src[1], val_incr = incr_src[2];
|
||||
|
||||
while (count-- > 0)
|
||||
|
@ -712,16 +725,16 @@ compose_hsv (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_cmy (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_cmy (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *cyan_src = src[0];
|
||||
register guchar *magenta_src = src[1];
|
||||
register guchar *yellow_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *cyan_src = src[0];
|
||||
register const guchar *magenta_src = src[1];
|
||||
register const guchar *yellow_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint cyan_incr = incr_src[0];
|
||||
gint magenta_incr = incr_src[1];
|
||||
gint yellow_incr = incr_src[2];
|
||||
|
@ -751,17 +764,17 @@ compose_cmy (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_cmyk (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_cmyk (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *cyan_src = src[0];
|
||||
register guchar *magenta_src = src[1];
|
||||
register guchar *yellow_src = src[2];
|
||||
register guchar *black_src = src[3];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *cyan_src = src[0];
|
||||
register const guchar *magenta_src = src[1];
|
||||
register const guchar *yellow_src = src[2];
|
||||
register const guchar *black_src = src[3];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint cyan, magenta, yellow, black;
|
||||
gint cyan_incr = incr_src[0];
|
||||
gint magenta_incr = incr_src[1];
|
||||
|
@ -806,16 +819,16 @@ compose_cmyk (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_ycbcr470 (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_ycbcr470 (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *y_src = src[0];
|
||||
register guchar *cb_src = src[1];
|
||||
register guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *y_src = src[0];
|
||||
register const guchar *cb_src = src[1];
|
||||
register const guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint y_incr = incr_src[0], cb_incr = incr_src[1], cr_incr = incr_src[2];
|
||||
|
||||
while (count-- > 0)
|
||||
|
@ -844,16 +857,16 @@ compose_ycbcr470 (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_ycbcr709 (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_ycbcr709 (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *y_src = src[0];
|
||||
register guchar *cb_src = src[1];
|
||||
register guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *y_src = src[0];
|
||||
register const guchar *cb_src = src[1];
|
||||
register const guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint y_incr = incr_src[0], cb_incr = incr_src[1], cr_incr = incr_src[2];
|
||||
|
||||
while (count-- > 0)
|
||||
|
@ -882,16 +895,16 @@ compose_ycbcr709 (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_ycbcr470f (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_ycbcr470f (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *y_src = src[0];
|
||||
register guchar *cb_src = src[1];
|
||||
register guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *y_src = src[0];
|
||||
register const guchar *cb_src = src[1];
|
||||
register const guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint y_incr = incr_src[0], cb_incr = incr_src[1], cr_incr = incr_src[2];
|
||||
|
||||
while (count-- > 0)
|
||||
|
@ -920,16 +933,16 @@ compose_ycbcr470f (guchar **src,
|
|||
|
||||
|
||||
static void
|
||||
compose_ycbcr709f (guchar **src,
|
||||
gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
compose_ycbcr709f (const guchar **src,
|
||||
const gint *incr_src,
|
||||
gint numpix,
|
||||
guchar *dst)
|
||||
{
|
||||
register guchar *y_src = src[0];
|
||||
register guchar *cb_src = src[1];
|
||||
register guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
register const guchar *y_src = src[0];
|
||||
register const guchar *cb_src = src[1];
|
||||
register const guchar *cr_src = src[2];
|
||||
register guchar *rgb_dst = dst;
|
||||
register gint count = numpix;
|
||||
gint y_incr = incr_src[0], cb_incr = incr_src[1], cr_incr = incr_src[2];
|
||||
|
||||
while (count-- > 0)
|
||||
|
@ -958,8 +971,8 @@ compose_ycbcr709f (guchar **src,
|
|||
|
||||
|
||||
static gboolean
|
||||
compose_dialog (gchar *compose_type,
|
||||
gint32 drawable_ID)
|
||||
compose_dialog (const gchar *compose_type,
|
||||
gint32 drawable_ID)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *toggle;
|
||||
|
|
|
@ -51,11 +51,11 @@ static char ident[] = "@(#) GIMP Decompose plug-in v1.01 19-Mar-99";
|
|||
/* 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 decompose (gint32 image_id,
|
||||
gint32 drawable_ID,
|
||||
|
@ -173,8 +173,8 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint extract_flag[NUM_EXTRACT_TYPES];
|
||||
gint run;
|
||||
gint extract_flag[NUM_EXTRACT_TYPES];
|
||||
gboolean run;
|
||||
} DecoInterface;
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
|
@ -235,11 +235,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[MAX_EXTRACT_IMAGES+1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -45,11 +45,11 @@ 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 deinterlace (GimpDrawable *drawable);
|
||||
|
||||
|
@ -96,11 +96,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;
|
||||
|
|
|
@ -75,7 +75,7 @@ typedef struct _DepthMergeInterface
|
|||
guchar *previewDepthMap1;
|
||||
guchar *previewDepthMap2;
|
||||
|
||||
gint run;
|
||||
gboolean run;
|
||||
} DepthMergeInterface;
|
||||
|
||||
typedef struct _DepthMergeParams
|
||||
|
@ -154,11 +154,11 @@ void util_convertColorspace (guchar *dest,
|
|||
/* ----- plug-in entry points ----- */
|
||||
|
||||
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 =
|
||||
{
|
||||
|
@ -207,11 +207,11 @@ query (void)
|
|||
}
|
||||
|
||||
static void
|
||||
run (gchar *name,
|
||||
gint numParams,
|
||||
GimpParam *param,
|
||||
gint *numReturnVals,
|
||||
GimpParam **returnVals)
|
||||
run (const gchar *name,
|
||||
gint numParams,
|
||||
const GimpParam *param,
|
||||
gint *numReturnVals,
|
||||
GimpParam **returnVals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpRunMode runMode;
|
||||
|
|
|
@ -85,11 +85,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 void despeckle (void);
|
||||
|
||||
|
@ -140,7 +140,7 @@ gint sel_width, /* Selection width */
|
|||
sel_height; /* Selection height */
|
||||
gint img_bpp; /* Bytes-per-pixel in image */
|
||||
|
||||
gint run_filter = FALSE; /* True if we should run the filter */
|
||||
gboolean run_filter = FALSE; /* True if we should run the filter */
|
||||
|
||||
gint despeckle_vals[4] =
|
||||
{
|
||||
|
@ -196,15 +196,15 @@ query (void)
|
|||
*/
|
||||
|
||||
static void
|
||||
run (gchar *name, /* I - Name of filter program. */
|
||||
gint nparams, /* I - Number of parameters passed in */
|
||||
GimpParam *param, /* I - Parameter values */
|
||||
gint *nreturn_vals, /* O - Number of return values */
|
||||
GimpParam **return_vals) /* O - Return values */
|
||||
run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
GimpRunMode run_mode; /* Current run mode */
|
||||
GimpPDBStatusType status; /* Return status */
|
||||
GimpParam *values; /* Return values */
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status;
|
||||
GimpParam *values;
|
||||
|
||||
INIT_I18N ();
|
||||
|
||||
|
|
|
@ -71,24 +71,24 @@
|
|||
* Local functions...
|
||||
*/
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static void destripe (void);
|
||||
static void destripe (void);
|
||||
|
||||
static gint destripe_dialog (void);
|
||||
static gint destripe_dialog (void);
|
||||
static void dialog_histogram_callback (GtkWidget *, gpointer);
|
||||
static void dialog_iscale_update (GtkAdjustment *, gint *);
|
||||
static void dialog_ok_callback (GtkWidget *, gpointer);
|
||||
static void dialog_iscale_update (GtkAdjustment *, gint *);
|
||||
static void dialog_ok_callback (GtkWidget *, gpointer);
|
||||
|
||||
static void preview_init (void);
|
||||
static void preview_exit (void);
|
||||
static void preview_update (void);
|
||||
static void preview_scroll_callback (void);
|
||||
static void preview_init (void);
|
||||
static void preview_exit (void);
|
||||
static void preview_update (void);
|
||||
static void preview_scroll_callback (void);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -103,26 +103,26 @@ GimpPlugInInfo PLUG_IN_INFO =
|
|||
run /* run_proc */
|
||||
};
|
||||
|
||||
GtkWidget *preview; /* Preview widget */
|
||||
gint preview_width, /* Width of preview widget */
|
||||
preview_height, /* Height of preview widget */
|
||||
preview_x1, /* Upper-left X of preview */
|
||||
preview_y1, /* Upper-left Y of preview */
|
||||
preview_x2, /* Lower-right X of preview */
|
||||
preview_y2; /* Lower-right Y of preview */
|
||||
GtkObject *hscroll_data, /* Horizontal scrollbar data */
|
||||
*vscroll_data; /* Vertical scrollbar data */
|
||||
GtkWidget *preview; /* Preview widget */
|
||||
gint preview_width, /* Width of preview widget */
|
||||
preview_height, /* Height of preview widget */
|
||||
preview_x1, /* Upper-left X of preview */
|
||||
preview_y1, /* Upper-left Y of preview */
|
||||
preview_x2, /* Lower-right X of preview */
|
||||
preview_y2; /* Lower-right Y of preview */
|
||||
GtkObject *hscroll_data, /* Horizontal scrollbar data */
|
||||
*vscroll_data; /* Vertical scrollbar data */
|
||||
|
||||
GimpDrawable *drawable = NULL; /* Current image */
|
||||
gint sel_x1, /* Selection bounds */
|
||||
sel_y1,
|
||||
sel_x2,
|
||||
sel_y2;
|
||||
gint histogram = FALSE;
|
||||
gint img_bpp; /* Bytes-per-pixel in image */
|
||||
gint run_filter = FALSE; /* True if we should run the filter */
|
||||
GimpDrawable *drawable = NULL; /* Current image */
|
||||
gint sel_x1, /* Selection bounds */
|
||||
sel_y1,
|
||||
sel_x2,
|
||||
sel_y2;
|
||||
gint histogram = FALSE;
|
||||
gint img_bpp; /* Bytes-per-pixel in image */
|
||||
gboolean run_filter = FALSE; /* True if we should run the filter */
|
||||
|
||||
gint avg_width = 36;
|
||||
gint avg_width = 36;
|
||||
|
||||
|
||||
MAIN ()
|
||||
|
@ -130,7 +130,7 @@ MAIN ()
|
|||
static void
|
||||
query (void)
|
||||
{
|
||||
static GimpParamDef args[] =
|
||||
static GimpParamDef args[] =
|
||||
{
|
||||
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
|
||||
{ GIMP_PDB_IMAGE, "image", "Input image" },
|
||||
|
@ -139,26 +139,26 @@ query (void)
|
|||
};
|
||||
|
||||
gimp_install_procedure (PLUG_IN_NAME,
|
||||
"Destripe filter, used to remove vertical stripes "
|
||||
"caused by cheap scanners.",
|
||||
"This plug-in tries to remove vertical stripes from "
|
||||
"an image.",
|
||||
"Marc Lehmann <pcg@goof.com>",
|
||||
"Marc Lehmann <pcg@goof.com>",
|
||||
PLUG_IN_VERSION,
|
||||
N_("<Image>/Filters/Enhance/Destripe..."),
|
||||
"RGB*, GRAY*",
|
||||
GIMP_PLUGIN,
|
||||
G_N_ELEMENTS (args), 0,
|
||||
args, NULL);
|
||||
"Destripe filter, used to remove vertical stripes "
|
||||
"caused by cheap scanners.",
|
||||
"This plug-in tries to remove vertical stripes from "
|
||||
"an image.",
|
||||
"Marc Lehmann <pcg@goof.com>",
|
||||
"Marc Lehmann <pcg@goof.com>",
|
||||
PLUG_IN_VERSION,
|
||||
N_("<Image>/Filters/Enhance/Destripe..."),
|
||||
"RGB*, GRAY*",
|
||||
GIMP_PLUGIN,
|
||||
G_N_ELEMENTS (args), 0,
|
||||
args, NULL);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
GimpRunMode run_mode; /* Current run mode */
|
||||
GimpPDBStatusType status; /* Return status */
|
||||
|
@ -186,7 +186,7 @@ run (gchar *name,
|
|||
drawable = gimp_drawable_get (param[2].data.d_drawable);
|
||||
|
||||
gimp_drawable_mask_bounds (drawable->drawable_id,
|
||||
&sel_x1, &sel_y1, &sel_x2, &sel_y2);
|
||||
&sel_x1, &sel_y1, &sel_x2, &sel_y2);
|
||||
|
||||
img_bpp = gimp_drawable_bpp (drawable->drawable_id);
|
||||
|
||||
|
@ -206,7 +206,7 @@ run (gchar *name,
|
|||
* Get information from the dialog...
|
||||
*/
|
||||
if (!destripe_dialog ())
|
||||
return;
|
||||
return;
|
||||
break;
|
||||
|
||||
case GIMP_RUN_NONINTERACTIVE:
|
||||
|
@ -214,9 +214,9 @@ run (gchar *name,
|
|||
* Make sure all the arguments are present...
|
||||
*/
|
||||
if (nparams != 4)
|
||||
status = GIMP_PDB_CALLING_ERROR;
|
||||
status = GIMP_PDB_CALLING_ERROR;
|
||||
else
|
||||
avg_width = param[3].data.d_int32;
|
||||
avg_width = param[3].data.d_int32;
|
||||
break;
|
||||
|
||||
case GIMP_RUN_WITH_LAST_VALS :
|
||||
|
@ -238,33 +238,33 @@ run (gchar *name,
|
|||
if (status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
if ((gimp_drawable_is_rgb (drawable->drawable_id) ||
|
||||
gimp_drawable_is_gray (drawable->drawable_id)))
|
||||
{
|
||||
/*
|
||||
* Set the tile cache size...
|
||||
*/
|
||||
gimp_tile_cache_ntiles ((drawable->width + gimp_tile_width () - 1) /
|
||||
gimp_tile_width ());
|
||||
gimp_drawable_is_gray (drawable->drawable_id)))
|
||||
{
|
||||
/*
|
||||
* Set the tile cache size...
|
||||
*/
|
||||
gimp_tile_cache_ntiles ((drawable->width + gimp_tile_width () - 1) /
|
||||
gimp_tile_width ());
|
||||
|
||||
/*
|
||||
* Run!
|
||||
*/
|
||||
destripe ();
|
||||
/*
|
||||
* Run!
|
||||
*/
|
||||
destripe ();
|
||||
|
||||
/*
|
||||
* If run mode is interactive, flush displays...
|
||||
*/
|
||||
if (run_mode != GIMP_RUN_NONINTERACTIVE)
|
||||
gimp_displays_flush();
|
||||
/*
|
||||
* If run mode is interactive, flush displays...
|
||||
*/
|
||||
if (run_mode != GIMP_RUN_NONINTERACTIVE)
|
||||
gimp_displays_flush();
|
||||
|
||||
/*
|
||||
* Store data...
|
||||
*/
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE)
|
||||
gimp_set_data (PLUG_IN_NAME, &avg_width, sizeof(avg_width));
|
||||
}
|
||||
/*
|
||||
* Store data...
|
||||
*/
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE)
|
||||
gimp_set_data (PLUG_IN_NAME, &avg_width, sizeof(avg_width));
|
||||
}
|
||||
else
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -280,9 +280,9 @@ run (gchar *name,
|
|||
|
||||
static inline void
|
||||
preview_draw_row (gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
guchar *row)
|
||||
gint y,
|
||||
gint w,
|
||||
guchar *row)
|
||||
{
|
||||
guchar *rgb = g_new (guchar, w * 3);
|
||||
guchar *rgb_ptr;
|
||||
|
@ -293,7 +293,7 @@ preview_draw_row (gint x,
|
|||
case 1:
|
||||
case 2:
|
||||
for (i = 0, rgb_ptr = rgb; i < w; i++, row += img_bpp, rgb_ptr += 3)
|
||||
rgb_ptr[0] = rgb_ptr[1] = rgb_ptr[2] = *row;
|
||||
rgb_ptr[0] = rgb_ptr[1] = rgb_ptr[2] = *row;
|
||||
|
||||
gtk_preview_draw_row (GTK_PREVIEW (preview), rgb, x, y, w);
|
||||
break;
|
||||
|
@ -304,11 +304,11 @@ preview_draw_row (gint x,
|
|||
|
||||
case 4:
|
||||
for (i = 0, rgb_ptr = rgb; i < w; i++, row += 4, rgb_ptr += 3)
|
||||
{
|
||||
rgb_ptr[0] = row[0];
|
||||
{
|
||||
rgb_ptr[0] = row[0];
|
||||
rgb_ptr[1] = row[1];
|
||||
rgb_ptr[2] = row[2];
|
||||
}
|
||||
}
|
||||
|
||||
gtk_preview_draw_row (GTK_PREVIEW (preview), rgb, x, y, w);
|
||||
break;
|
||||
|
@ -319,18 +319,18 @@ preview_draw_row (gint x,
|
|||
|
||||
static void
|
||||
destripe_rect (gint sel_x1,
|
||||
gint sel_y1,
|
||||
gint sel_x2,
|
||||
gint sel_y2,
|
||||
gboolean do_preview)
|
||||
gint sel_y1,
|
||||
gint sel_x2,
|
||||
gint sel_y2,
|
||||
gboolean do_preview)
|
||||
{
|
||||
GimpPixelRgn src_rgn; /* source image region */
|
||||
GimpPixelRgn dst_rgn; /* destination image region */
|
||||
guchar *src_rows; /* image data */
|
||||
GimpPixelRgn src_rgn; /* source image region */
|
||||
GimpPixelRgn dst_rgn; /* destination image region */
|
||||
guchar *src_rows; /* image data */
|
||||
double progress, progress_inc;
|
||||
int sel_width = sel_x2 - sel_x1;
|
||||
int sel_height = sel_y2 - sel_y1;
|
||||
long *hist, *corr; /* "histogram" data */
|
||||
long *hist, *corr; /* "histogram" data */
|
||||
int tile_width = gimp_tile_width ();
|
||||
int i, x, y, ox, cols;
|
||||
|
||||
|
@ -356,9 +356,9 @@ destripe_rect (gint sel_x1,
|
|||
*/
|
||||
|
||||
gimp_pixel_rgn_init (&src_rgn, drawable,
|
||||
sel_x1, sel_y1, sel_width, sel_height, FALSE, FALSE);
|
||||
sel_x1, sel_y1, sel_width, sel_height, FALSE, FALSE);
|
||||
gimp_pixel_rgn_init (&dst_rgn, drawable,
|
||||
sel_x1, sel_y1, sel_width, sel_height, TRUE, TRUE);
|
||||
sel_x1, sel_y1, sel_width, sel_height, TRUE, TRUE);
|
||||
|
||||
hist = g_new (long, sel_width * img_bpp);
|
||||
corr = g_new (long, sel_width * img_bpp);
|
||||
|
@ -411,17 +411,17 @@ destripe_rect (gint sel_x1,
|
|||
for (x = -extend; x < sel_width * img_bpp; x += img_bpp)
|
||||
{
|
||||
if (x + extend < sel_width * img_bpp)
|
||||
{
|
||||
sum += h[ extend]; cnt++;
|
||||
}
|
||||
{
|
||||
sum += h[ extend]; cnt++;
|
||||
}
|
||||
if (x - extend >= 0)
|
||||
{
|
||||
sum -= h[-extend]; cnt--;
|
||||
}
|
||||
{
|
||||
sum -= h[-extend]; cnt--;
|
||||
}
|
||||
if (x >= 0)
|
||||
{
|
||||
*c = ((sum / cnt - *h) << 10) / *h;
|
||||
}
|
||||
{
|
||||
*c = ((sum / cnt - *h) << 10) / *h;
|
||||
}
|
||||
|
||||
h += img_bpp;
|
||||
c += img_bpp;
|
||||
|
@ -493,7 +493,7 @@ destripe_rect (gint sel_x1,
|
|||
if (!do_preview)
|
||||
{
|
||||
gimp_pixel_rgn_set_rect (&dst_rgn, src_rows,
|
||||
ox, sel_y1, cols, sel_height);
|
||||
ox, sel_y1, cols, sel_height);
|
||||
gimp_progress_update (progress += progress_inc);
|
||||
}
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ destripe_rect (gint sel_x1,
|
|||
gimp_drawable_flush (drawable);
|
||||
gimp_drawable_merge_shadow (drawable->drawable_id, TRUE);
|
||||
gimp_drawable_update (drawable->drawable_id,
|
||||
sel_x1, sel_y1, sel_width, sel_height);
|
||||
sel_x1, sel_y1, sel_width, sel_height);
|
||||
}
|
||||
g_free (hist);
|
||||
g_free (corr);
|
||||
|
@ -546,16 +546,16 @@ destripe_dialog (void)
|
|||
gimp_ui_init ("destripe", TRUE);
|
||||
|
||||
dialog = gimp_dialog_new (_("Destripe"), "destripe",
|
||||
gimp_standard_help_func, "filters/destripe.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
gimp_standard_help_func, "filters/destripe.html",
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
GTK_STOCK_OK, dialog_ok_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
GTK_STOCK_OK, dialog_ok_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
NULL);
|
||||
NULL);
|
||||
|
||||
g_signal_connect (dialog, "destroy",
|
||||
G_CALLBACK (gtk_main_quit),
|
||||
|
@ -568,7 +568,7 @@ destripe_dialog (void)
|
|||
vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/*
|
||||
|
@ -591,7 +591,7 @@ destripe_dialog (void)
|
|||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_table_attach(GTK_TABLE(ptable), frame, 0, 1, 0, 1,
|
||||
0, 0, 0, 0);
|
||||
0, 0, 0, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
preview_width = MIN (sel_x2 - sel_x1, PREVIEW_SIZE);
|
||||
|
@ -603,8 +603,8 @@ destripe_dialog (void)
|
|||
gtk_widget_show (preview);
|
||||
|
||||
hscroll_data = gtk_adjustment_new (0, 0, sel_x2 - sel_x1 - 1, 1.0,
|
||||
MIN (preview_width, sel_x2 - sel_x1),
|
||||
MIN (preview_width, sel_x2 - sel_x1));
|
||||
MIN (preview_width, sel_x2 - sel_x1),
|
||||
MIN (preview_width, sel_x2 - sel_x1));
|
||||
|
||||
g_signal_connect (hscroll_data, "value_changed",
|
||||
G_CALLBACK (preview_scroll_callback),
|
||||
|
@ -613,12 +613,12 @@ destripe_dialog (void)
|
|||
scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (hscroll_data));
|
||||
gtk_range_set_update_policy (GTK_RANGE (scrollbar), GTK_UPDATE_CONTINUOUS);
|
||||
gtk_table_attach (GTK_TABLE (ptable), scrollbar, 0, 1, 1, 2,
|
||||
GTK_FILL, 0, 0, 0);
|
||||
GTK_FILL, 0, 0, 0);
|
||||
gtk_widget_show (scrollbar);
|
||||
|
||||
vscroll_data = gtk_adjustment_new (0, 0, sel_y2 - sel_y1 - 1, 1.0,
|
||||
MIN (preview_height, sel_y2 - sel_y1),
|
||||
MIN (preview_height, sel_y2 - sel_y1));
|
||||
MIN (preview_height, sel_y2 - sel_y1),
|
||||
MIN (preview_height, sel_y2 - sel_y1));
|
||||
|
||||
g_signal_connect (vscroll_data, "value_changed",
|
||||
G_CALLBACK (preview_scroll_callback),
|
||||
|
@ -627,7 +627,7 @@ destripe_dialog (void)
|
|||
scrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (vscroll_data));
|
||||
gtk_range_set_update_policy (GTK_RANGE (scrollbar), GTK_UPDATE_CONTINUOUS);
|
||||
gtk_table_attach (GTK_TABLE (ptable), scrollbar, 1, 2, 0, 1, 0,
|
||||
GTK_FILL, 0, 0);
|
||||
GTK_FILL, 0, 0);
|
||||
gtk_widget_show (scrollbar);
|
||||
|
||||
preview_init ();
|
||||
|
@ -650,7 +650,7 @@ destripe_dialog (void)
|
|||
button = gtk_check_button_new_with_mnemonic (_("Create _Histogram"));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 3, 0, 1);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
histogram ? TRUE : FALSE);
|
||||
histogram ? TRUE : FALSE);
|
||||
gtk_widget_show (button);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
|
@ -662,8 +662,8 @@ destripe_dialog (void)
|
|||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
|
||||
(filter_type & FILTER_RECURSIVE) ? TRUE : FALSE);
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (dialog_recursive_callback),
|
||||
NULL);
|
||||
G_CALLBACK (dialog_recursive_callback),
|
||||
NULL);
|
||||
gtk_widget_show (button);*/
|
||||
|
||||
/*
|
||||
|
@ -671,10 +671,10 @@ destripe_dialog (void)
|
|||
*/
|
||||
|
||||
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
|
||||
_("_Width:"), SCALE_WIDTH, 0,
|
||||
avg_width, 2, MAX_AVG, 1, 10, 0,
|
||||
TRUE, 0, 0,
|
||||
NULL, NULL);
|
||||
_("_Width:"), SCALE_WIDTH, 0,
|
||||
avg_width, 2, MAX_AVG, 1, 10, 0,
|
||||
TRUE, 0, 0,
|
||||
NULL, NULL);
|
||||
g_signal_connect (adj, "value_changed",
|
||||
G_CALLBACK (dialog_iscale_update),
|
||||
&avg_width);
|
||||
|
@ -735,7 +735,7 @@ preview_exit (void)
|
|||
|
||||
static void
|
||||
dialog_histogram_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
histogram = !histogram;
|
||||
preview_update ();
|
||||
|
@ -752,7 +752,7 @@ dialog_iscale_update (GtkAdjustment *adjustment,
|
|||
|
||||
static void
|
||||
dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
run_filter = TRUE;
|
||||
|
||||
|
|
|
@ -78,18 +78,18 @@ typedef struct
|
|||
GtkWidget *progress;
|
||||
guchar preview_row[PREVIEW_WIDTH * 3];
|
||||
|
||||
gint run;
|
||||
gboolean run;
|
||||
} diffraction_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 diffraction (GimpDrawable *drawable);
|
||||
|
||||
|
@ -194,17 +194,17 @@ 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 *active_drawable;
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status;
|
||||
GimpDrawable *active_drawable;
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status;
|
||||
|
||||
/* Initialize */
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} DisplaceInterface;
|
||||
|
||||
/*
|
||||
|
@ -79,11 +79,11 @@ typedef struct
|
|||
*/
|
||||
|
||||
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 displace (GimpDrawable *drawable);
|
||||
static gint displace_dialog (GimpDrawable *drawable);
|
||||
|
@ -168,11 +168,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;
|
||||
|
|
|
@ -57,11 +57,11 @@ FP_Params Current =
|
|||
GimpDrawable *drawable, *mask;
|
||||
|
||||
void query (void);
|
||||
void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -99,11 +99,11 @@ query (void)
|
|||
/********************************STANDARD RUN*************************/
|
||||
|
||||
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)
|
||||
{
|
||||
GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -73,14 +73,14 @@ static GimpRunMode run_mode;
|
|||
/* Declare a local function.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static void gradmap (GimpDrawable *drawable);
|
||||
static guchar * get_samples (GimpDrawable *drawable );
|
||||
static void gradmap (GimpDrawable *drawable);
|
||||
static guchar * get_samples (GimpDrawable *drawable );
|
||||
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
|
@ -126,11 +126,11 @@ query()
|
|||
}
|
||||
|
||||
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;
|
||||
|
@ -179,7 +179,10 @@ typedef struct {
|
|||
} GradMapParam_t;
|
||||
|
||||
static void
|
||||
gradmap_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
gradmap_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
GradMapParam_t *param = (GradMapParam_t*) data;
|
||||
gint lum;
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
#define SHORT_NAME "max_rgb"
|
||||
|
||||
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 main_function (GimpDrawable *drawable,
|
||||
gboolean preview_mode);
|
||||
|
@ -75,12 +75,12 @@ enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint max_p;
|
||||
gint max_p;
|
||||
} ValueType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} Interface;
|
||||
|
||||
static ValueType pvals =
|
||||
|
@ -126,11 +126,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;
|
||||
static GimpParam values[1];
|
||||
|
@ -186,7 +186,10 @@ typedef struct {
|
|||
} MaxRgbParam_t;
|
||||
|
||||
static void
|
||||
max_rgb_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
max_rgb_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
MaxRgbParam_t *param = (MaxRgbParam_t*) data;
|
||||
gint ch, max_ch = 0;
|
||||
|
|
|
@ -95,18 +95,18 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} MosaicInterface;
|
||||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void mosaic (GimpDrawable *drawable);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void mosaic (GimpDrawable *drawable);
|
||||
|
||||
/* user interface functions */
|
||||
static gint mosaic_dialog (void);
|
||||
|
@ -330,11 +330,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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -59,20 +59,20 @@ typedef struct
|
|||
{
|
||||
gint channels;
|
||||
GtkObject *channel_adj[4];
|
||||
gint run;
|
||||
gboolean run;
|
||||
} NoisifyInterface;
|
||||
|
||||
/* 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 noisify (GimpDrawable *drawable,
|
||||
gboolean preview_mode);
|
||||
static void noisify (GimpDrawable *drawable,
|
||||
gboolean preview_mode);
|
||||
static gdouble gauss (GRand *gr);
|
||||
|
||||
static gint noisify_dialog (GimpDrawable *drawable,
|
||||
|
@ -137,11 +137,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;
|
||||
|
@ -229,7 +229,10 @@ run (gchar *name,
|
|||
}
|
||||
|
||||
static void
|
||||
noisify_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
noisify_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
GRand *gr = (GRand*) data;
|
||||
gint noise = 0, b;
|
||||
|
@ -258,7 +261,7 @@ noisify_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
|||
|
||||
static void
|
||||
noisify (GimpDrawable *drawable,
|
||||
gboolean preview_mode)
|
||||
gboolean preview_mode)
|
||||
{
|
||||
GRand *gr;
|
||||
|
||||
|
|
|
@ -40,14 +40,14 @@
|
|||
/* 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 normalize (GimpDrawable *drawable);
|
||||
static void indexed_normalize (gint32 image_ID);
|
||||
static void normalize (GimpDrawable *drawable);
|
||||
static void indexed_normalize (gint32 image_ID);
|
||||
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
|
@ -95,11 +95,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;
|
||||
|
@ -195,10 +195,12 @@ typedef struct {
|
|||
} NormalizeParam_t;
|
||||
|
||||
static void
|
||||
find_min_max (guchar *src, gint bpp, gpointer data)
|
||||
find_min_max (const guchar *src,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
NormalizeParam_t *param = (NormalizeParam_t*) data;
|
||||
gint b;
|
||||
gint b;
|
||||
|
||||
for (b = 0; b < param->alpha; b++)
|
||||
{
|
||||
|
@ -213,10 +215,13 @@ find_min_max (guchar *src, gint bpp, gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
normalize_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
normalize_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
NormalizeParam_t *param = (NormalizeParam_t*) data;
|
||||
gint b;
|
||||
gint b;
|
||||
|
||||
for (b = 0; b < param->alpha; b++)
|
||||
dest[b] = param->lut[src[b]];
|
||||
|
|
|
@ -55,11 +55,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);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -94,11 +94,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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -203,11 +203,11 @@ static gint g_show_progress = FALSE;
|
|||
/* Declare a local function.
|
||||
*/
|
||||
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 p_main_colorize(gint);
|
||||
static void p_get_filevalues (void);
|
||||
|
@ -224,7 +224,9 @@ static void p_get_pixel(t_GDRW *gdrw, gint32 x, gint32 y, guchar *pixel);
|
|||
static void p_init_gdrw(t_GDRW *gdrw, GimpDrawable *drawable, gint dirty, gint shadow);
|
||||
static void p_end_gdrw(t_GDRW *gdrw);
|
||||
static gint32 p_is_layer_alive(gint32 drawable_id);
|
||||
static void p_remap_pixel(guchar *pixel, guchar *original, gint bpp2);
|
||||
static void p_remap_pixel (guchar *pixel,
|
||||
const guchar *original,
|
||||
gint bpp2);
|
||||
static void p_guess_missing_colors(void);
|
||||
static void p_fill_missing_colors(void);
|
||||
static void p_smp_get_colors_callback (GdkWindow *window, gpointer data);
|
||||
|
@ -310,11 +312,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 *dst_drawable;
|
||||
|
@ -2850,7 +2852,9 @@ p_rnd_remap(gint32 lum, guchar *mapped_color)
|
|||
} /* end p_rnd_remap */
|
||||
|
||||
static void
|
||||
p_remap_pixel(guchar *pixel, guchar *original, gint bpp2)
|
||||
p_remap_pixel (guchar *pixel,
|
||||
const guchar *original,
|
||||
gint bpp2)
|
||||
{
|
||||
guchar mapped_color[4];
|
||||
gint l_lum;
|
||||
|
@ -3048,7 +3052,10 @@ p_remap_pixel(guchar *pixel, guchar *original, gint bpp2)
|
|||
} /* end p_remap_pixel */
|
||||
|
||||
static void
|
||||
colorize_func(guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
colorize_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
gboolean has_alpha = GPOINTER_TO_INT (data);
|
||||
|
||||
|
@ -3057,11 +3064,11 @@ colorize_func(guchar *src, guchar *dest, gint bpp, gpointer data)
|
|||
bpp--;
|
||||
dest[bpp] = src[bpp];
|
||||
}
|
||||
p_remap_pixel(dest, src, bpp);
|
||||
p_remap_pixel (dest, src, bpp);
|
||||
}
|
||||
|
||||
static void
|
||||
p_colorize_drawable(gint32 drawable_id)
|
||||
p_colorize_drawable (gint32 drawable_id)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
gboolean has_alpha;
|
||||
|
@ -3081,7 +3088,7 @@ p_colorize_drawable(gint32 drawable_id)
|
|||
|
||||
/* colorize dst_drawable like sample_drawable */
|
||||
static int
|
||||
p_main_colorize(gint mc_flags)
|
||||
p_main_colorize (gint mc_flags)
|
||||
{
|
||||
GimpDrawable *dst_drawable;
|
||||
GimpDrawable *sample_drawable;
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
#define SHORT_NAME "scatter_hsv"
|
||||
|
||||
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 scatter_hsv (gint32 drawable_id);
|
||||
static void scatter_hsv_scatter (guchar *r,
|
||||
|
@ -104,7 +104,7 @@ static ValueType VALS =
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} Interface;
|
||||
|
||||
static Interface INTERFACE =
|
||||
|
@ -154,11 +154,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;
|
||||
|
@ -211,7 +211,10 @@ run (gchar *name,
|
|||
}
|
||||
|
||||
static void
|
||||
scatter_hsv_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
scatter_hsv_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
guchar h, s, v;
|
||||
|
||||
|
|
|
@ -32,14 +32,15 @@
|
|||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static void semiflatten (GimpDrawable *drawable);
|
||||
|
||||
static void semiflatten (GimpDrawable *drawable);
|
||||
|
||||
static guchar bgred, bggreen, bgblue;
|
||||
|
||||
|
@ -84,16 +85,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[1];
|
||||
GimpDrawable *drawable;
|
||||
gint32 image_ID;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
static GimpParam values[1];
|
||||
GimpDrawable *drawable;
|
||||
gint32 image_ID;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
@ -132,7 +133,10 @@ run (gchar *name,
|
|||
}
|
||||
|
||||
static void
|
||||
semiflatten_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
semiflatten_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
dest[0] = (src[0] * src[3]) / 255 + (bgred * (255 - src[3])) / 255;
|
||||
dest[1] = (src[1] * src[3]) / 255 + (bggreen * (255 - src[3])) / 255;
|
||||
|
|
|
@ -42,11 +42,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 GimpPDBStatusType threshold_alpha (gint32 drawable_id);
|
||||
|
||||
|
@ -77,7 +77,7 @@ static ValueType VALS =
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} Interface;
|
||||
|
||||
static Interface INTERFACE =
|
||||
|
@ -112,11 +112,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_SUCCESS;
|
||||
|
@ -184,7 +184,10 @@ run (gchar *name,
|
|||
}
|
||||
|
||||
static void
|
||||
threshold_alpha_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
threshold_alpha_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
gint gap;
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ typedef struct
|
|||
/* Declare some 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 load_image (gchar *filename);
|
||||
static gint32 load_image (const gchar *filename);
|
||||
|
||||
static void load_rgba (TIFF *tif,
|
||||
channel_data *channel);
|
||||
|
@ -135,10 +135,10 @@ static void read_default (guchar *source,
|
|||
gint extra,
|
||||
gint align);
|
||||
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image,
|
||||
gint32 drawable,
|
||||
gint32 orig_image);
|
||||
static gint save_image (const gchar *filename,
|
||||
gint32 image,
|
||||
gint32 drawable,
|
||||
gint32 orig_image);
|
||||
|
||||
static gint save_dialog (void);
|
||||
|
||||
|
@ -232,11 +232,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];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
@ -398,7 +398,7 @@ tiff_error(const char* module, const char* fmt, va_list ap)
|
|||
}
|
||||
|
||||
static gint32
|
||||
load_image (gchar *filename)
|
||||
load_image (const gchar *filename)
|
||||
{
|
||||
TIFF *tif;
|
||||
gushort bps, spp, photomet;
|
||||
|
@ -1337,10 +1337,10 @@ read_separate (guchar *source,
|
|||
*/
|
||||
|
||||
static gint
|
||||
save_image (gchar *filename,
|
||||
gint32 image,
|
||||
gint32 layer,
|
||||
gint32 orig_image) /* the export function might have created a duplicate */
|
||||
save_image (const gchar *filename,
|
||||
gint32 image,
|
||||
gint32 layer,
|
||||
gint32 orig_image) /* the export function might have created a duplicate */
|
||||
{
|
||||
TIFF *tif;
|
||||
gushort red[256];
|
||||
|
@ -1530,17 +1530,17 @@ save_image (gchar *filename,
|
|||
#ifdef TIFFTAG_ICCPROFILE
|
||||
{
|
||||
GimpParasite *parasite;
|
||||
uint32 profile_size;
|
||||
guchar *icc_profile;
|
||||
uint32 profile_size;
|
||||
const guchar *icc_profile;
|
||||
|
||||
parasite = gimp_image_parasite_find (orig_image, "icc-profile");
|
||||
if (parasite)
|
||||
{
|
||||
profile_size = gimp_parasite_data_size(parasite);
|
||||
icc_profile = gimp_parasite_data(parasite);
|
||||
profile_size = gimp_parasite_data_size (parasite);
|
||||
icc_profile = gimp_parasite_data (parasite);
|
||||
|
||||
TIFFSetField(tif, TIFFTAG_ICCPROFILE, profile_size, icc_profile);
|
||||
gimp_parasite_free(parasite);
|
||||
TIFFSetField (tif, TIFFTAG_ICCPROFILE, profile_size, icc_profile);
|
||||
gimp_parasite_free (parasite);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -33,18 +33,18 @@
|
|||
/* 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 vinvert (GimpDrawable *drawable);
|
||||
static void indexed_vinvert (gint32 image_ID);
|
||||
static void vinvert_render_row (guchar *src,
|
||||
guchar *dest,
|
||||
gint row_width,
|
||||
gint bpp);
|
||||
static void vinvert (GimpDrawable *drawable);
|
||||
static void indexed_vinvert (gint32 image_ID);
|
||||
static void vinvert_render_row (const guchar *src,
|
||||
guchar *dest,
|
||||
gint row_width,
|
||||
gint bpp);
|
||||
|
||||
|
||||
static GimpRunMode run_mode;
|
||||
|
@ -90,11 +90,11 @@ query ()
|
|||
}
|
||||
|
||||
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;
|
||||
|
@ -154,19 +154,20 @@ indexed_vinvert (gint32 image_ID)
|
|||
|
||||
cmap = gimp_image_get_cmap (image_ID, &ncols);
|
||||
|
||||
if (cmap == NULL)
|
||||
{
|
||||
g_print ("vinvert: cmap was NULL! Quitting...\n");
|
||||
gimp_quit ();
|
||||
}
|
||||
g_return_if_fail (cmap != NULL);
|
||||
|
||||
vinvert_render_row (cmap, cmap, ncols, 3);
|
||||
|
||||
gimp_image_set_cmap (image_ID, cmap, ncols);
|
||||
|
||||
g_free (cmap);
|
||||
}
|
||||
|
||||
static void
|
||||
vinvert_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
||||
vinvert_func (const guchar *src,
|
||||
guchar *dest,
|
||||
gint bpp,
|
||||
gpointer data)
|
||||
{
|
||||
gint v1, v2, v3;
|
||||
|
||||
|
@ -187,10 +188,10 @@ vinvert_func (guchar *src, guchar *dest, gint bpp, gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
vinvert_render_row (guchar *src,
|
||||
guchar *dest,
|
||||
gint row_width, /* in pixels */
|
||||
gint bpp)
|
||||
vinvert_render_row (const guchar *src,
|
||||
guchar *dest,
|
||||
gint row_width, /* in pixels */
|
||||
gint bpp)
|
||||
{
|
||||
while (row_width--)
|
||||
{
|
||||
|
|
|
@ -382,13 +382,10 @@ run (gchar *name,
|
|||
|
||||
if (parasite)
|
||||
{
|
||||
gpointer data;
|
||||
gint size;
|
||||
gint size = gimp_parasite_data_size (parasite);
|
||||
|
||||
data = gimp_parasite_data (parasite);
|
||||
size = gimp_parasite_data_size (parasite);
|
||||
|
||||
strncpy (xsvals.comment, data, MIN (size, MAX_COMMENT));
|
||||
strncpy (xsvals.comment,
|
||||
gimp_parasite_data (parasite), MIN (size, MAX_COMMENT));
|
||||
xsvals.comment[MIN (size, MAX_COMMENT) + 1] = 0;
|
||||
|
||||
gimp_parasite_free (parasite);
|
||||
|
@ -398,12 +395,9 @@ run (gchar *name,
|
|||
|
||||
if (parasite)
|
||||
{
|
||||
gpointer data;
|
||||
gint x, y;
|
||||
gint x, y;
|
||||
|
||||
data = gimp_parasite_data (parasite);
|
||||
|
||||
if (sscanf (data, "%i %i", &x, &y) == 2)
|
||||
if (sscanf (gimp_parasite_data (parasite), "%i %i", &x, &y) == 2)
|
||||
{
|
||||
xsvals.use_hot = TRUE;
|
||||
xsvals.x_hot = x;
|
||||
|
|
|
@ -55,11 +55,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);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -94,11 +94,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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -25,18 +25,18 @@
|
|||
#define __DBBROWSER_UTILS_H__
|
||||
|
||||
|
||||
typedef void (* GimpDBBrowserApplyCallback) (gchar *proc_name,
|
||||
gchar *scheme_proc_name,
|
||||
gchar *proc_blurb,
|
||||
gchar *proc_help,
|
||||
gchar *proc_author,
|
||||
gchar *proc_copyright,
|
||||
gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
GimpParamDef *params,
|
||||
GimpParamDef *return_vals);
|
||||
typedef void (* GimpDBBrowserApplyCallback) (const gchar *proc_name,
|
||||
const gchar *scheme_proc_name,
|
||||
const gchar *proc_blurb,
|
||||
const gchar *proc_help,
|
||||
const gchar *proc_author,
|
||||
const gchar *proc_copyright,
|
||||
const gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
const GimpParamDef *params,
|
||||
GimpParamDef *return_vals);
|
||||
|
||||
GtkWidget * gimp_db_browser (GimpDBBrowserApplyCallback apply_callback);
|
||||
|
||||
|
|
|
@ -25,18 +25,18 @@
|
|||
#define __DBBROWSER_UTILS_H__
|
||||
|
||||
|
||||
typedef void (* GimpDBBrowserApplyCallback) (gchar *proc_name,
|
||||
gchar *scheme_proc_name,
|
||||
gchar *proc_blurb,
|
||||
gchar *proc_help,
|
||||
gchar *proc_author,
|
||||
gchar *proc_copyright,
|
||||
gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
GimpParamDef *params,
|
||||
GimpParamDef *return_vals);
|
||||
typedef void (* GimpDBBrowserApplyCallback) (const gchar *proc_name,
|
||||
const gchar *scheme_proc_name,
|
||||
const gchar *proc_blurb,
|
||||
const gchar *proc_help,
|
||||
const gchar *proc_author,
|
||||
const gchar *proc_copyright,
|
||||
const gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
const GimpParamDef *params,
|
||||
GimpParamDef *return_vals);
|
||||
|
||||
GtkWidget * gimp_db_browser (GimpDBBrowserApplyCallback apply_callback);
|
||||
|
||||
|
|
|
@ -55,11 +55,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);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -94,11 +94,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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -61,23 +61,23 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} FITSLoadInterface;
|
||||
|
||||
|
||||
/* Declare some 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 load_image (gchar *filename);
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
static gint32 load_image (const gchar *filename);
|
||||
static gint save_image (const gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static FITS_HDU_LIST *create_fits_header (FITS_FILE *ofp,
|
||||
guint width, guint height, guint bpp);
|
||||
|
@ -88,22 +88,22 @@ static gint save_direct (FITS_FILE *ofp,
|
|||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gint32 create_new_image (gchar *filename,
|
||||
guint pagenum,
|
||||
guint width,
|
||||
guint height,
|
||||
GimpImageBaseType itype,
|
||||
GimpImageType dtype,
|
||||
gint32 *layer_ID,
|
||||
GimpDrawable **drawable,
|
||||
static gint32 create_new_image (const gchar *filename,
|
||||
guint pagenum,
|
||||
guint width,
|
||||
guint height,
|
||||
GimpImageBaseType itype,
|
||||
GimpImageType dtype,
|
||||
gint32 *layer_ID,
|
||||
GimpDrawable **drawable,
|
||||
GimpPixelRgn *pixel_rgn);
|
||||
|
||||
static void check_load_vals (void);
|
||||
|
||||
static gint32 load_fits (gchar *filename,
|
||||
FITS_FILE *ifp,
|
||||
guint picnum,
|
||||
guint ncompose);
|
||||
static gint32 load_fits (const gchar *filename,
|
||||
FITS_FILE *ifp,
|
||||
guint picnum,
|
||||
guint ncompose);
|
||||
|
||||
|
||||
static gint load_dialog (void);
|
||||
|
@ -199,11 +199,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;
|
||||
|
@ -333,7 +333,7 @@ run (gchar *name,
|
|||
|
||||
|
||||
static gint32
|
||||
load_image (gchar *filename)
|
||||
load_image (const gchar *filename)
|
||||
{
|
||||
gint32 image_ID, *image_list, *nl;
|
||||
guint picnum;
|
||||
|
@ -424,9 +424,9 @@ load_image (gchar *filename)
|
|||
|
||||
|
||||
static gint
|
||||
save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
save_image (const gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
{
|
||||
FITS_FILE* ofp;
|
||||
GimpImageType drawable_type;
|
||||
|
@ -491,18 +491,18 @@ check_load_vals (void)
|
|||
|
||||
/* Create an image. Sets layer_ID, drawable and rgn. Returns image_ID */
|
||||
static gint32
|
||||
create_new_image (gchar *filename,
|
||||
guint pagenum,
|
||||
guint width,
|
||||
guint height,
|
||||
GimpImageBaseType itype,
|
||||
GimpImageType dtype,
|
||||
gint32 *layer_ID,
|
||||
GimpDrawable **drawable,
|
||||
GimpPixelRgn *pixel_rgn)
|
||||
create_new_image (const gchar *filename,
|
||||
guint pagenum,
|
||||
guint width,
|
||||
guint height,
|
||||
GimpImageBaseType itype,
|
||||
GimpImageType dtype,
|
||||
gint32 *layer_ID,
|
||||
GimpDrawable **drawable,
|
||||
GimpPixelRgn *pixel_rgn)
|
||||
{
|
||||
gint32 image_ID;
|
||||
char *tmp;
|
||||
char *tmp;
|
||||
|
||||
image_ID = gimp_image_new (width, height, itype);
|
||||
if ((tmp = g_malloc (strlen (filename) + 64)) != NULL)
|
||||
|
@ -530,10 +530,10 @@ create_new_image (gchar *filename,
|
|||
/* to be composed together. This will result in different GIMP image types: */
|
||||
/* 1: GRAY, 2: GRAYA, 3: RGB, 4: RGBA */
|
||||
static gint32
|
||||
load_fits (gchar *filename,
|
||||
FITS_FILE *ifp,
|
||||
guint picnum,
|
||||
guint ncompose)
|
||||
load_fits (const gchar *filename,
|
||||
FITS_FILE *ifp,
|
||||
guint picnum,
|
||||
guint ncompose)
|
||||
{
|
||||
register guchar *dest, *src;
|
||||
guchar *data, *data_end, *linebuf;
|
||||
|
|
|
@ -479,7 +479,7 @@ static void fits_drop_error (void)
|
|||
/* #END-PAR */
|
||||
/*****************************************************************************/
|
||||
|
||||
FITS_FILE *fits_open (char *filename, char *openmode)
|
||||
FITS_FILE *fits_open (const char *filename, const char *openmode)
|
||||
|
||||
{int reading, writing, n_rec, n_hdr;
|
||||
long fpos_header, fpos_data;
|
||||
|
|
|
@ -133,7 +133,7 @@ typedef struct {
|
|||
|
||||
/* User callable functions of the FITS-library */
|
||||
|
||||
FITS_FILE *fits_open (char *filename, char *openmode);
|
||||
FITS_FILE *fits_open (const char *filename, const char *openmode);
|
||||
void fits_close (FITS_FILE *ff);
|
||||
FITS_HDU_LIST *fits_add_hdu (FITS_FILE *ff);
|
||||
int fits_add_card (FITS_HDU_LIST *hdulist, char *card);
|
||||
|
|
|
@ -57,22 +57,22 @@
|
|||
|
||||
/* Declare local functions. */
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void doit (GimpDrawable *drawable);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void doit (GimpDrawable *drawable);
|
||||
|
||||
static gint dialog (void);
|
||||
static void set_flame_preview (void);
|
||||
static void load_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void save_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void load_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void save_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void set_edit_preview (void);
|
||||
static void menu_cb (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void menu_cb (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void init_mutants (void);
|
||||
|
||||
#define BUFFER_SIZE 10000
|
||||
|
@ -181,11 +181,11 @@ maybe_init_cp (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 = NULL;
|
||||
|
|
|
@ -57,11 +57,11 @@ FP_Params Current =
|
|||
GimpDrawable *drawable, *mask;
|
||||
|
||||
void query (void);
|
||||
void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -99,11 +99,11 @@ query (void)
|
|||
/********************************STANDARD RUN*************************/
|
||||
|
||||
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)
|
||||
{
|
||||
GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -117,11 +117,11 @@ static gint tile_width, tile_height;
|
|||
static gint img_width, img_height, img_bpp, real_img_bpp;
|
||||
|
||||
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 gfig_dialog (void);
|
||||
static void gfig_ok_callback (GtkWidget *widget,
|
||||
|
@ -502,7 +502,7 @@ typedef struct BrushDesc
|
|||
guchar *pv_buf; /* Buffer where brush placed */
|
||||
gint16 x_off;
|
||||
gint16 y_off;
|
||||
gchar *popup;
|
||||
const gchar *popup;
|
||||
} BrushDesc;
|
||||
|
||||
|
||||
|
@ -662,11 +662,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)
|
||||
{
|
||||
GimpParam *values = g_new (GimpParam, 1);
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -381,7 +381,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} PluginInterface;
|
||||
|
||||
typedef void (* QueryFunc) (GtkWidget *,
|
||||
|
@ -393,11 +393,11 @@ typedef void (* QueryFunc) (GtkWidget *,
|
|||
**/
|
||||
|
||||
static void plugin_query (void);
|
||||
static void plugin_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void plugin_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static GFlare * gflare_new_with_default (const gchar *new_name);
|
||||
static GFlare * gflare_dup (const GFlare *src,
|
||||
|
@ -846,11 +846,11 @@ plugin_query (void)
|
|||
}
|
||||
|
||||
void
|
||||
plugin_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
plugin_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -68,30 +68,30 @@
|
|||
|
||||
|
||||
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);
|
||||
|
||||
/* return the image-ID of the new image, or -1 in case of an error */
|
||||
static gint32 load_image (gchar *filename,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame);
|
||||
static gint load_dialog (gchar *name);
|
||||
static gint32 load_image (const gchar *filename,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame);
|
||||
static gint load_dialog (const gchar *name);
|
||||
|
||||
/* return TRUE or FALSE */
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame);
|
||||
static gint save_dialog (gint32 image_id);
|
||||
static gint save_image (const gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame);
|
||||
static gint save_dialog (gint32 image_id);
|
||||
|
||||
/* return TRUE or FALSE */
|
||||
static gint get_info (gchar *filename,
|
||||
gint32 *width,
|
||||
gint32 *height,
|
||||
gint32 *frames);
|
||||
static gint get_info (const gchar *filename,
|
||||
gint32 *width,
|
||||
gint32 *height,
|
||||
gint32 *frames);
|
||||
|
||||
/*
|
||||
* GIMP interface
|
||||
|
@ -208,11 +208,11 @@ query (void)
|
|||
GimpParam values[5];
|
||||
|
||||
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)
|
||||
{
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpRunMode run_mode;
|
||||
|
@ -408,10 +408,10 @@ run (gchar *name,
|
|||
* Open FLI animation and return header-info
|
||||
*/
|
||||
gint
|
||||
get_info (gchar *filename,
|
||||
gint32 *width,
|
||||
gint32 *height,
|
||||
gint32 *frames)
|
||||
get_info (const gchar *filename,
|
||||
gint32 *width,
|
||||
gint32 *height,
|
||||
gint32 *frames)
|
||||
{
|
||||
FILE *file;
|
||||
s_fli_header fli_header;
|
||||
|
@ -438,9 +438,9 @@ get_info (gchar *filename,
|
|||
* load fli animation and store as framestack
|
||||
*/
|
||||
gint32
|
||||
load_image (gchar *filename,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame)
|
||||
load_image (const gchar *filename,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame)
|
||||
{
|
||||
FILE *file;
|
||||
gchar *name_buf;
|
||||
|
@ -573,10 +573,10 @@ load_image (gchar *filename,
|
|||
* (some code was taken from the GIF plugin.)
|
||||
*/
|
||||
gint
|
||||
save_image (gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame)
|
||||
save_image (const gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 from_frame,
|
||||
gint32 to_frame)
|
||||
{
|
||||
FILE *file;
|
||||
gchar *name_buf;
|
||||
|
@ -800,7 +800,7 @@ cb_ok (GtkWidget *widget,
|
|||
}
|
||||
|
||||
gint
|
||||
load_dialog (gchar *name)
|
||||
load_dialog (const gchar *name)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *table;
|
||||
|
@ -865,7 +865,6 @@ load_dialog (gchar *name)
|
|||
gtk_widget_show (dialog);
|
||||
|
||||
gtk_main ();
|
||||
gdk_flush ();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -14,12 +14,16 @@
|
|||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
static void query(void);
|
||||
static void gimpressionist_main(void);
|
||||
static void run(char *, int, GimpParam *, int *, GimpParam **);
|
||||
void repaint(ppm_t *p, ppm_t *a);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void gimpressionist_main (void);
|
||||
|
||||
int create_gimpressionist(void);
|
||||
void repaint (ppm_t *p, ppm_t *a);
|
||||
int create_gimpressionist (void);
|
||||
|
||||
gboolean img_has_alpha = FALSE;
|
||||
|
||||
|
@ -107,18 +111,18 @@ query(void)
|
|||
}
|
||||
|
||||
static void
|
||||
gimpressionist_get_data(char *name, void *ptr)
|
||||
gimpressionist_get_data (char *name, gpointer ptr)
|
||||
{
|
||||
pcvals = defaultpcvals;
|
||||
gimp_get_data(name, ptr);
|
||||
gimp_get_data (name, ptr);
|
||||
}
|
||||
|
||||
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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -96,11 +96,11 @@ static GtkTargetEntry help_dnd_target_table[] =
|
|||
/* GIMP plugin stuff */
|
||||
|
||||
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 =
|
||||
{
|
||||
|
@ -722,11 +722,11 @@ idle_load_page (gpointer data)
|
|||
}
|
||||
|
||||
static void
|
||||
run_temp_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
run_temp_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
@ -833,15 +833,15 @@ 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];
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
const gchar *env_root_dir = NULL;
|
||||
gchar *help_path = NULL;
|
||||
gchar *locale = NULL;
|
||||
|
|
|
@ -202,11 +202,11 @@ typedef struct
|
|||
/* 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);
|
||||
|
||||
/* user interface functions */
|
||||
static gint ifs_compose_dialog (GimpDrawable *drawable);
|
||||
|
@ -374,11 +374,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 *active_drawable;
|
||||
|
|
|
@ -89,13 +89,13 @@ static gboolean (*_button_press_func)(GtkWidget*, GdkEventButton*, gpointer);
|
|||
static gpointer _button_press_param;
|
||||
|
||||
/* Declare local functions. */
|
||||
static void query (void);
|
||||
static void run (char *name,
|
||||
int nparams,
|
||||
GimpParam * param,
|
||||
int *nreturn_vals,
|
||||
GimpParam ** return_vals);
|
||||
static gint dialog(GimpDrawable *drawable);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static gint dialog (GimpDrawable *drawable);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO = {
|
||||
NULL, /* init_proc */
|
||||
|
@ -133,11 +133,11 @@ static void query()
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -57,46 +57,54 @@
|
|||
|
||||
extern gint maze_dialog (void);
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void maze (GimpDrawable * drawable);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void maze (GimpDrawable *drawable);
|
||||
|
||||
static void mask_maze(gint32 selection_ID, guchar *maz, guint mw, guint mh,
|
||||
gint x1, gint x2, gint y1, gint y2, gint deadx, gint deady);
|
||||
static void mask_maze (gint32 selection_ID,
|
||||
guchar *maz,
|
||||
guint mw,
|
||||
guint mh,
|
||||
gint x1,
|
||||
gint x2,
|
||||
gint y1,
|
||||
gint y2,
|
||||
gint deadx,
|
||||
gint deady);
|
||||
|
||||
/* In algorithms.c */
|
||||
extern void mazegen(gint pos,
|
||||
guchar *maz,
|
||||
gint x,
|
||||
gint y,
|
||||
gint rnd);
|
||||
extern void mazegen_tileable(gint pos,
|
||||
guchar *maz,
|
||||
gint x,
|
||||
gint y,
|
||||
gint rnd);
|
||||
extern void prim(guint pos,
|
||||
guchar *maz,
|
||||
guint x,
|
||||
guint y);
|
||||
extern void prim_tileable(guchar *maz,
|
||||
guint x,
|
||||
guint y);
|
||||
extern void mazegen (gint pos,
|
||||
guchar *maz,
|
||||
gint x,
|
||||
gint y,
|
||||
gint rnd);
|
||||
extern void mazegen_tileable (gint pos,
|
||||
guchar *maz,
|
||||
gint x,
|
||||
gint y,
|
||||
gint rnd);
|
||||
extern void prim (guint pos,
|
||||
guchar *maz,
|
||||
guint x,
|
||||
guint y);
|
||||
extern void prim_tileable (guchar *maz,
|
||||
guint x,
|
||||
guint y);
|
||||
|
||||
/* In handy.c */
|
||||
extern void get_colors (GimpDrawable * drawable,
|
||||
guint8 *fg,
|
||||
guint8 *bg);
|
||||
extern void get_colors (GimpDrawable *drawable,
|
||||
guint8 *fg,
|
||||
guint8 *bg);
|
||||
|
||||
extern void drawbox (GimpPixelRgn *dest_rgn,
|
||||
guint x,
|
||||
guint y,
|
||||
guint w,
|
||||
guint h,
|
||||
guint8 clr[4]);
|
||||
extern void drawbox (GimpPixelRgn *dest_rgn,
|
||||
guint x,
|
||||
guint y,
|
||||
guint w,
|
||||
guint h,
|
||||
guint8 clr[4]);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -162,11 +170,11 @@ query ()
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -95,18 +95,18 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} MosaicInterface;
|
||||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void mosaic (GimpDrawable *drawable);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void mosaic (GimpDrawable *drawable);
|
||||
|
||||
/* user interface functions */
|
||||
static gint mosaic_dialog (void);
|
||||
|
@ -330,11 +330,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];
|
||||
GimpRunMode run_mode;
|
||||
|
|
|
@ -94,21 +94,20 @@ typedef struct
|
|||
|
||||
/***** Prototypes *****/
|
||||
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void set_default_params (void);
|
||||
|
||||
static void set_default_params (void);
|
||||
|
||||
static void dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void dialog_toggle_update (GtkWidget *widget,
|
||||
gint32 value);
|
||||
static void dialog_scale_update (GtkAdjustment *adjustment,
|
||||
gdouble *value);
|
||||
static void dialog_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
static void dialog_toggle_update (GtkWidget *widget,
|
||||
gint32 value);
|
||||
static void dialog_scale_update (GtkAdjustment *adjustment,
|
||||
gdouble *value);
|
||||
|
||||
static gint do_dialog (void);
|
||||
|
||||
|
@ -117,7 +116,7 @@ static void init_calculation (void);
|
|||
static void do_curl_effect (void);
|
||||
static void clear_curled_region (void);
|
||||
static void page_curl (void);
|
||||
static guchar * get_samples (GimpDrawable *drawable);
|
||||
static guchar * get_samples (GimpDrawable *drawable);
|
||||
|
||||
|
||||
/***** Variables *****/
|
||||
|
@ -224,11 +223,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;
|
||||
|
|
|
@ -56,9 +56,13 @@ void printrc_save (void);
|
|||
static int compare_printers (gp_plist_t *p1, gp_plist_t *p2);
|
||||
static void get_system_printers (void);
|
||||
|
||||
static void query (void);
|
||||
static void run (char *, int, GimpParam *, int *, GimpParam **);
|
||||
static int do_print_dialog (char *proc_name);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static int do_print_dialog (const gchar *proc_name);
|
||||
|
||||
/*
|
||||
* Globals...
|
||||
|
@ -220,11 +224,11 @@ volatile int SDEBUG = 1;
|
|||
#endif
|
||||
|
||||
static void
|
||||
run (gchar *name, /* I - Name of print program. */
|
||||
gint nparams, /* I - Number of parameters passed in */
|
||||
GimpParam *param, /* I - Parameter values */
|
||||
gint *nreturn_vals, /* O - Number of return values */
|
||||
GimpParam **return_vals) /* O - Return values */
|
||||
run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
GimpDrawable *drawable; /* Drawable for image */
|
||||
GimpRunMode run_mode; /* Current run mode */
|
||||
|
@ -586,7 +590,7 @@ run (gchar *name, /* I - Name of print program. */
|
|||
*/
|
||||
|
||||
static gint
|
||||
do_print_dialog (gchar *proc_name)
|
||||
do_print_dialog (const gchar *proc_name)
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -600,7 +604,6 @@ do_print_dialog (gchar *proc_name)
|
|||
gimp_create_main_window ();
|
||||
|
||||
gtk_main ();
|
||||
gdk_flush ();
|
||||
|
||||
/*
|
||||
* Set printrc options...
|
||||
|
|
|
@ -53,8 +53,12 @@
|
|||
/* Forward declarations */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
void query (void);
|
||||
void run (char *name, int nparams, GimpParam *param, int *nreturn_vals, GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
/* Global variables */
|
||||
|
@ -91,7 +95,7 @@ MAIN()
|
|||
/* Query plug-in */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
static void
|
||||
query (void)
|
||||
{
|
||||
GimpParamDef args[] =
|
||||
|
@ -238,12 +242,12 @@ rcm (GimpDrawable *drawable)
|
|||
/* STANDARD RUN */
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
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)
|
||||
{
|
||||
GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -323,19 +323,19 @@ script_fu_close_callback (GtkWidget *widget,
|
|||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
void
|
||||
apply_callback (gchar *proc_name,
|
||||
gchar *scheme_proc_name,
|
||||
gchar *proc_blurb,
|
||||
gchar *proc_help,
|
||||
gchar *proc_author,
|
||||
gchar *proc_copyright,
|
||||
gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
GimpParamDef *params,
|
||||
GimpParamDef *return_vals)
|
||||
static void
|
||||
apply_callback (const gchar *proc_name,
|
||||
const gchar *scheme_proc_name,
|
||||
const gchar *proc_blurb,
|
||||
const gchar *proc_help,
|
||||
const gchar *proc_author,
|
||||
const gchar *proc_copyright,
|
||||
const gchar *proc_date,
|
||||
GimpPDBProcType proc_type,
|
||||
gint nparams,
|
||||
gint nreturn_vals,
|
||||
const GimpParamDef *params,
|
||||
GimpParamDef *return_vals)
|
||||
{
|
||||
gint i;
|
||||
GString *text;
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
#define __SCRIPT_FU_CONSOLE_H__
|
||||
|
||||
|
||||
void script_fu_console_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void script_fu_eval_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void script_fu_console_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void script_fu_eval_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
|
||||
#endif /* __SCRIPT_FU_CONSOLE__ */
|
||||
|
|
|
@ -142,17 +142,17 @@ extern long nlength (LISP obj);
|
|||
*/
|
||||
|
||||
static void script_fu_load_script (GimpDatafileData *file_data);
|
||||
static gboolean script_fu_install_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static gboolean script_fu_remove_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static void script_fu_script_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static gboolean script_fu_install_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static gboolean script_fu_remove_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static void script_fu_script_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static SFScript * script_fu_find_script (gchar *script_name);
|
||||
static void script_fu_free_script (SFScript *script);
|
||||
|
@ -736,11 +736,11 @@ script_fu_remove_script (gpointer foo,
|
|||
}
|
||||
|
||||
static void
|
||||
script_fu_script_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_script_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -142,17 +142,17 @@ extern long nlength (LISP obj);
|
|||
*/
|
||||
|
||||
static void script_fu_load_script (GimpDatafileData *file_data);
|
||||
static gboolean script_fu_install_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static gboolean script_fu_remove_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static void script_fu_script_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static gboolean script_fu_install_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static gboolean script_fu_remove_script (gpointer foo,
|
||||
SFScript *script,
|
||||
gpointer bar);
|
||||
static void script_fu_script_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static SFScript * script_fu_find_script (gchar *script_name);
|
||||
static void script_fu_free_script (SFScript *script);
|
||||
|
@ -736,11 +736,11 @@ script_fu_remove_script (gpointer foo,
|
|||
}
|
||||
|
||||
static void
|
||||
script_fu_script_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_script_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -177,15 +177,15 @@ script_fu_server_get_mode (void)
|
|||
|
||||
|
||||
void
|
||||
script_fu_server_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_server_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpRunMode run_mode;
|
||||
GimpRunMode run_mode;
|
||||
|
||||
run_mode = params[0].data.d_int32;
|
||||
|
||||
|
|
|
@ -19,19 +19,15 @@
|
|||
#ifndef __SCRIPT_FU_SERVER_H__
|
||||
#define __SCRIPT_FU_SERVER_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <libgimp/gimp.h>
|
||||
|
||||
gint script_fu_server_get_mode (void);
|
||||
void script_fu_server_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void script_fu_server_listen (gint timeout);
|
||||
gint script_fu_server_get_mode (void);
|
||||
void script_fu_server_quit (void);
|
||||
|
||||
void script_fu_server_quit (void);
|
||||
|
||||
void script_fu_server_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
void script_fu_server_listen (gint timeout);
|
||||
|
||||
#endif /* __SCRIPT_FU_SERVER__ */
|
||||
|
|
|
@ -35,11 +35,11 @@ static void script_fu_text_console_interface (void);
|
|||
|
||||
|
||||
void
|
||||
script_fu_text_console_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_text_console_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#define __SCRIPT_FU_TEXT_CONSOLE_H__
|
||||
|
||||
|
||||
void script_fu_text_console_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
void script_fu_text_console_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
|
||||
#endif /* __SCRIPT_FU_TEXT_CONSOLE__ */
|
||||
|
|
|
@ -38,23 +38,21 @@
|
|||
#include "script-fu-intl.h"
|
||||
|
||||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
static void script_fu_quit (void);
|
||||
static void script_fu_query (void);
|
||||
static void script_fu_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
/* Declare local functions. */
|
||||
|
||||
static void script_fu_quit (void);
|
||||
static void script_fu_query (void);
|
||||
static void script_fu_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void script_fu_auxillary_init (void);
|
||||
static void script_fu_refresh_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void script_fu_refresh_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
|
@ -165,11 +163,11 @@ script_fu_query (void)
|
|||
}
|
||||
|
||||
static void
|
||||
script_fu_run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
INIT_I18N();
|
||||
|
||||
|
@ -282,11 +280,11 @@ script_fu_auxillary_init (void)
|
|||
}
|
||||
|
||||
static void
|
||||
script_fu_refresh_proc (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
script_fu_refresh_proc (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *params,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -55,11 +55,11 @@
|
|||
/* Variables set in dialog box */
|
||||
|
||||
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 sel2path_dialog (SELVALS *sels);
|
||||
static void sel2path_ok_callback (GtkWidget *widget,
|
||||
|
@ -150,11 +150,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;
|
||||
|
|
|
@ -59,16 +59,16 @@
|
|||
*/
|
||||
|
||||
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);
|
||||
static gint save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
static gint32 load_image (const gchar *filename);
|
||||
static gint save_image (const gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gint save_dialog (void);
|
||||
|
||||
|
@ -152,11 +152,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;
|
||||
|
@ -287,7 +287,7 @@ run (gchar *name,
|
|||
*/
|
||||
|
||||
static gint32
|
||||
load_image (gchar *filename) /* I - File to load */
|
||||
load_image (const gchar *filename) /* I - File to load */
|
||||
{
|
||||
int i, /* Looping var */
|
||||
x, /* Current X coordinate */
|
||||
|
@ -312,7 +312,7 @@ load_image (gchar *filename) /* I - File to load */
|
|||
* Open the file for reading...
|
||||
*/
|
||||
|
||||
sgip = sgiOpen (filename, SGI_READ, 0, 0, 0, 0, 0);
|
||||
sgip = sgiOpen ((char *) filename, SGI_READ, 0, 0, 0, 0, 0);
|
||||
if (sgip == NULL)
|
||||
{
|
||||
g_message ("Can't open '%s'", filename);
|
||||
|
@ -358,7 +358,7 @@ load_image (gchar *filename) /* I - File to load */
|
|||
return -1;
|
||||
}
|
||||
|
||||
gimp_image_set_filename(image, filename);
|
||||
gimp_image_set_filename (image, filename);
|
||||
|
||||
/*
|
||||
* Create the "background" layer to hold the image...
|
||||
|
@ -472,9 +472,9 @@ load_image (gchar *filename) /* I - File to load */
|
|||
*/
|
||||
|
||||
static gint
|
||||
save_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
save_image (const gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID)
|
||||
{
|
||||
gint i, j, /* Looping var */
|
||||
x, /* Current X coordinate */
|
||||
|
@ -524,8 +524,8 @@ save_image (gchar *filename,
|
|||
* Open the file for writing...
|
||||
*/
|
||||
|
||||
sgip = sgiOpen (filename, SGI_WRITE, compression, 1, drawable->width,
|
||||
drawable->height, zsize);
|
||||
sgip = sgiOpen ((char *) filename, SGI_WRITE, compression, 1,
|
||||
drawable->width, drawable->height, zsize);
|
||||
if (sgip == NULL)
|
||||
{
|
||||
g_message (_("Can't open '%s' for writing"), filename);
|
||||
|
|
|
@ -126,10 +126,14 @@ int dataTransferCallback(pTW_IMAGEINFO, pTW_IMAGEMEMXFER, void *);
|
|||
int endTransferCallback(int, int, void *);
|
||||
void postTransferCallback(int, void *);
|
||||
|
||||
static void init(void);
|
||||
static void quit(void);
|
||||
static void query(void);
|
||||
static void run(char *, int, GimpParam *, int *, GimpParam **);
|
||||
static void init (void);
|
||||
static void quit (void);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
/* This plug-in's functions */
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
|
@ -548,11 +552,11 @@ static GimpParam values[3];
|
|||
* Capture an image from a TWAIN datasource
|
||||
*/
|
||||
static void
|
||||
run(gchar *name, /* name of plugin */
|
||||
gint nparams, /* number of in-paramters */
|
||||
GimpParam *param, /* in-parameters */
|
||||
gint *nreturn_vals, /* number of out-parameters */
|
||||
GimpParam **return_vals) /* out-parameters */
|
||||
run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
GimpRunMode run_mode;
|
||||
|
||||
|
|
|
@ -72,11 +72,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 gint open_url_dialog (void);
|
||||
static void ok_callback (GtkWidget *widget,
|
||||
|
@ -145,14 +145,14 @@ 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];
|
||||
GimpRunMode run_mode;
|
||||
static GimpParam values[1];
|
||||
GimpRunMode run_mode;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
||||
run_mode = param[0].data.d_int32;
|
||||
|
|
|
@ -85,8 +85,13 @@ static HCURSOR selectCursor = 0;
|
|||
static ICONINFO iconInfo;
|
||||
|
||||
/* Forward declarations */
|
||||
static void query(void);
|
||||
static void run(char *, int, GimpParam *, int *, GimpParam **);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static void sendBMPToGimp(HBITMAP hBMP, HDC hDC, RECT rect);
|
||||
|
||||
BOOL CALLBACK dialogProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
@ -115,7 +120,7 @@ typedef struct {
|
|||
GtkWidget *single_button;
|
||||
GtkWidget *root_button;
|
||||
GtkWidget *delay_spinner;
|
||||
gint run;
|
||||
gboolean run;
|
||||
} WinSnapInterface;
|
||||
|
||||
/* The dialog data */
|
||||
|
@ -1088,11 +1093,11 @@ static GimpParam values[2];
|
|||
* Capture an window image.
|
||||
*/
|
||||
static void
|
||||
run(gchar *name, /* name of plugin */
|
||||
gint nparams, /* number of in-paramters */
|
||||
GimpParam *param, /* in-parameters */
|
||||
gint *nreturn_vals, /* number of out-parameters */
|
||||
GimpParam **return_vals) /* out-parameters */
|
||||
run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
GimpRunMode run_mode;
|
||||
int wait = 1;
|
||||
|
|
|
@ -96,7 +96,7 @@ static gint global_parasite_id = 0;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
gint run;
|
||||
gboolean run;
|
||||
} JpegSaveInterface;
|
||||
|
||||
|
||||
|
@ -388,21 +388,22 @@ t_prop_table g_prop_table[PROP_TABLE_ENTRIES] = {
|
|||
|
||||
/* Declare local functions.
|
||||
*/
|
||||
static void query (void);
|
||||
static void run (gchar *name,
|
||||
gint nparams,
|
||||
GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
static void query (void);
|
||||
static void run (const gchar *name,
|
||||
gint nparams,
|
||||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
|
||||
static gint32 load_xjt_image (gchar *filename);
|
||||
static gint save_xjt_image (gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
static gint32 load_xjt_image (const gchar *filename);
|
||||
static gint save_xjt_image (const gchar *filename,
|
||||
gint32 image_ID,
|
||||
gint32 drawable_ID);
|
||||
|
||||
static gint save_dialog (void);
|
||||
static void save_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
static gint save_dialog (void);
|
||||
static void save_ok_callback (GtkWidget *widget,
|
||||
gpointer data);
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
|
@ -514,11 +515,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;
|
||||
|
@ -1647,9 +1648,9 @@ p_write_image_prp(gchar *dirname, FILE *fp, gint32 image_id, gint wr_all_prp)
|
|||
/* ---------------------- SAVE -------------------------- */
|
||||
|
||||
static gint
|
||||
save_xjt_image (gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id)
|
||||
save_xjt_image (const gchar *filename,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id)
|
||||
{
|
||||
int l_rc;
|
||||
int l_len;
|
||||
|
@ -3288,7 +3289,7 @@ cleanup:
|
|||
/* ---------------------- LOAD -------------------------- */
|
||||
|
||||
static gint32
|
||||
load_xjt_image (gchar *filename)
|
||||
load_xjt_image (const gchar *filename)
|
||||
{
|
||||
int l_rc;
|
||||
int l_len;
|
||||
|
|
Loading…
Reference in New Issue