Commit 7703c4e0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

libgimp/gimpcompat.h renamed CAN_HANDLE_INDEXED and friends.

2000-08-24  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpcompat.h
	* libgimp/gimpexport.[ch]: renamed CAN_HANDLE_INDEXED and friends.

	* plugins/bmp/bmp.c
	* plugins/common/aa.c
	* plugins/common/csource.c
	* plugins/common/gbr.c
	* plugins/common/gicon.c
	* plugins/common/gif.c
	* plugins/common/gpb.c
	* plugins/common/header.c
	* plugins/common/hrz.c
	* plugins/common/jpeg.c
	* plugins/common/pat.c
	* plugins/common/pcx.c
	* plugins/common/pix.c
	* plugins/common/png.c
	* plugins/common/pnm.c
	* plugins/common/ps.c
	* plugins/common/psp.c
	* plugins/common/sunras.c
	* plugins/common/tga.c
	* plugins/common/tiff.c
	* plugins/common/xbm.c
	* plugins/common/xpm.c
	* plugins/common/xwd.c
	* plug-ins/fits/fits.c
	* plugins/gfli/gfli.c
	* plugins/sgi/sgi.c: ditto
parent 2667aca2
2000-08-24 Sven Neumann <sven@gimp.org>
* libgimp/gimpcompat.h
* libgimp/gimpexport.[ch]: renamed CAN_HANDLE_INDEXED and friends.
* plugins/bmp/bmp.c
* plugins/common/aa.c
* plugins/common/csource.c
* plugins/common/gbr.c
* plugins/common/gicon.c
* plugins/common/gif.c
* plugins/common/gpb.c
* plugins/common/header.c
* plugins/common/hrz.c
* plugins/common/jpeg.c
* plugins/common/pat.c
* plugins/common/pcx.c
* plugins/common/pix.c
* plugins/common/png.c
* plugins/common/pnm.c
* plugins/common/ps.c
* plugins/common/psp.c
* plugins/common/sunras.c
* plugins/common/tga.c
* plugins/common/tiff.c
* plugins/common/xbm.c
* plugins/common/xpm.c
* plugins/common/xwd.c
* plug-ins/fits/fits.c
* plugins/gfli/gfli.c
* plugins/sgi/sgi.c: ditto
2000-08-23 Garry R. Osgood <gosgood@idt.net>
* app/image_map.c
A bit of refresh drawable code was misplaced
these many years ago, leading to the persistence
......
......@@ -96,15 +96,26 @@ extern "C" {
#define pixpipeparams_parse gimp_pixpipe_params_parse
#define pixpipeparams_build gimp_pixpipe_params_build
#define GPlugInInfo GimpPlugInInfo
#define GTile GimpTile
#define GDrawable GimpDrawable
#define GPixelRgn GimpPixelRgn
#define GParamColor GimpParamColor
#define GParamRegion GimpParamRegion
#define GParamData GimpParamData
#define GParamDef GimpParamDef
#define GParam GimpParam
#define GPlugInInfo GimpPlugInInfo
#define GTile GimpTile
#define GDrawable GimpDrawable
#define GPixelRgn GimpPixelRgn
#define GParamColor GimpParamColor
#define GParamRegion GimpParamRegion
#define GParamData GimpParamData
#define GParamDef GimpParamDef
#define GParam GimpParam
#define CAN_HANDLE_RGB GIMP_EXPORT_CAN_HANDLE_RGB
#define CAN_HANDLE_GRAY GIMP_EXPORT_CAN_HANDLE_GRAY
#define CAN_HANDLE_INDEXED GIMP_EXPORT_CAN_HANDLE_INDEXED
#define CAN_HANDLE_ALPHA GIMP_EXPORT_CAN_HANDLE_ALPHA
#define CAN_HANDLE_LAYERS GIMP_EXPORT_CAN_HANDLE_LAYERS
#define CAN_HANDLE_LAYERS_AS_ANIMATION GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION
#define NEEDS_ALPHA GIMP_EXPORT_NEEDS_ALPHA
#define EXPORT_CANCEL GIMP_EXPORT_CANCEL
#define EXPORT_IGNORE GIMP_EXPORT_IGNORE
#define EXPORT_EXPORT GIMP_EXPORT_EXPORT
#endif /* GIMP_ENABLE_COMPAT_CRUFT */
......
......@@ -267,14 +267,14 @@ static ExportAction export_action_add_alpha =
/* dialog functions */
static GtkWidget *dialog = NULL;
static GimpExportReturnType dialog_return = EXPORT_CANCEL;
static GimpExportReturnType dialog_return = GIMP_EXPORT_CANCEL;
static void
export_export_callback (GtkWidget *widget,
gpointer data)
{
gtk_widget_destroy (dialog);
dialog_return = EXPORT_EXPORT;
dialog_return = GIMP_EXPORT_EXPORT;
}
static void
......@@ -282,14 +282,14 @@ export_skip_callback (GtkWidget *widget,
gpointer data)
{
gtk_widget_destroy (dialog);
dialog_return = EXPORT_IGNORE;
dialog_return = GIMP_EXPORT_IGNORE;
}
static void
export_cancel_callback (GtkWidget *widget,
gpointer data)
{
dialog_return = EXPORT_CANCEL;
dialog_return = GIMP_EXPORT_CANCEL;
dialog = NULL;
gtk_main_quit ();
}
......@@ -319,7 +319,7 @@ export_dialog (GSList *actions,
gchar *text;
ExportAction *action;
dialog_return = EXPORT_CANCEL;
dialog_return = GIMP_EXPORT_CANCEL;
g_return_val_if_fail (actions != NULL && format != NULL, dialog_return);
/*
......@@ -441,13 +441,13 @@ export_dialog (GSList *actions,
* If the user chooses to export the image, a copy is created.
* This copy is then converted, the image_ID and drawable_ID
* are changed to point to the new image and the procedure returns
* EXPORT_EXPORT. The save_plugin has to take care of deleting the
* GIMP_EXPORT_EXPORT. The save_plugin has to take care of deleting the
* created image using gimp_image_delete() when it has saved it.
*
* If the user chooses to Ignore the export problem, the image_ID
* and drawable_ID is not altered, EXPORT_IGNORE is returned and
* and drawable_ID is not altered, GIMP_EXPORT_IGNORE is returned and
* the save_plugin should try to save the original image. If the
* user chooses Cancel, EXPORT_CANCEL is returned and the
* user chooses Cancel, GIMP_EXPORT_CANCEL is returned and the
* save_plugin should quit itself with status #STATUS_CANCEL.
*
* Returns: An enum of #GimpExportReturnType describing the user_action.
......@@ -471,10 +471,10 @@ gimp_export_image (gint32 *image_ID,
g_return_val_if_fail (*image_ID > -1 && *drawable_ID > -1, FALSE);
/* do some sanity checks */
if (capabilities & NEEDS_ALPHA)
capabilities |= CAN_HANDLE_ALPHA;
if (capabilities & CAN_HANDLE_LAYERS_AS_ANIMATION)
capabilities |= CAN_HANDLE_LAYERS;
if (capabilities & GIMP_EXPORT_NEEDS_ALPHA)
capabilities |= GIMP_EXPORT_CAN_HANDLE_ALPHA ;
if (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION)
capabilities |= GIMP_EXPORT_CAN_HANDLE_LAYERS;
/* check alpha */
layers = gimp_image_get_layers (*image_ID, &nlayers);
......@@ -483,7 +483,7 @@ gimp_export_image (gint32 *image_ID,
if (gimp_drawable_has_alpha (layers[i]))
{
if ( !(capabilities & CAN_HANDLE_ALPHA) )
if ( !(capabilities & GIMP_EXPORT_CAN_HANDLE_ALPHA ) )
{
actions = g_slist_prepend (actions, &export_action_flatten);
added_flatten = TRUE;
......@@ -497,7 +497,7 @@ gimp_export_image (gint32 *image_ID,
if (i == nlayers - 1 && gimp_layer_get_visible(layers[i]))
background_has_alpha = FALSE;
if (capabilities & NEEDS_ALPHA)
if (capabilities & GIMP_EXPORT_NEEDS_ALPHA)
{
actions = g_slist_prepend (actions, &export_action_add_alpha);
break;
......@@ -509,16 +509,16 @@ gimp_export_image (gint32 *image_ID,
/* check multiple layers */
if (!added_flatten && nlayers > 1)
{
if (capabilities & CAN_HANDLE_LAYERS_AS_ANIMATION)
if (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION)
{
if (background_has_alpha || capabilities & NEEDS_ALPHA)
if (background_has_alpha || capabilities & GIMP_EXPORT_NEEDS_ALPHA)
actions = g_slist_prepend (actions, &export_action_animate_or_merge);
else
actions = g_slist_prepend (actions, &export_action_animate_or_flatten);
}
else if ( !(capabilities & CAN_HANDLE_LAYERS))
else if ( !(capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS))
{
if (background_has_alpha || capabilities & NEEDS_ALPHA)
if (background_has_alpha || capabilities & GIMP_EXPORT_NEEDS_ALPHA)
actions = g_slist_prepend (actions, &export_action_merge);
else
actions = g_slist_prepend (actions, &export_action_merge_flat);
......@@ -530,35 +530,35 @@ gimp_export_image (gint32 *image_ID,
switch (type)
{
case GIMP_RGB:
if ( !(capabilities & CAN_HANDLE_RGB) )
if ( !(capabilities & GIMP_EXPORT_CAN_HANDLE_RGB) )
{
if ((capabilities & CAN_HANDLE_INDEXED) && (capabilities & CAN_HANDLE_GRAY))
if ((capabilities & GIMP_EXPORT_CAN_HANDLE_INDEXED) && (capabilities & GIMP_EXPORT_CAN_HANDLE_GRAY))
actions = g_slist_prepend (actions, &export_action_convert_indexed_or_grayscale);
else if (capabilities & CAN_HANDLE_INDEXED)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_INDEXED)
actions = g_slist_prepend (actions, &export_action_convert_indexed);
else if (capabilities & CAN_HANDLE_GRAY)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_GRAY)
actions = g_slist_prepend (actions, &export_action_convert_grayscale);
}
break;
case GIMP_GRAY:
if ( !(capabilities & CAN_HANDLE_GRAY) )
if ( !(capabilities & GIMP_EXPORT_CAN_HANDLE_GRAY) )
{
if ((capabilities & CAN_HANDLE_RGB) && (capabilities & CAN_HANDLE_INDEXED))
if ((capabilities & GIMP_EXPORT_CAN_HANDLE_RGB) && (capabilities & GIMP_EXPORT_CAN_HANDLE_INDEXED))
actions = g_slist_prepend (actions, &export_action_convert_rgb_or_indexed);
else if (capabilities & CAN_HANDLE_RGB)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_RGB)
actions = g_slist_prepend (actions, &export_action_convert_rgb);
else if (capabilities & CAN_HANDLE_INDEXED)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_INDEXED)
actions = g_slist_prepend (actions, &export_action_convert_indexed);
}
break;
case GIMP_INDEXED:
if ( !(capabilities & CAN_HANDLE_INDEXED) )
if ( !(capabilities & GIMP_EXPORT_CAN_HANDLE_INDEXED) )
{
if ((capabilities & CAN_HANDLE_RGB) && (capabilities & CAN_HANDLE_GRAY))
if ((capabilities & GIMP_EXPORT_CAN_HANDLE_RGB) && (capabilities & GIMP_EXPORT_CAN_HANDLE_GRAY))
actions = g_slist_prepend (actions, &export_action_convert_rgb_or_grayscale);
else if (capabilities & CAN_HANDLE_RGB)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_RGB)
actions = g_slist_prepend (actions, &export_action_convert_rgb);
else if (capabilities & CAN_HANDLE_GRAY)
else if (capabilities & GIMP_EXPORT_CAN_HANDLE_GRAY)
actions = g_slist_prepend (actions, &export_action_convert_grayscale);
}
break;
......@@ -570,9 +570,9 @@ gimp_export_image (gint32 *image_ID,
dialog_return = export_dialog (actions, format_name);
}
else
dialog_return = EXPORT_IGNORE;
dialog_return = GIMP_EXPORT_IGNORE;
if (dialog_return == EXPORT_EXPORT)
if (dialog_return == GIMP_EXPORT_EXPORT)
{
*image_ID = gimp_image_duplicate (*image_ID);
*drawable_ID = gimp_image_get_active_layer (*image_ID);
......
......@@ -32,20 +32,20 @@ extern "C" {
typedef enum
{
CAN_HANDLE_RGB = 1 << 0,
CAN_HANDLE_GRAY = 1 << 1,
CAN_HANDLE_INDEXED = 1 << 2,
CAN_HANDLE_ALPHA = 1 << 3,
CAN_HANDLE_LAYERS = 1 << 4,
CAN_HANDLE_LAYERS_AS_ANIMATION = 1 << 5,
NEEDS_ALPHA = 1 << 6
GIMP_EXPORT_CAN_HANDLE_RGB = 1 << 0,
GIMP_EXPORT_CAN_HANDLE_GRAY = 1 << 1,
GIMP_EXPORT_CAN_HANDLE_INDEXED = 1 << 2,
GIMP_EXPORT_CAN_HANDLE_ALPHA = 1 << 3,
GIMP_EXPORT_CAN_HANDLE_LAYERS = 1 << 4,
GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION = 1 << 5,
GIMP_EXPORT_NEEDS_ALPHA = 1 << 6
} GimpExportCapabilities;
typedef enum
{
EXPORT_CANCEL,
EXPORT_IGNORE,
EXPORT_EXPORT
GIMP_EXPORT_CANCEL,
GIMP_EXPORT_IGNORE,
GIMP_EXPORT_EXPORT
} GimpExportReturnType;
GimpExportReturnType gimp_export_image (gint32 *image_ID,
......
......@@ -164,7 +164,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -224,10 +224,10 @@ run (gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("bmp", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "BMP",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY |
CAN_HANDLE_INDEXED));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -263,7 +263,7 @@ run (gchar *name,
status = WriteBMP (param[3].data.d_string, image_ID, drawable_ID);
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -135,7 +135,7 @@ run (gchar *name,
static int last_type = 0;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
/* Set us up to return a status. */
*nreturn_vals = 1;
......@@ -155,9 +155,9 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("aa", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "AA",
(CAN_HANDLE_GRAY |
CAN_HANDLE_ALPHA));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -221,7 +221,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
values[0].data.d_status = status;
......
......@@ -129,7 +129,7 @@ run (gchar *name,
static GimpParam values[2];
GimpRunModeType run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -171,9 +171,9 @@ run (gchar *name,
gimp_ui_init ("csource", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "C Source",
(CAN_HANDLE_RGB |
CAN_HANDLE_ALPHA));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -211,7 +211,7 @@ run (gchar *name,
status = GIMP_PDB_CANCEL;
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -167,7 +167,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -204,8 +204,8 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("gbr", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GBR",
CAN_HANDLE_GRAY);
if (export == EXPORT_CANCEL)
GIMP_EXPORT_CAN_HANDLE_GRAY);
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -254,7 +254,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -166,7 +166,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -203,9 +203,9 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("gicon", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GIcon",
(CAN_HANDLE_GRAY |
CAN_HANDLE_ALPHA));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -261,7 +261,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -417,7 +417,7 @@ run (gchar *name,
gint32 image_ID;
gint32 drawable_ID;
gint32 orig_image_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -440,11 +440,11 @@ run (gchar *name,
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
export = gimp_export_image (&image_ID, &drawable_ID, "GIF",
(CAN_HANDLE_INDEXED |
CAN_HANDLE_GRAY |
CAN_HANDLE_ALPHA |
CAN_HANDLE_LAYERS_AS_ANIMATION));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -516,7 +516,7 @@ run (gchar *name,
status = GIMP_PDB_CANCEL;
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
......
......@@ -905,7 +905,7 @@ run (char *name,
gint32 *layer_ID;
gint nlayers, layer;
gchar *layer_name;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -935,10 +935,10 @@ run (char *name,
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gpb", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GPB",
(CAN_HANDLE_RGB |
CAN_HANDLE_ALPHA |
NEEDS_ALPHA ));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
GIMP_EXPORT_NEEDS_ALPHA ));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -999,11 +999,11 @@ run (char *name,
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("gpb", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "GIH",
(CAN_HANDLE_RGB |
CAN_HANDLE_ALPHA |
CAN_HANDLE_LAYERS |
NEEDS_ALPHA));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
GIMP_EXPORT_CAN_HANDLE_LAYERS |
GIMP_EXPORT_NEEDS_ALPHA));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -1083,7 +1083,7 @@ run (char *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
values[0].data.d_status = status;
......
......@@ -96,7 +96,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -118,9 +118,9 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("header", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "Header",
(CAN_HANDLE_RGB |
CAN_HANDLE_INDEXED));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -135,7 +135,7 @@ run (gchar *name,
status = GIMP_PDB_EXECUTION_ERROR;
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -193,7 +193,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -231,9 +231,9 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("hrz", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "HRZ",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -275,7 +275,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -368,7 +368,7 @@ run (gchar *name,
GimpParasite *parasite;
#endif /* GIMP_HAVE_PARASITES */
gint err;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -408,18 +408,18 @@ run (gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("jpeg", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "JPEG",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY));
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY));
switch (export)
{
case EXPORT_EXPORT:
case GIMP_EXPORT_EXPORT:
display_ID = gimp_display_new (image_ID);
gimp_image_set_filename (image_ID, _("Export Preview"));
gimp_displays_flush ();
break;
case EXPORT_IGNORE:
case GIMP_EXPORT_IGNORE:
break;
case EXPORT_CANCEL:
case GIMP_EXPORT_CANCEL:
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
break;
......@@ -583,7 +583,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
{
/* If the image was exported, delete the new display. */
/* This also deletes the image. */
......
......@@ -148,7 +148,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -186,8 +186,8 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("pat", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "PAT",
(CAN_HANDLE_RGB | CAN_HANDLE_GRAY));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -235,7 +235,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -179,7 +179,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -217,10 +217,10 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("pcx", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "PCX",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY |
CAN_HANDLE_INDEXED));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -256,7 +256,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -190,7 +190,7 @@ run (gchar *name,
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
run_mode = param[0].data.d_int32;
......@@ -231,9 +231,9 @@ run (gchar *name,
INIT_I18N_UI();
gimp_ui_init ("pix", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "PIX",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY));
if (export == GIMP_EXPORT_CANCEL)
{
values[0].data.d_status = GIMP_PDB_CANCEL;
return;
......@@ -252,7 +252,7 @@ run (gchar *name,
}
}
if (export == EXPORT_EXPORT)
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
}
else
......
......@@ -223,7 +223,7 @@ run (gchar *name,
gint32 image_ID;
gint32 drawable_ID;
gint32 orig_image_ID;
GimpExportReturnType export = EXPORT_CANCEL;
GimpExportReturnType export = GIMP_EXPORT_CANCEL;
*nreturn_vals = 1;
*return_vals = values;
......@@ -261,11 +261,11 @@ run (gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("png", FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "PNG",
(CAN_HANDLE_RGB |
CAN_HANDLE_GRAY |
CAN_HANDLE_INDEXED |
CAN_HANDLE_ALPHA));
if (export == EXPORT_CANCEL)
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
if (export == GIMP_EXPORT_CANCEL)
{
*nreturn_vals = 1;
values[0].data.d_status = GIMP_PDB_CANCEL;
......@@ -339,7 +339,7 @@ run (gchar *name,
}