Commit ee4eb1b0 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

plug-ins/common/AlienMap2.c plug-ins/common/CEL.c

2005-08-13  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/AlienMap2.c
	* plug-ins/common/CEL.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/aa.c
	* plug-ins/common/align_layers.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/autocrop.c
	* plug-ins/common/autostretch_hsv.c
	* plug-ins/common/blinds.c
	* plug-ins/common/blur.c
	* plug-ins/common/borderaverage.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/c_astretch.c
	* plug-ins/common/cartoon.c
	* plug-ins/common/ccanalyze.c
	* plug-ins/common/channel_mixer.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/color_enhance.c
	* plug-ins/common/colorify.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/compose.c
	* plug-ins/common/compressor.c
	* plug-ins/common/convmatrix.c
	* plug-ins/common/csource.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c: canonicalize procedure and
	parameter names. Misc cleanups.
parent e84cb2e6
2005-08-13 Michael Natterer <mitch@gimp.org>
* plug-ins/common/AlienMap2.c
* plug-ins/common/CEL.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/aa.c
* plug-ins/common/align_layers.c
* plug-ins/common/animationplay.c
* plug-ins/common/apply_lens.c
* plug-ins/common/autocrop.c
* plug-ins/common/autostretch_hsv.c
* plug-ins/common/blinds.c
* plug-ins/common/blur.c
* plug-ins/common/borderaverage.c
* plug-ins/common/bumpmap.c
* plug-ins/common/c_astretch.c
* plug-ins/common/cartoon.c
* plug-ins/common/ccanalyze.c
* plug-ins/common/channel_mixer.c
* plug-ins/common/checkerboard.c
* plug-ins/common/color_enhance.c
* plug-ins/common/colorify.c
* plug-ins/common/colortoalpha.c
* plug-ins/common/compose.c
* plug-ins/common/compressor.c
* plug-ins/common/convmatrix.c
* plug-ins/common/csource.c
* plug-ins/common/cubism.c
* plug-ins/common/curve_bend.c: canonicalize procedure and
parameter names. Misc cleanups.
2005-08-13 DindinX <dindinx@gimp.org>
* plug-ins/common/checkerboard.c: added a preview, and some minor
......
......@@ -32,8 +32,10 @@
#include "libgimp/stdplugins-intl.h"
#define SCALE_WIDTH 200
#define ENTRY_WIDTH 6
#define PLUG_IN_PROC "plug-in-alienmap2"
#define PLUG_IN_BINARY "AlienMap2"
#define SCALE_WIDTH 200
#define ENTRY_WIDTH 6
/***** Color model *****/
......@@ -164,7 +166,7 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
{ GIMP_PDB_FLOAT, "redfrequency", "Red/hue component frequency factor" },
......@@ -179,7 +181,7 @@ query (void)
{ GIMP_PDB_INT8, "bluemode", "Blue/luminance application mode (TRUE, FALSE)" },
};
gimp_install_procedure ("plug_in_alienmap2",
gimp_install_procedure (PLUG_IN_PROC,
"AlienMap2 Color Transformation Plug-In",
"No help yet. Just try it and you'll see!",
"Martin Weber (martweb@gmx.net)",
......@@ -191,7 +193,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_alienmap2", "<Image>/Filters/Colors/Map");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Colors/Map");
}
static void
......@@ -274,7 +276,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data ("plug_in_alienmap2", &wvals);
gimp_get_data (PLUG_IN_PROC, &wvals);
/* Get information from the dialog */
if (!alienmap2_dialog ())
......@@ -305,7 +307,7 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
gimp_get_data ("plug_in_alienmap2", &wvals);
gimp_get_data (PLUG_IN_PROC, &wvals);
break;
default:
......@@ -331,8 +333,8 @@ run (const gchar *name,
/* Store data */
if (run_mode == GIMP_RUN_INTERACTIVE)
gimp_set_data ("plug_in_alienmap2",
&wvals, sizeof(alienmap2_vals_t));
gimp_set_data (PLUG_IN_PROC,
&wvals, sizeof (alienmap2_vals_t));
}
else
{
......@@ -388,11 +390,11 @@ alienmap2_dialog (void)
GtkObject *adj;
gboolean run;
gimp_ui_init ("alienmap2", TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dialog = gimp_dialog_new (_("AlienMap2"), "alienmap2",
dialog = gimp_dialog_new (_("AlienMap2"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "plug-in-alienmap2",
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -32,6 +32,11 @@
#include "libgimp/stdplugins-intl.h"
#define LOAD_PROC "file-cel-load"
#define SAVE_PROC "file-cel-save"
#define PLUG_IN_BINARY "CEL"
static void query (void);
static void run (const gchar *name,
gint nparams,
......@@ -75,10 +80,10 @@ query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "Filename to load image from" },
{ GIMP_PDB_STRING, "raw_filename", "Name entered" },
{ GIMP_PDB_STRING, "palette_filename", "Filename to load palette from" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "Filename to load image from" },
{ GIMP_PDB_STRING, "raw-filename", "Name entered" },
{ GIMP_PDB_STRING, "palette-filename", "Filename to load palette from" }
};
static GimpParamDef load_return_vals[] =
{
......@@ -87,15 +92,15 @@ query (void)
static GimpParamDef save_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" },
{ GIMP_PDB_STRING, "filename", "Filename to save image to" },
{ GIMP_PDB_STRING, "raw_filename", "Name entered" },
{ GIMP_PDB_STRING, "palette_filename", "Filename to save palette to" },
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Drawable to save" },
{ GIMP_PDB_STRING, "filename", "Filename to save image to" },
{ GIMP_PDB_STRING, "raw-filename", "Name entered" },
{ GIMP_PDB_STRING, "palette-filename", "Filename to save palette to" },
};
gimp_install_procedure ("file_cel_load",
gimp_install_procedure (LOAD_PROC,
"Loads files in KISS CEL file format",
"This plug-in loads individual KISS cell files.",
"Nick Lamb",
......@@ -108,12 +113,12 @@ query (void)
G_N_ELEMENTS (load_return_vals),
load_args, load_return_vals);
gimp_register_magic_load_handler ("file_cel_load",
gimp_register_magic_load_handler (LOAD_PROC,
"cel",
"",
"0,string,KiSS\\040");
gimp_install_procedure ("file_cel_save",
gimp_install_procedure (SAVE_PROC,
"Saves files in KISS CEL file format",
"This plug-in saves individual KISS cell files.",
"Nick Lamb",
......@@ -125,7 +130,7 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_save_handler ("file_cel_save", "cel", "");
gimp_register_save_handler (SAVE_PROC, "cel", "");
}
static void
......@@ -154,15 +159,15 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
if (strcmp (name, "file_cel_load") == 0)
if (strcmp (name, LOAD_PROC) == 0)
{
if (run_mode != GIMP_RUN_NONINTERACTIVE)
{
gimp_get_data ("file_cel_save:length", &data_length);
data_length = gimp_get_data_size (SAVE_PROC);
if (data_length > 0)
{
palette_file = g_malloc (data_length);
gimp_get_data ("file_cel_save:data", palette_file);
gimp_get_data (SAVE_PROC, palette_file);
}
else
{
......@@ -182,8 +187,7 @@ run (const gchar *name,
if (need_palette (param[1].data.d_string))
palette_dialog (_("Load KISS Palette"));
gimp_set_data ("file_cel_save:length", &data_length, sizeof (gsize));
gimp_set_data ("file_cel_save:data", palette_file, data_length);
gimp_set_data (SAVE_PROC, palette_file, data_length);
}
image = load_image (param[1].data.d_string, param[2].data.d_string);
......@@ -199,7 +203,7 @@ run (const gchar *name,
status = GIMP_PDB_EXECUTION_ERROR;
}
}
else if (strcmp (name, "file_cel_save") == 0)
else if (strcmp (name, SAVE_PROC) == 0)
{
image_ID = param[1].data.d_int32;
drawable_ID = param[2].data.d_int32;
......@@ -228,8 +232,7 @@ run (const gchar *name,
if (save_image (param[3].data.d_string, param[4].data.d_string,
image_ID, drawable_ID))
{
gimp_set_data ("file_cel_save:length", &data_length, sizeof (gsize));
gimp_set_data ("file_cel_save:data", palette_file, data_length);
gimp_set_data (SAVE_PROC, palette_file, data_length);
}
else
{
......@@ -675,7 +678,7 @@ palette_dialog (const gchar *title)
{
GtkWidget *dialog;
gimp_ui_init ("CEL", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dialog = gtk_file_chooser_dialog_new (title, NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
......@@ -686,9 +689,9 @@ palette_dialog (const gchar *title)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), palette_file);
......
......@@ -83,9 +83,8 @@
#include "libgimp/stdplugins-intl.h"
#define PARAM_FILE_FORMAT_VERSION 1.0
#define PLUG_IN_NAME "plug_in_cml_explorer"
#define SHORT_NAME "CML_explorer"
#define HELP_ID "plug-in-cml-explorer"
#define PLUG_IN_PROC "plug-in-cml-explorer"
#define PLUG_IN_BINARY "CML_explorer"
#define VALS CML_explorer_vals
#define PROGRESS_UPDATE_NUM 100
#define CML_LINE_SIZE 1024
......@@ -454,7 +453,7 @@ query (void)
{ GIMP_PDB_STRING, "parameter_file_name", "The name of parameter file. CML_explorer makes an image with its settings." }
};
gimp_install_procedure (PLUG_IN_NAME,
gimp_install_procedure (PLUG_IN_PROC,
"Make an image of Coupled-Map Lattice",
"Make an image of Coupled-Map Lattice (CML). CML is "
"a kind of Cellula Automata on continuous (value) "
......@@ -472,7 +471,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/Filters/Render/Pattern");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Render/Pattern");
}
static void
......@@ -500,7 +499,7 @@ run (const gchar *name,
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
if (! CML_explorer_dialog ())
return;
break;
......@@ -513,7 +512,7 @@ run (const gchar *name,
break;
}
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
break;
}
......@@ -523,7 +522,7 @@ run (const gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush();
if (run_mode == GIMP_RUN_INTERACTIVE && status == GIMP_PDB_SUCCESS)
gimp_set_data (PLUG_IN_NAME, &VALS, sizeof (ValueType));
gimp_set_data (PLUG_IN_PROC, &VALS, sizeof (ValueType));
g_free (mem_chank0);
g_free (mem_chank1);
......@@ -1180,11 +1179,11 @@ CML_explorer_dialog (void)
GtkWidget *button;
gboolean run;
gimp_ui_init (SHORT_NAME, TRUE);
gimp_ui_init (PLUG_IN_BINARY, TRUE);
dlg = gimp_dialog_new (_("Coupled-Map-Lattice Explorer"), "cml_explorer",
dlg = gimp_dialog_new (_("Coupled-Map-Lattice Explorer"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......@@ -1822,7 +1821,7 @@ function_graph_new (GtkWidget *widget,
dlg = gimp_dialog_new (_("Graph of the current settings"), "cml_explorer",
gtk_widget_get_toplevel (widget), 0,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
......@@ -2085,7 +2084,7 @@ force_overwrite (const gchar *filename,
dlg = gimp_dialog_new (_("CML Explorer: Overwrite File?"), "cml_explorer",
parent, GTK_DIALOG_MODAL,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -37,6 +37,11 @@
#include "libgimp/stdplugins-intl.h"
#define SAVE_PROC "file-aa-save"
#define PLUG_IN_BINARY "aa"
/*
* Declare some local functions.
*/
......@@ -75,15 +80,15 @@ query (void)
{
static GimpParamDef save_args[] =
{
{GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive"},
{GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive"},
{GIMP_PDB_IMAGE, "image", "Input image"},
{GIMP_PDB_DRAWABLE, "drawable", "Drawable to save"},
{GIMP_PDB_STRING, "filename", "The name of the file to save the image in"},
{GIMP_PDB_STRING, "raw_filename", "The name entered"},
{GIMP_PDB_STRING, "file_type", "File type to use"}
{GIMP_PDB_STRING, "raw-filename", "The name entered"},
{GIMP_PDB_STRING, "file-type", "File type to use"}
};
gimp_install_procedure ("file_aa_save",
gimp_install_procedure (SAVE_PROC,
"Saves grayscale image in various text formats",
"This plug-in uses aalib to save grayscale image "
"as ascii art into a variety of text formats",
......@@ -96,8 +101,8 @@ query (void)
G_N_ELEMENTS (save_args), 0,
save_args, NULL);
gimp_register_file_handler_mime ("file_aa_save", "text/plain");
gimp_register_save_handler ("file_aa_save", "txt,ansi,text", "");
gimp_register_file_handler_mime (SAVE_PROC, "text/plain");
gimp_register_save_handler (SAVE_PROC, "txt,ansi,text", "");
}
/**
......@@ -154,7 +159,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
gimp_ui_init ("aa", FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
export = gimp_export_image (&image_ID, &drawable_ID, "AA",
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
......@@ -180,7 +185,7 @@ run (const gchar *name,
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
gimp_get_data ("file_aa_save", &output_type);
gimp_get_data (SAVE_PROC, &output_type);
output_type = aa_dialog (output_type);
if (output_type < 0)
status = GIMP_PDB_CANCEL;
......@@ -201,7 +206,7 @@ run (const gchar *name,
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data ("file_aa_save", &output_type);
gimp_get_data (SAVE_PROC, &output_type);
break;
default:
......@@ -213,7 +218,7 @@ run (const gchar *name,
{
if (save_aa (drawable_ID, param[3].data.d_string, output_type))
{
gimp_set_data ("file_aa_save", &output_type, sizeof (output_type));
gimp_set_data (SAVE_PROC, &output_type, sizeof (output_type));
}
else
{
......@@ -341,9 +346,9 @@ aa_dialog (gint selected)
gint i;
/* Create the actual window. */
dialog = gimp_dialog_new (_("Save as Text"), "aa",
dialog = gimp_dialog_new (_("Save as Text"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, "file-aa-save",
gimp_standard_help_func, SAVE_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -26,10 +26,9 @@
#include "libgimp/stdplugins-intl.h"
#define PLUG_IN_NAME "plug_in_align_layers"
#define SHORT_NAME "align_layers"
#define HELP_ID "plug-in-align-layers"
#define SCALE_WIDTH 150
#define PLUG_IN_PROC "plug-in-align-layers"
#define PLUG_IN_BINARY "align_layers"
#define SCALE_WIDTH 150
enum
{
......@@ -117,14 +116,14 @@ query (void)
{
static GimpParamDef args [] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive"},
{ GIMP_PDB_IMAGE, "image", "Input image"},
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (not used)"},
{ GIMP_PDB_INT32, "link-afteer-alignment", "Link the visible layers after alignment"},
{ GIMP_PDB_INT32, "use-bottom", "use the bottom layer as the base of alignment"}
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive"},
{ GIMP_PDB_IMAGE, "image", "Input image"},
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (not used)"},
{ GIMP_PDB_INT32, "link-after-alignment", "Link the visible layers after alignment"},
{ GIMP_PDB_INT32, "use-bottom", "use the bottom layer as the base of alignment"}
};
gimp_install_procedure (PLUG_IN_NAME,
gimp_install_procedure (PLUG_IN_PROC,
"Align visible layers",
"Align visible layers",
"Shuji Narazaki <narazaki@InetQ.or.jp>",
......@@ -136,7 +135,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/Layer");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Layer");
}
static void
......@@ -171,7 +170,7 @@ run (const gchar *name,
g_message (_("There are not enough layers to align."));
return;
}
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
if (! align_layers_dialog ())
return;
break;
......@@ -180,7 +179,7 @@ run (const gchar *name,
break;
case GIMP_RUN_WITH_LAST_VALS:
gimp_get_data (PLUG_IN_NAME, &VALS);
gimp_get_data (PLUG_IN_PROC, &VALS);
break;
}
......@@ -189,7 +188,7 @@ run (const gchar *name,
if (run_mode != GIMP_RUN_NONINTERACTIVE)
gimp_displays_flush ();
if (run_mode == GIMP_RUN_INTERACTIVE && status == GIMP_PDB_SUCCESS)
gimp_set_data (PLUG_IN_NAME, &VALS, sizeof (ValueType));
gimp_set_data (PLUG_IN_PROC, &VALS, sizeof (ValueType));
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
......@@ -392,11 +391,11 @@ align_layers_dialog (void)
GtkObject *adj;
gboolean run;
gimp_ui_init (SHORT_NAME, FALSE);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
dlg = gimp_dialog_new (_("Align Visible Layers"), SHORT_NAME,
dlg = gimp_dialog_new (_("Align Visible Layers"), PLUG_IN_BINARY,
NULL, 0,
gimp_standard_help_func, HELP_ID,
gimp_standard_help_func, PLUG_IN_PROC,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
......
......@@ -54,7 +54,10 @@
#include "libgimp/stdplugins-intl.h"
#define DITHERTYPE GDK_RGB_DITHER_NORMAL
#define PLUG_IN_PROC "plug-in-animationplay"
#define PLUG_IN_BINARY "animationplay"
#define DITHERTYPE GDK_RGB_DITHER_NORMAL
typedef enum
{
......@@ -64,7 +67,6 @@ typedef enum
} DisposeType;
/* Declare local functions. */
static void query (void);
static void run (const gchar *name,
......@@ -75,15 +77,15 @@ static void run (const gchar *name,
static void do_playback (void);
static void window_response (GtkWidget *widget,
gint response_id,
gpointer data);
static void playstop_callback (GtkWidget *widget,
gpointer data);
static void rewind_callback (GtkWidget *widget,
gpointer data);
static void step_callback (GtkWidget *widget,
gpointer data);
static void window_response (GtkWidget *widget,
gint response_id,
gpointer data);
static void playstop_callback (GtkWidget *widget,
gpointer data);
static void rewind_callback (GtkWidget *widget,
gpointer data);
static void step_callback (GtkWidget *widget,
gpointer data);
static gboolean repaint_sda (GtkWidget *darea,
GdkEventExpose *event,
gpointer data);
......@@ -98,16 +100,16 @@ static void init_preview_misc (void);
/* tag util functions*/
static int parse_ms_tag (const char *str);
static DisposeType parse_disposal_tag (const char *str);
static DisposeType get_frame_disposal (guint whichframe);
static guint32 get_frame_duration (guint whichframe);
static gboolean is_disposal_tag (const char *str,
static int parse_ms_tag (const char *str);
static DisposeType parse_disposal_tag (const char *str);
static DisposeType get_frame_disposal (guint whichframe);
static guint32 get_frame_duration (guint whichframe);
static gboolean is_disposal_tag (const char *str,
DisposeType *disposal,
int *taglength);
static gboolean is_ms_tag (const char *str,
int *duration,
int *taglength);
int *taglength);
static gboolean is_ms_tag (const char *str,
int *duration,
int *taglength);
GimpPlugInInfo PLUG_IN_INFO =
......@@ -161,13 +163,14 @@ query (void)
{
static GimpParamDef args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)" }
{ GIMP_PDB_INT32, "run-mode", "Interactive, non-interactive" },
{ GIMP_PDB_IMAGE, "image", "Input image" },
{ GIMP_PDB_DRAWABLE, "drawable", "Input drawable (unused)" }
};
gimp_install_procedure ("plug_in_animationplay",
"This plugin allows you to preview a GIMP layer-based animation.",
gimp_install_procedure (PLUG_IN_PROC,
"This plugin allows you to preview a GIMP "
"layer-based animation.",
"",
"Adam D. Moss <adam@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
......@@ -178,8 +181,7 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register ("plug_in_animationplay",
"<Image>/Filters/Animation");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Filters/Animation");
}
static void
......@@ -189,12 +191,12 @@ run (const gchar *name,
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;
*nreturn_vals = 1;
*return_vals = values;