mirror of https://github.com/GNOME/gimp.git
plug-ins: now port to gimp_image_procedure_new2() all plug-ins without args.
This commit is contained in:
parent
4f14f620c4
commit
3c658789a6
|
@ -88,7 +88,7 @@ static GimpValueArray * optimize_run (GimpProcedure *procedu
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * do_optimizations (GimpRunMode run_mode,
|
||||
|
@ -167,9 +167,9 @@ optimize_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, OPTIMIZE_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
|
||||
|
@ -195,9 +195,9 @@ optimize_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, OPTIMIZE_DIFF_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
|
||||
|
@ -220,9 +220,9 @@ optimize_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, UNOPTIMIZE_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
|
||||
|
@ -242,9 +242,9 @@ optimize_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, REMOVE_BACKDROP_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
|
||||
|
@ -263,9 +263,9 @@ optimize_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, FIND_BACKDROP_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
optimize_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
|
||||
|
@ -311,7 +311,7 @@ optimize_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpValueArray *return_vals;
|
||||
|
|
|
@ -99,7 +99,7 @@ static GimpValueArray * play_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static void initialize (GimpPlay *play);
|
||||
|
@ -317,9 +317,9 @@ play_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
play_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
play_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -351,7 +351,7 @@ play_run (GimpProcedure *procedure,
|
|||
GimpImage *_image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GMenu *section;
|
||||
|
|
|
@ -68,7 +68,7 @@ static GimpValueArray * map_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static void map (GeglBuffer *buffer,
|
||||
|
@ -119,11 +119,11 @@ map_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, GRADMAP_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
map_run,
|
||||
GINT_TO_POINTER (GRADIENT_MODE),
|
||||
NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
map_run,
|
||||
GINT_TO_POINTER (GRADIENT_MODE),
|
||||
NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -155,11 +155,11 @@ map_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PALETTEMAP_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
map_run,
|
||||
GINT_TO_POINTER (PALETTE_MODE),
|
||||
NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
map_run,
|
||||
GINT_TO_POINTER (PALETTE_MODE),
|
||||
NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -193,13 +193,13 @@ map_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
map_run (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data)
|
||||
map_run (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
MapMode mode = GPOINTER_TO_INT (run_data);
|
||||
GeglBuffer *shadow_buffer;
|
||||
|
|
|
@ -59,7 +59,7 @@ static GimpValueArray * guillotine_run (GimpProcedure *proce
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GList * guillotine (GimpImage *image,
|
||||
gboolean interactive);
|
||||
|
@ -99,9 +99,9 @@ guillotine_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
guillotine_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
guillotine_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -147,7 +147,7 @@ guillotine_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpValueArray *return_vals = NULL;
|
||||
|
|
|
@ -285,7 +285,7 @@ static GimpValueArray * designer_run (GimpProcedure *procedu
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static inline void vset (GimpVector4 *v,
|
||||
|
@ -399,9 +399,9 @@ designer_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
designer_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
designer_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -3163,7 +3163,7 @@ designer_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -90,7 +90,7 @@ static GimpValueArray * lic_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static void lic_scale_entry_update (GimpLabelSpin *entry,
|
||||
gdouble *value);
|
||||
|
@ -867,9 +867,9 @@ lic_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
lic_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
lic_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -898,7 +898,7 @@ lic_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -88,7 +88,7 @@ static GimpValueArray * flame_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static void flame (GimpDrawable *drawable);
|
||||
|
@ -164,9 +164,9 @@ flame_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
flame_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
flame_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -226,7 +226,7 @@ flame_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *proc_config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -70,7 +70,7 @@ static GimpValueArray * gfig_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static void on_app_activate (GApplication *gapp,
|
||||
|
@ -159,9 +159,9 @@ gfig_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
gfig_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
gfig_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -199,7 +199,7 @@ gfig_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -208,7 +208,7 @@ static GimpValueArray * ifs_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
/* user interface functions */
|
||||
|
@ -422,9 +422,9 @@ ifs_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
ifs_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
ifs_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -461,7 +461,7 @@ ifs_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -75,7 +75,7 @@ static GimpValueArray * imap_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static gint dialog (GimpImap *imap);
|
||||
|
@ -209,9 +209,9 @@ imap_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_PROC))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
imap_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
imap_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -239,7 +239,7 @@ imap_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpImap *imap;
|
||||
|
|
|
@ -72,7 +72,7 @@ static GimpValueArray * print_run (GimpProcedure *procedur
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpPDBStatusType print_image (GimpImage *image,
|
||||
|
@ -154,9 +154,9 @@ print_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PRINT_PROC_NAME))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
print_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
print_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -182,9 +182,9 @@ print_create_procedure (GimpPlugIn *plug_in,
|
|||
#ifndef EMBED_PAGE_SETUP
|
||||
else if (! strcmp (name, PAGE_SETUP_PROC_NAME))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
print_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
print_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -215,7 +215,7 @@ print_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpPDBStatusType status;
|
||||
|
|
|
@ -155,7 +155,7 @@ static GimpValueArray * twain_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
G_DEFINE_TYPE (Twain, twain, GIMP_TYPE_PLUG_IN)
|
||||
|
@ -193,9 +193,9 @@ twain_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, PLUG_IN_NAME))
|
||||
{
|
||||
procedure = gimp_image_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
twain_run, NULL, NULL);
|
||||
procedure = gimp_image_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
twain_run, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
gimp_procedure_set_sensitivity_mask (procedure,
|
||||
|
@ -391,7 +391,7 @@ twain_run (GimpProcedure *procedure,
|
|||
GimpImage *image,
|
||||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
const GimpValueArray *args,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
/* Initialize the return values
|
||||
|
|
Loading…
Reference in New Issue