mirror of https://github.com/GNOME/gimp.git
Redid the whole internal progress stuff: don't pass around
2004-08-10 Michael Natterer <mitch@gimp.org> Redid the whole internal progress stuff: don't pass around progress_callback and progress_data; instead, provide a pointer to a GimpProgressInterface which can be implemented by a variety of backends. Addresses (but not yet fixes) bugs #6010, #97266 and #135185. * app/display/Makefile.am * app/display/gimpprogress.[ch]: removed the old progress hack. * app/core/Makefile.am * app/core/core-types.h * app/core/gimpprogress.[ch]: implement GimpProgressInterface. * app/widgets/Makefile.am * app/widgets/widgets-types.h * app/widgets/gimpprogressdialog.[ch]: the standalone progress dialog as widget implementing GimpProgressInterface. * app/display/gimpdisplay.c * app/display/gimpstatusbar.[ch] * app/widgets/gimpfiledialog.[ch] * app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface implementation to these classes. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: replaced the old progress vtable entries by two new to create and destroy a GimpProgressDialog in case no other progress is available. * app/pdb/procedural_db.[ch] * app/plug-in/plug-in-run.[ch] * tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and all plug-ins. * app/plug-in/plug-in.[ch] * app/plug-in/plug-ins.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c: handle the case there the plug-in was crated with a progress as well as the case where it wasn't. * app/app_procs.c * app/batch.c * app/xcf/xcf.c * app/file/file-open.[ch] * app/file/file-save.[ch] * app/widgets/gimphelp.c * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: changed accordingly. * app/core/gimpimagefile.[ch] * app/display/gimpdisplayshell-dnd.c * app/gui/file-open-dialog.c * app/gui/file-open-location-dialog.c * app/gui/file-save-dialog.c * app/widgets/gimplayertreeview.c * app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file related functions. Embed the progress in the file dialog where possible. * app/core/gimpdrawable-blend.[ch] * app/core/gimpdrawable-transform.[ch] * app/core/gimpimage-convert.[ch] * app/core/gimpimage-flip.[ch] * app/core/gimpimage-resize.[ch] * app/core/gimpimage-rotate.[ch] * app/core/gimpimage-scale.[ch] * app/core/gimpitem-linked.[ch] * app/core/gimpitem.[ch] * app/core/gimpchannel.c * app/core/gimpdrawable.c * app/core/gimplayer.c * app/core/gimpselection.c * app/vectors/gimpvectors.c: replaced callback/data by GimpProgress. * app/tools/gimpblendtool.c * app/tools/gimptransformtool.c * app/gui/convert-dialog.c * app/actions/documents-commands.c * app/actions/file-commands.c * app/actions/image-commands.c * app/actions/layers-commands.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb: changed callers accordingly. * app/pdb/*_cmds.c: regenerated.
This commit is contained in:
parent
059f92634c
commit
02d2b990f5
97
ChangeLog
97
ChangeLog
|
@ -1,3 +1,100 @@
|
|||
2004-08-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Redid the whole internal progress stuff: don't pass around
|
||||
progress_callback and progress_data; instead, provide a
|
||||
pointer to a GimpProgressInterface which can be implemented
|
||||
by a variety of backends.
|
||||
|
||||
Addresses (but not yet fixes) bugs #6010, #97266 and #135185.
|
||||
|
||||
* app/display/Makefile.am
|
||||
* app/display/gimpprogress.[ch]: removed the old progress hack.
|
||||
|
||||
* app/core/Makefile.am
|
||||
* app/core/core-types.h
|
||||
* app/core/gimpprogress.[ch]: implement GimpProgressInterface.
|
||||
|
||||
* app/widgets/Makefile.am
|
||||
* app/widgets/widgets-types.h
|
||||
* app/widgets/gimpprogressdialog.[ch]: the standalone progress
|
||||
dialog as widget implementing GimpProgressInterface.
|
||||
|
||||
* app/display/gimpdisplay.c
|
||||
* app/display/gimpstatusbar.[ch]
|
||||
* app/widgets/gimpfiledialog.[ch]
|
||||
* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
|
||||
implementation to these classes.
|
||||
|
||||
* app/core/gimp-gui.[ch]
|
||||
* app/gui/gui-vtable.c: replaced the old progress vtable entries
|
||||
by two new to create and destroy a GimpProgressDialog in case
|
||||
no other progress is available.
|
||||
|
||||
* app/pdb/procedural_db.[ch]
|
||||
* app/plug-in/plug-in-run.[ch]
|
||||
* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
|
||||
all plug-ins.
|
||||
|
||||
* app/plug-in/plug-in.[ch]
|
||||
* app/plug-in/plug-ins.c
|
||||
* app/plug-in/plug-in-message.c
|
||||
* app/plug-in/plug-in-progress.c: handle the case there the
|
||||
plug-in was crated with a progress as well as the case where it
|
||||
wasn't.
|
||||
|
||||
* app/app_procs.c
|
||||
* app/batch.c
|
||||
* app/xcf/xcf.c
|
||||
* app/file/file-open.[ch]
|
||||
* app/file/file-save.[ch]
|
||||
* app/widgets/gimphelp.c
|
||||
* app/widgets/gimpbrushselect.c
|
||||
* app/widgets/gimpfontselect.c
|
||||
* app/widgets/gimpgradientselect.c
|
||||
* app/widgets/gimppaletteselect.c
|
||||
* app/widgets/gimppatternselect.c: changed accordingly.
|
||||
|
||||
* app/core/gimpimagefile.[ch]
|
||||
* app/display/gimpdisplayshell-dnd.c
|
||||
* app/gui/file-open-dialog.c
|
||||
* app/gui/file-open-location-dialog.c
|
||||
* app/gui/file-save-dialog.c
|
||||
* app/widgets/gimplayertreeview.c
|
||||
* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
|
||||
related functions. Embed the progress in the file dialog where
|
||||
possible.
|
||||
|
||||
* app/core/gimpdrawable-blend.[ch]
|
||||
* app/core/gimpdrawable-transform.[ch]
|
||||
* app/core/gimpimage-convert.[ch]
|
||||
* app/core/gimpimage-flip.[ch]
|
||||
* app/core/gimpimage-resize.[ch]
|
||||
* app/core/gimpimage-rotate.[ch]
|
||||
* app/core/gimpimage-scale.[ch]
|
||||
* app/core/gimpitem-linked.[ch]
|
||||
* app/core/gimpitem.[ch]
|
||||
* app/core/gimpchannel.c
|
||||
* app/core/gimpdrawable.c
|
||||
* app/core/gimplayer.c
|
||||
* app/core/gimpselection.c
|
||||
* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.
|
||||
|
||||
* app/tools/gimpblendtool.c
|
||||
* app/tools/gimptransformtool.c
|
||||
* app/gui/convert-dialog.c
|
||||
* app/actions/documents-commands.c
|
||||
* app/actions/file-commands.c
|
||||
* app/actions/image-commands.c
|
||||
* app/actions/layers-commands.c
|
||||
* app/actions/plug-in-commands.c
|
||||
* app/actions/vectors-commands.c
|
||||
* tools/pdbgen/pdb/convert.pdb
|
||||
* tools/pdbgen/pdb/edit.pdb
|
||||
* tools/pdbgen/pdb/image.pdb
|
||||
* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.
|
||||
|
||||
* app/pdb/*_cmds.c: regenerated.
|
||||
|
||||
2004-08-10 DindinX <david@dindinx.org>
|
||||
|
||||
* plug-ins/common/blinds.c: GimpPreviewArea-ified.
|
||||
|
|
|
@ -196,7 +196,7 @@ documents_recreate_preview_cmd_callback (GtkAction *action,
|
|||
|
||||
preview_size = gimp_container_view_get_preview_size (editor->view, NULL);
|
||||
|
||||
gimp_imagefile_create_thumbnail (imagefile, context, preview_size);
|
||||
gimp_imagefile_create_thumbnail (imagefile, context, NULL, preview_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ documents_open_image (GimpContext *context,
|
|||
|
||||
uri = gimp_object_get_name (GIMP_OBJECT (imagefile));
|
||||
|
||||
gimage = file_open_with_display (context->gimp, context,
|
||||
gimage = file_open_with_display (context->gimp, context, NULL,
|
||||
uri, &status, &error);
|
||||
|
||||
if (! gimage && status != GIMP_PDB_CANCEL)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
#include "core/gimptemplate.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
|
@ -131,6 +132,7 @@ file_last_opened_cmd_callback (GtkAction *action,
|
|||
GError *error = NULL;
|
||||
|
||||
gimage = file_open_with_display (gimp, action_data_get_context (data),
|
||||
NULL,
|
||||
GIMP_OBJECT (imagefile)->name,
|
||||
&status, &error);
|
||||
|
||||
|
@ -177,6 +179,7 @@ file_save_cmd_callback (GtkAction *action,
|
|||
GError *error = NULL;
|
||||
|
||||
status = file_save (gdisp->gimage, action_data_get_context (data),
|
||||
GIMP_PROGRESS (gdisp),
|
||||
GIMP_RUN_WITH_LAST_VALS, &error);
|
||||
|
||||
if (status != GIMP_PDB_SUCCESS &&
|
||||
|
@ -278,10 +281,9 @@ file_revert_cmd_callback (GtkAction *action,
|
|||
GIMP_STOCK_QUESTION,
|
||||
text,
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
G_OBJECT (gdisp->gimage),
|
||||
"disconnect",
|
||||
G_OBJECT (gdisp), "disconnect",
|
||||
file_revert_confirm_callback,
|
||||
gdisp->gimage);
|
||||
gdisp);
|
||||
|
||||
g_free (text);
|
||||
|
||||
|
@ -340,7 +342,8 @@ file_revert_confirm_callback (GtkWidget *widget,
|
|||
gboolean revert,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *old_gimage = GIMP_IMAGE (data);
|
||||
GimpDisplay *gdisp = GIMP_DISPLAY (data);
|
||||
GimpImage *old_gimage = gdisp->gimage;
|
||||
|
||||
g_object_set_data (G_OBJECT (old_gimage), REVERT_DATA_KEY, NULL);
|
||||
|
||||
|
@ -357,6 +360,7 @@ file_revert_confirm_callback (GtkWidget *widget,
|
|||
uri = gimp_object_get_name (GIMP_OBJECT (old_gimage));
|
||||
|
||||
new_gimage = file_open_image (gimp, gimp_get_user_context (gimp),
|
||||
GIMP_PROGRESS (gdisp),
|
||||
uri, uri, NULL,
|
||||
GIMP_RUN_INTERACTIVE,
|
||||
&status, NULL, &error);
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "core/gimpimage-rotate.h"
|
||||
#include "core/gimpimage-scale.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpdock.h"
|
||||
|
@ -49,7 +50,6 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "gui/convert-dialog.h"
|
||||
#include "gui/dialogs.h"
|
||||
|
@ -160,7 +160,7 @@ image_convert_cmd_callback (GtkAction *action,
|
|||
case GIMP_RGB:
|
||||
case GIMP_GRAY:
|
||||
gimp_image_convert (gimage, (GimpImageBaseType) value,
|
||||
0, 0, FALSE, FALSE, 0, NULL, NULL, NULL);
|
||||
0, 0, FALSE, FALSE, 0, NULL, NULL);
|
||||
gimp_image_flush (gimage);
|
||||
break;
|
||||
|
||||
|
@ -259,13 +259,14 @@ image_flip_cmd_callback (GtkAction *action,
|
|||
GimpProgress *progress;
|
||||
return_if_no_display (gdisp, data);
|
||||
|
||||
progress = gimp_progress_start (gdisp, _("Flipping..."), TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (gdisp),
|
||||
_("Flipping..."), FALSE);
|
||||
|
||||
gimp_image_flip (gdisp->gimage, action_data_get_context (data),
|
||||
(GimpOrientationType) value,
|
||||
gimp_progress_update_and_flush, progress);
|
||||
(GimpOrientationType) value, progress);
|
||||
|
||||
gimp_progress_end (progress);
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
}
|
||||
|
@ -279,13 +280,14 @@ image_rotate_cmd_callback (GtkAction *action,
|
|||
GimpProgress *progress;
|
||||
return_if_no_display (gdisp, data);
|
||||
|
||||
progress = gimp_progress_start (gdisp, _("Rotating..."), TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (gdisp),
|
||||
_("Rotating..."), FALSE);
|
||||
|
||||
gimp_image_rotate (gdisp->gimage, action_data_get_context (data),
|
||||
(GimpRotationType) value,
|
||||
gimp_progress_update_and_flush, progress);
|
||||
(GimpRotationType) value, progress);
|
||||
|
||||
gimp_progress_end (progress);
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
}
|
||||
|
@ -449,9 +451,8 @@ image_resize_callback (GtkWidget *widget,
|
|||
{
|
||||
GimpProgress *progress;
|
||||
|
||||
progress = gimp_progress_start (options->gdisp,
|
||||
_("Resizing..."),
|
||||
TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (options->gdisp),
|
||||
_("Resizing..."), FALSE);
|
||||
|
||||
gimp_image_resize (options->gimage,
|
||||
options->context,
|
||||
|
@ -459,9 +460,10 @@ image_resize_callback (GtkWidget *widget,
|
|||
options->dialog->height,
|
||||
options->dialog->offset_x,
|
||||
options->dialog->offset_y,
|
||||
gimp_progress_update_and_flush, progress);
|
||||
progress);
|
||||
|
||||
gimp_progress_end (progress);
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_image_flush (options->gimage);
|
||||
}
|
||||
|
@ -605,17 +607,17 @@ image_scale_implement (ImageResizeOptions *options)
|
|||
{
|
||||
GimpProgress *progress;
|
||||
|
||||
progress = gimp_progress_start (options->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (options->gdisp),
|
||||
_("Scaling..."), FALSE);
|
||||
|
||||
gimp_image_scale (gimage,
|
||||
options->dialog->width,
|
||||
options->dialog->height,
|
||||
options->dialog->interpolation,
|
||||
gimp_progress_update_and_flush, progress);
|
||||
progress);
|
||||
|
||||
gimp_progress_end (progress);
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "core/gimplist.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
#include "core/gimpundostack.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "text/gimptext.h"
|
||||
#include "text/gimptextlayer.h"
|
||||
|
@ -56,7 +57,6 @@
|
|||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "tools/gimptexttool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
@ -1087,18 +1087,18 @@ scale_layer_query_ok_callback (GtkWidget *widget,
|
|||
|
||||
gtk_widget_set_sensitive (options->dialog->shell, FALSE);
|
||||
|
||||
progress = gimp_progress_start (options->gdisp,
|
||||
_("Scaling..."),
|
||||
TRUE, NULL, NULL);
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (options->gdisp),
|
||||
_("Scaling..."), FALSE);
|
||||
|
||||
gimp_item_scale_by_origin (GIMP_ITEM (layer),
|
||||
options->dialog->width,
|
||||
options->dialog->height,
|
||||
options->dialog->interpolation,
|
||||
gimp_progress_update_and_flush, progress,
|
||||
progress,
|
||||
TRUE);
|
||||
|
||||
gimp_progress_end (progress);
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_image_flush (gimage);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
|
@ -61,6 +62,7 @@ plug_in_run_cmd_callback (GtkAction *action,
|
|||
Gimp *gimp;
|
||||
ProcRecord *proc_rec;
|
||||
Argument *args;
|
||||
GimpDisplay *gdisp = NULL;
|
||||
gint gdisp_ID = -1;
|
||||
gint i;
|
||||
gint argc;
|
||||
|
@ -93,13 +95,13 @@ plug_in_run_cmd_callback (GtkAction *action,
|
|||
if (proc_rec->num_args >= 2 &&
|
||||
proc_rec->args[1].arg_type == GIMP_PDB_IMAGE)
|
||||
{
|
||||
GimpDisplay *gdisplay = action_data_get_display (data);
|
||||
gdisp = action_data_get_display (data);
|
||||
|
||||
if (gdisplay)
|
||||
if (gdisp)
|
||||
{
|
||||
gdisp_ID = gimp_display_get_ID (gdisplay);
|
||||
gdisp_ID = gimp_display_get_ID (gdisp);
|
||||
|
||||
args[1].value.pdb_int = gimp_image_get_ID (gdisplay->gimage);
|
||||
args[1].value.pdb_int = gimp_image_get_ID (gdisp->gimage);
|
||||
argc++;
|
||||
|
||||
if (proc_rec->num_args >= 2 &&
|
||||
|
@ -107,7 +109,7 @@ plug_in_run_cmd_callback (GtkAction *action,
|
|||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gdisplay->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (drawable)
|
||||
{
|
||||
|
@ -136,6 +138,7 @@ plug_in_run_cmd_callback (GtkAction *action,
|
|||
|
||||
/* run the plug-in procedure */
|
||||
plug_in_run (gimp, gimp_get_user_context (gimp),
|
||||
gdisp ? GIMP_PROGRESS (gdisp) : NULL,
|
||||
proc_rec, args, argc, FALSE, TRUE, gdisp_ID);
|
||||
|
||||
/* remember only "standard" plug-ins */
|
||||
|
@ -171,6 +174,7 @@ plug_in_repeat_cmd_callback (GtkAction *action,
|
|||
|
||||
plug_in_repeat (gdisp->gimage->gimp,
|
||||
gimp_get_user_context (gdisp->gimage->gimp),
|
||||
GIMP_PROGRESS (gdisp),
|
||||
gimp_display_get_ID (gdisp),
|
||||
gimp_image_get_ID (gdisp->gimage),
|
||||
gimp_item_get_ID (GIMP_ITEM (drawable)),
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-merge.h"
|
||||
#include "core/gimpprogress.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
@ -255,6 +256,7 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
|
|||
args[2].value.pdb_int = -1; /* unused */
|
||||
|
||||
plug_in_run (gimage->gimp, action_data_get_context (data),
|
||||
gdisp ? GIMP_PROGRESS (gdisp) : NULL,
|
||||
proc_rec, args, 3, FALSE, TRUE,
|
||||
gdisp ? gdisp->ID : 0);
|
||||
|
||||
|
|
|
@ -334,6 +334,7 @@ app_run (const gchar *full_prog_name,
|
|||
|
||||
gimage = file_open_with_display (gimp,
|
||||
gimp_get_user_context (gimp),
|
||||
NULL,
|
||||
uri,
|
||||
&status, &error);
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ batch_run_cmd (Gimp *gimp,
|
|||
args[0].value.pdb_int = GIMP_RUN_NONINTERACTIVE;
|
||||
args[1].value.pdb_pointer = (gpointer) cmd;
|
||||
|
||||
vals = procedural_db_execute (gimp, gimp_get_user_context (gimp),
|
||||
vals = procedural_db_execute (gimp, gimp_get_user_context (gimp), NULL,
|
||||
"plug_in_script_fu_eval", args);
|
||||
|
||||
switch (vals[0].value.pdb_int)
|
||||
|
@ -184,7 +184,7 @@ batch_perl_server (Gimp *gimp,
|
|||
args[1].value.pdb_int = flags;
|
||||
args[2].value.pdb_int = extra;
|
||||
|
||||
vals = procedural_db_execute (gimp, gimp_get_user_context (gimp),
|
||||
vals = procedural_db_execute (gimp, gimp_get_user_context (gimp), NULL,
|
||||
"extension_perl_server", args);
|
||||
|
||||
switch (vals[0].value.pdb_int)
|
||||
|
|
|
@ -188,6 +188,8 @@ libappcore_a_sources = \
|
|||
gimppickable.h \
|
||||
gimppreviewcache.c \
|
||||
gimppreviewcache.h \
|
||||
gimpprogress.c \
|
||||
gimpprogress.h \
|
||||
gimpprojection.c \
|
||||
gimpprojection.h \
|
||||
gimpprojection-construct.c \
|
||||
|
|
|
@ -121,6 +121,7 @@ typedef struct _GimpProjection GimpProjection;
|
|||
/* interfaces */
|
||||
|
||||
typedef struct _GimpPickable GimpPickable; /* dummy typedef */
|
||||
typedef struct _GimpProgress GimpProgress; /* dummy typedef */
|
||||
|
||||
|
||||
/* non-object types */
|
||||
|
@ -129,7 +130,6 @@ typedef struct _GimpArea GimpArea;
|
|||
typedef struct _GimpCoords GimpCoords;
|
||||
typedef struct _GimpGradientSegment GimpGradientSegment;
|
||||
typedef struct _GimpGuide GimpGuide;
|
||||
typedef struct _GimpProgress GimpProgress;
|
||||
typedef guint32 GimpTattoo;
|
||||
typedef struct _GimpPaletteEntry GimpPaletteEntry;
|
||||
typedef struct _GimpPlugInDebug GimpPlugInDebug;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -53,10 +54,8 @@ gimp_gui_init (Gimp *gimp)
|
|||
gimp->gui.menus_init = NULL;
|
||||
gimp->gui.menus_create = NULL;
|
||||
gimp->gui.menus_delete = NULL;
|
||||
gimp->gui.progress_start = NULL;
|
||||
gimp->gui.progress_restart = NULL;
|
||||
gimp->gui.progress_update = NULL;
|
||||
gimp->gui.progress_end = NULL;
|
||||
gimp->gui.progress_new = NULL;
|
||||
gimp->gui.progress_free = NULL;
|
||||
gimp->gui.pdb_dialog_set = NULL;
|
||||
gimp->gui.pdb_dialog_close = NULL;
|
||||
gimp->gui.pdb_dialogs_check = NULL;
|
||||
|
@ -320,59 +319,25 @@ gimp_menus_delete_entry (Gimp *gimp,
|
|||
}
|
||||
|
||||
GimpProgress *
|
||||
gimp_start_progress (Gimp *gimp,
|
||||
gint gdisp_ID,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data)
|
||||
gimp_new_progress (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
|
||||
if (gimp->gui.progress_start)
|
||||
return gimp->gui.progress_start (gimp, gdisp_ID, message,
|
||||
cancel_cb, cancel_data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GimpProgress *
|
||||
gimp_restart_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (progress != NULL, NULL);
|
||||
|
||||
if (gimp->gui.progress_restart)
|
||||
return gimp->gui.progress_restart (gimp, progress, message,
|
||||
cancel_cb, cancel_data);
|
||||
if (gimp->gui.progress_new)
|
||||
return gimp->gui.progress_new (gimp);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_update_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
gimp_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (progress != NULL);
|
||||
g_return_if_fail (GIMP_IS_PROGRESS (progress));
|
||||
|
||||
if (gimp->gui.progress_update)
|
||||
gimp->gui.progress_update (gimp, progress, percentage);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_end_progress (Gimp *gimp,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
if (gimp->gui.progress_end)
|
||||
gimp->gui.progress_end (gimp, progress);
|
||||
if (gimp->gui.progress_free)
|
||||
gimp->gui.progress_free (gimp, progress);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -62,20 +62,8 @@ struct _GimpGui
|
|||
void (* menus_delete) (Gimp *gimp,
|
||||
PlugInProcDef *proc_def);
|
||||
|
||||
GimpProgress * (* progress_start) (Gimp *gimp,
|
||||
gint gdisp_ID,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * (* progress_restart) (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
void (* progress_update) (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void (* progress_end) (Gimp *gimp,
|
||||
GimpProgress * (* progress_new) (Gimp *gimp);
|
||||
void (* progress_free) (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
|
||||
gboolean (* pdb_dialog_new) (Gimp *gimp,
|
||||
|
@ -135,20 +123,8 @@ void gimp_menus_create_entry (Gimp *gimp,
|
|||
void gimp_menus_delete_entry (Gimp *gimp,
|
||||
PlugInProcDef *proc_def);
|
||||
|
||||
GimpProgress * gimp_start_progress (Gimp *gimp,
|
||||
gint gdisp_ID,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * gimp_restart_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
void gimp_update_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void gimp_end_progress (Gimp *gimp,
|
||||
GimpProgress * gimp_new_progress (Gimp *gimp);
|
||||
void gimp_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
|
||||
const gchar * gimp_get_program_class (Gimp *gimp);
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpselection.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
@ -110,8 +111,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
PixelRegion destPR;
|
||||
|
@ -148,6 +148,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (orig_tiles != NULL, NULL);
|
||||
g_return_val_if_fail (matrix != NULL, NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
|
@ -302,8 +303,10 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
|
||||
for (y = y1; y < y2; y++)
|
||||
{
|
||||
if (progress_callback && !(y & 0xf))
|
||||
(* progress_callback) (y1, y2, y, progress_data);
|
||||
if (progress && !(y & 0xf))
|
||||
gimp_progress_set_value (progress,
|
||||
(gdouble) (y - y1) /
|
||||
(gdouble) (y2 - y1));
|
||||
|
||||
/* set up inverse transform steps */
|
||||
tu[0] = uinc * x1 + m.coeff[0][1] * y + m.coeff[0][2];
|
||||
|
@ -887,7 +890,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
supersample,
|
||||
recursion_level,
|
||||
FALSE,
|
||||
NULL, NULL);
|
||||
NULL);
|
||||
|
||||
/* Free the cut/copied buffer */
|
||||
tile_manager_unref (orig_tiles);
|
||||
|
|
|
@ -85,8 +85,7 @@ static void gimp_channel_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static void gimp_channel_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -112,8 +111,7 @@ static void gimp_channel_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static gboolean gimp_channel_stroke (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
GimpContext *context,
|
||||
|
@ -510,8 +508,7 @@ gimp_channel_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
|
||||
{
|
||||
|
@ -521,8 +518,7 @@ gimp_channel_scale (GimpItem *item,
|
|||
|
||||
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interpolation_type,
|
||||
progress_callback, progress_data);
|
||||
interpolation_type, progress);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -581,8 +577,7 @@ gimp_channel_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
if (G_TYPE_FROM_INSTANCE (item) == GIMP_TYPE_CHANNEL)
|
||||
clip_result = TRUE;
|
||||
|
@ -590,8 +585,7 @@ gimp_channel_transform (GimpItem *item,
|
|||
GIMP_ITEM_CLASS (parent_class)->transform (item, context, matrix, direction,
|
||||
interpolation_type,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback, progress_data);
|
||||
clip_result, progress);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "gimpdrawable-blend.h"
|
||||
#include "gimpgradient.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -117,8 +118,7 @@ static void gradient_precalc_shapeburst (GimpImage *gimage,
|
|||
GimpDrawable *drawable,
|
||||
PixelRegion *PR,
|
||||
gdouble dist,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
static void gradient_render_pixel (gdouble x,
|
||||
gdouble y,
|
||||
|
@ -148,8 +148,7 @@ static void gradient_fill_region (GimpImage *gimage,
|
|||
gdouble sy,
|
||||
gdouble ex,
|
||||
gdouble ey,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
/* variables for the shapeburst algs */
|
||||
|
@ -186,8 +185,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
|
|||
gdouble starty,
|
||||
gdouble endx,
|
||||
gdouble endy,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
TileManager *buf_tiles;
|
||||
|
@ -197,6 +195,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
|
|||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
|
@ -223,7 +222,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
|
|||
supersample, max_depth, threshold, dither,
|
||||
(startx - x1), (starty - y1),
|
||||
(endx - x1), (endy - y1),
|
||||
progress_callback, progress_data);
|
||||
progress);
|
||||
|
||||
if (distR.tiles)
|
||||
{
|
||||
|
@ -572,12 +571,11 @@ gradient_calc_shapeburst_dimpled_factor (gdouble x,
|
|||
}
|
||||
|
||||
static void
|
||||
gradient_precalc_shapeburst (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
PixelRegion *PR,
|
||||
gdouble dist,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
gradient_precalc_shapeburst (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
PixelRegion *PR,
|
||||
gdouble dist,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpChannel *mask;
|
||||
PixelRegion tempR;
|
||||
|
@ -634,7 +632,10 @@ gradient_precalc_shapeburst (GimpImage *gimage,
|
|||
|
||||
pixel_region_init (&tempR, tempR.tiles, 0, 0, PR->w, PR->h, TRUE);
|
||||
pixel_region_init (&distR, distR.tiles, 0, 0, PR->w, PR->h, TRUE);
|
||||
max_iteration = shapeburst_region (&tempR, &distR, progress_callback, progress_data);
|
||||
max_iteration = shapeburst_region (&tempR, &distR,
|
||||
progress ?
|
||||
gimp_progress_update_and_flush : NULL,
|
||||
progress);
|
||||
|
||||
/* normalize the shapeburst with the max iteration */
|
||||
if (max_iteration > 0)
|
||||
|
@ -903,8 +904,7 @@ gradient_fill_region (GimpImage *gimage,
|
|||
gdouble sy,
|
||||
gdouble ex,
|
||||
gdouble ey,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
RenderBlendData rbd;
|
||||
gint x, y;
|
||||
|
@ -986,8 +986,7 @@ gradient_fill_region (GimpImage *gimage,
|
|||
case GIMP_GRADIENT_SHAPEBURST_SPHERICAL:
|
||||
case GIMP_GRADIENT_SHAPEBURST_DIMPLED:
|
||||
rbd.dist = sqrt (SQR (ex - sx) + SQR (ey - sy));
|
||||
gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist,
|
||||
progress_callback, progress_data);
|
||||
gradient_precalc_shapeburst (gimage, drawable, PR, rbd.dist, progress);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1024,14 +1023,15 @@ gradient_fill_region (GimpImage *gimage,
|
|||
max_depth, threshold,
|
||||
gradient_render_pixel, &rbd,
|
||||
gradient_put_pixel, &ppd,
|
||||
progress_callback, progress_data);
|
||||
gimp_progress_update_and_flush,
|
||||
progress);
|
||||
|
||||
g_free (ppd.row_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
gint max_progress = PR->w * PR->h;
|
||||
gint progress = 0;
|
||||
gint max_progress = PR->w * PR->h;
|
||||
gint curr_progress = 0;
|
||||
|
||||
for (pr = pixel_regions_register (1, PR);
|
||||
pr != NULL;
|
||||
|
@ -1129,10 +1129,12 @@ gradient_fill_region (GimpImage *gimage,
|
|||
}
|
||||
}
|
||||
|
||||
if (progress_callback)
|
||||
if (progress)
|
||||
{
|
||||
progress += PR->w * PR->h;
|
||||
(* progress_callback) (0, max_progress, progress, progress_data);
|
||||
curr_progress += PR->w * PR->h;
|
||||
|
||||
gimp_progress_update_and_flush (0, max_progress, curr_progress,
|
||||
progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@ void gimp_drawable_blend (GimpDrawable *drawable,
|
|||
gdouble starty,
|
||||
gdouble endx,
|
||||
gdouble endy,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
#endif /* __GIMP_DRAWABLE_BLEND_H__ */
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpselection.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
@ -110,8 +111,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
PixelRegion destPR;
|
||||
|
@ -148,6 +148,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (orig_tiles != NULL, NULL);
|
||||
g_return_val_if_fail (matrix != NULL, NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
|
||||
gimage = gimp_item_get_image (GIMP_ITEM (drawable));
|
||||
|
||||
|
@ -302,8 +303,10 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
|
||||
for (y = y1; y < y2; y++)
|
||||
{
|
||||
if (progress_callback && !(y & 0xf))
|
||||
(* progress_callback) (y1, y2, y, progress_data);
|
||||
if (progress && !(y & 0xf))
|
||||
gimp_progress_set_value (progress,
|
||||
(gdouble) (y - y1) /
|
||||
(gdouble) (y2 - y1));
|
||||
|
||||
/* set up inverse transform steps */
|
||||
tu[0] = uinc * x1 + m.coeff[0][1] * y + m.coeff[0][2];
|
||||
|
@ -887,7 +890,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
supersample,
|
||||
recursion_level,
|
||||
FALSE,
|
||||
NULL, NULL);
|
||||
NULL);
|
||||
|
||||
/* Free the cut/copied buffer */
|
||||
tile_manager_unref (orig_tiles);
|
||||
|
|
|
@ -42,8 +42,7 @@ TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *draw
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
TileManager * gimp_drawable_transform_tiles_flip (GimpDrawable *drawable,
|
||||
GimpContext *context,
|
||||
TileManager *orig_tiles,
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "gimppattern.h"
|
||||
#include "gimppickable.h"
|
||||
#include "gimppreviewcache.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -84,8 +85,7 @@ static void gimp_drawable_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static void gimp_drawable_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -111,8 +111,7 @@ static void gimp_drawable_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
static guchar * gimp_drawable_get_color_at (GimpPickable *pickable,
|
||||
gint x,
|
||||
|
@ -401,8 +400,7 @@ gimp_drawable_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpDrawable *drawable = GIMP_DRAWABLE (item);
|
||||
PixelRegion srcPR, destPR;
|
||||
|
@ -425,7 +423,8 @@ gimp_drawable_scale (GimpItem *item,
|
|||
scale_region (&srcPR, &destPR,
|
||||
gimp_drawable_is_indexed (drawable) ?
|
||||
GIMP_INTERPOLATION_NONE : interpolation_type,
|
||||
progress_callback, progress_data);
|
||||
progress ? gimp_progress_update_and_flush : NULL,
|
||||
progress);
|
||||
|
||||
gimp_drawable_set_tiles_full (drawable, TRUE, NULL,
|
||||
new_tiles, gimp_drawable_type (drawable),
|
||||
|
@ -573,8 +572,7 @@ gimp_drawable_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpDrawable *drawable = GIMP_DRAWABLE (item);
|
||||
TileManager *tiles;
|
||||
|
@ -592,8 +590,7 @@ gimp_drawable_transform (GimpItem *item,
|
|||
interpolation_type,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback,
|
||||
progress_data);
|
||||
progress);
|
||||
|
||||
tile_manager_set_offsets (drawable->tiles, old_off_x, old_off_y);
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@
|
|||
#include "gimplist.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimppalette.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "cpercep.h"
|
||||
#include "gimpimage-convert-fsdither.h"
|
||||
|
@ -478,11 +479,9 @@ struct _QuantizeObj
|
|||
gboolean want_alpha_dither;
|
||||
int error_freedom; /* 0=much bleed, 1=controlled bleed */
|
||||
|
||||
GimpImageConvertProgressCallback progress_callback;
|
||||
gpointer progress_data;
|
||||
|
||||
gint nth_layer;
|
||||
gint n_layers;
|
||||
GimpProgress *progress;
|
||||
gint nth_layer;
|
||||
gint n_layers;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
@ -518,35 +517,30 @@ typedef struct
|
|||
|
||||
|
||||
|
||||
static void zero_histogram_gray (CFHistogram histogram);
|
||||
static void zero_histogram_rgb (CFHistogram histogram);
|
||||
static void generate_histogram_gray (CFHistogram hostogram,
|
||||
GimpLayer *layer,
|
||||
gboolean alpha_dither);
|
||||
static void generate_histogram_rgb (CFHistogram histogram,
|
||||
GimpLayer *layer,
|
||||
gint col_limit,
|
||||
gboolean alpha_dither,
|
||||
GimpImageConvertProgressCallback
|
||||
progress_callback,
|
||||
gpointer progress_data,
|
||||
gint nth_layer,
|
||||
gint n_layers);
|
||||
static void zero_histogram_gray (CFHistogram histogram);
|
||||
static void zero_histogram_rgb (CFHistogram histogram);
|
||||
static void generate_histogram_gray (CFHistogram hostogram,
|
||||
GimpLayer *layer,
|
||||
gboolean alpha_dither);
|
||||
static void generate_histogram_rgb (CFHistogram histogram,
|
||||
GimpLayer *layer,
|
||||
gint col_limit,
|
||||
gboolean alpha_dither,
|
||||
GimpProgress *progress,
|
||||
gint nth_layer,
|
||||
gint n_layers);
|
||||
|
||||
static QuantizeObj* initialize_median_cut (GimpImageBaseType old_type,
|
||||
gint num_cols,
|
||||
GimpConvertDitherType dither_type,
|
||||
GimpConvertPaletteType palette_type,
|
||||
gboolean alpha_dither,
|
||||
GimpImageConvertProgressCallback
|
||||
progress_callback,
|
||||
gpointer progress_data);
|
||||
static QuantizeObj * initialize_median_cut (GimpImageBaseType old_type,
|
||||
gint num_cols,
|
||||
GimpConvertDitherType dither_type,
|
||||
GimpConvertPaletteType palette_type,
|
||||
gboolean alpha_dither,
|
||||
GimpProgress *progress);
|
||||
|
||||
static void
|
||||
compute_color_lin8 (QuantizeObj *quantobj,
|
||||
CFHistogram histogram,
|
||||
boxptr boxp,
|
||||
const int icolor);
|
||||
static void compute_color_lin8 (QuantizeObj *quantobj,
|
||||
CFHistogram histogram,
|
||||
boxptr boxp,
|
||||
const int icolor);
|
||||
|
||||
|
||||
static guchar found_cols[MAXNUMCOLORS][3];
|
||||
|
@ -759,8 +753,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
gboolean remove_dups,
|
||||
GimpConvertPaletteType palette_type,
|
||||
GimpPalette *custom_palette,
|
||||
GimpImageConvertProgressCallback progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
QuantizeObj *quantobj = NULL;
|
||||
GimpLayer *layer;
|
||||
|
@ -773,6 +766,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (new_type != gimp_image_base_type (gimage));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
theCustomPalette = custom_palette;
|
||||
|
||||
|
@ -829,9 +823,8 @@ gimp_image_convert (GimpImage *gimage,
|
|||
}
|
||||
|
||||
quantobj = initialize_median_cut (old_type, num_cols, dither,
|
||||
palette_type, alpha_dither,
|
||||
progress_callback,
|
||||
progress_data);
|
||||
palette_type, alpha_dither,
|
||||
progress);
|
||||
|
||||
if (palette_type == GIMP_MAKE_PALETTE)
|
||||
{
|
||||
|
@ -860,9 +853,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
else
|
||||
generate_histogram_rgb (quantobj->histogram,
|
||||
layer, num_cols, alpha_dither,
|
||||
progress_callback,
|
||||
progress_data,
|
||||
nth_layer, n_layers);
|
||||
progress, nth_layer, n_layers);
|
||||
/*
|
||||
* Note: generate_histogram_rgb may set needs_quantize if
|
||||
* the image contains more colours than the limit specified
|
||||
|
@ -871,6 +862,10 @@ gimp_image_convert (GimpImage *gimage,
|
|||
}
|
||||
}
|
||||
|
||||
if (progress)
|
||||
gimp_progress_set_text (progress,
|
||||
_("Converting to indexed (stage 2)..."));
|
||||
|
||||
if (old_type == GIMP_RGB &&
|
||||
! needs_quantize &&
|
||||
palette_type == GIMP_MAKE_PALETTE)
|
||||
|
@ -890,8 +885,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
GIMP_NODESTRUCT_DITHER,
|
||||
palette_type,
|
||||
alpha_dither,
|
||||
progress_callback,
|
||||
progress_data);
|
||||
progress);
|
||||
/* We can skip the first pass (palette creation) */
|
||||
|
||||
quantobj->actual_number_of_colors = num_found_cols;
|
||||
|
@ -912,6 +906,10 @@ gimp_image_convert (GimpImage *gimage,
|
|||
color_quicksort);
|
||||
}
|
||||
|
||||
if (progress)
|
||||
gimp_progress_set_text (progress,
|
||||
_("Converting to indexed (stage 3)..."));
|
||||
|
||||
/* Initialise data which must persist across indexed layer iterations */
|
||||
switch (new_type)
|
||||
{
|
||||
|
@ -1301,14 +1299,13 @@ generate_histogram_gray (CFHistogram histogram,
|
|||
|
||||
|
||||
static void
|
||||
generate_histogram_rgb (CFHistogram histogram,
|
||||
GimpLayer *layer,
|
||||
gint col_limit,
|
||||
gboolean alpha_dither,
|
||||
GimpImageConvertProgressCallback progress_callback,
|
||||
gpointer progress_data,
|
||||
gint nth_layer,
|
||||
gint n_layers)
|
||||
generate_histogram_rgb (CFHistogram histogram,
|
||||
GimpLayer *layer,
|
||||
gint col_limit,
|
||||
gboolean alpha_dither,
|
||||
GimpProgress *progress,
|
||||
gint nth_layer,
|
||||
gint n_layers)
|
||||
{
|
||||
PixelRegion srcPR;
|
||||
guchar *data;
|
||||
|
@ -1335,8 +1332,8 @@ generate_histogram_rgb (CFHistogram histogram,
|
|||
|
||||
layer_size = GIMP_ITEM (layer)->width * GIMP_ITEM (layer)->height;
|
||||
|
||||
if (progress_callback)
|
||||
progress_callback (1, 0.0, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, 0.0);
|
||||
|
||||
for (pr = pixel_regions_register (1, &srcPR);
|
||||
pr != NULL;
|
||||
|
@ -1483,11 +1480,10 @@ generate_histogram_rgb (CFHistogram histogram,
|
|||
}
|
||||
}
|
||||
|
||||
if (progress_callback)
|
||||
progress_callback (1,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers,
|
||||
progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers);
|
||||
}
|
||||
|
||||
/* g_print ("O: col_limit = %d, nfc = %d\n", col_limit, num_found_cols);*/
|
||||
|
@ -1496,10 +1492,10 @@ generate_histogram_rgb (CFHistogram histogram,
|
|||
|
||||
|
||||
static boxptr
|
||||
find_split_candidate (const boxptr boxlist,
|
||||
const int numboxes,
|
||||
axisType *which_axis,
|
||||
const int desired_colors)
|
||||
find_split_candidate (const boxptr boxlist,
|
||||
const int numboxes,
|
||||
axisType *which_axis,
|
||||
const int desired_colors)
|
||||
{
|
||||
boxptr boxp;
|
||||
int i;
|
||||
|
@ -2123,16 +2119,15 @@ median_cut_gray (CFHistogram histogram,
|
|||
}
|
||||
|
||||
static int
|
||||
median_cut_rgb (CFHistogram histogram,
|
||||
boxptr boxlist,
|
||||
int numboxes,
|
||||
int desired_colors,
|
||||
GimpImageConvertProgressCallback progress_callback,
|
||||
gpointer progress_data)
|
||||
median_cut_rgb (CFHistogram histogram,
|
||||
boxptr boxlist,
|
||||
int numboxes,
|
||||
int desired_colors,
|
||||
GimpProgress *progress)
|
||||
/* Repeatedly select and split the largest box until we have enough boxes */
|
||||
{
|
||||
int lb;
|
||||
boxptr b1,b2;
|
||||
int lb;
|
||||
boxptr b1, b2;
|
||||
axisType which_axis;
|
||||
|
||||
while (numboxes < desired_colors)
|
||||
|
@ -2180,9 +2175,8 @@ median_cut_rgb (CFHistogram histogram,
|
|||
/* Update stats for boxes */
|
||||
numboxes++;
|
||||
|
||||
if (progress_callback)
|
||||
progress_callback (2, ((gdouble) numboxes) / desired_colors,
|
||||
progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, (gdouble) numboxes / desired_colors);
|
||||
|
||||
update_box_rgb (histogram, b1, desired_colors - numboxes);
|
||||
update_box_rgb (histogram, b2, desired_colors - numboxes);
|
||||
|
@ -2413,8 +2407,7 @@ select_colors_rgb (QuantizeObj *quantobj,
|
|||
update_box_rgb (histogram, &boxlist[0], quantobj->desired_number_of_colors);
|
||||
/* Perform median-cut to produce final box list */
|
||||
numboxes = median_cut_rgb (histogram, boxlist, numboxes, desired,
|
||||
quantobj->progress_callback,
|
||||
quantobj->progress_data);
|
||||
quantobj->progress);
|
||||
|
||||
quantobj->actual_number_of_colors = numboxes;
|
||||
/* Compute the representative color for each box, fill colormap */
|
||||
|
@ -3154,11 +3147,10 @@ median_cut_pass2_no_dither_rgb (QuantizeObj *quantobj,
|
|||
}
|
||||
}
|
||||
|
||||
if (quantobj->progress_callback)
|
||||
quantobj->progress_callback (3,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers,
|
||||
quantobj->progress_data);
|
||||
if (quantobj->progress)
|
||||
gimp_progress_set_value (quantobj->progress,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3289,11 +3281,10 @@ median_cut_pass2_fixed_dither_rgb (QuantizeObj *quantobj,
|
|||
}
|
||||
}
|
||||
|
||||
if (quantobj->progress_callback)
|
||||
quantobj->progress_callback (3,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers,
|
||||
quantobj->progress_data);
|
||||
if (quantobj->progress)
|
||||
gimp_progress_set_value (quantobj->progress,
|
||||
(nth_layer + ((gdouble) total_size)/
|
||||
layer_size) / (gdouble) n_layers);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4029,11 +4020,10 @@ median_cut_pass2_fs_dither_rgb (QuantizeObj *quantobj,
|
|||
|
||||
pixel_region_set_row (&destPR, 0, row, width, dest_buf);
|
||||
|
||||
if (quantobj->progress_callback)
|
||||
quantobj->progress_callback (3,
|
||||
(nth_layer + ((gdouble) row) /
|
||||
height) / (gdouble) n_layers,
|
||||
quantobj->progress_data);
|
||||
if (quantobj->progress)
|
||||
gimp_progress_set_value (quantobj->progress,
|
||||
(nth_layer + ((gdouble) row) /
|
||||
height) / (gdouble) n_layers);
|
||||
}
|
||||
|
||||
g_free (error_limiter - 255);
|
||||
|
@ -4063,9 +4053,7 @@ initialize_median_cut (GimpImageBaseType type,
|
|||
GimpConvertDitherType dither_type,
|
||||
GimpConvertPaletteType palette_type,
|
||||
gboolean want_alpha_dither,
|
||||
GimpImageConvertProgressCallback progress_callback,
|
||||
gpointer progress_data
|
||||
)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
QuantizeObj * quantobj;
|
||||
|
||||
|
@ -4082,9 +4070,7 @@ initialize_median_cut (GimpImageBaseType type,
|
|||
|
||||
quantobj->desired_number_of_colors = num_colors;
|
||||
quantobj->want_alpha_dither = want_alpha_dither;
|
||||
|
||||
quantobj->progress_callback = progress_callback;
|
||||
quantobj->progress_data = progress_data;
|
||||
quantobj->progress = progress;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
@ -22,10 +22,6 @@
|
|||
|
||||
#define MAXNUMCOLORS 256
|
||||
|
||||
typedef void (* GimpImageConvertProgressCallback) (gint stage,
|
||||
gdouble progress,
|
||||
gpointer data);
|
||||
|
||||
|
||||
void gimp_image_convert (GimpImage *gimage,
|
||||
GimpImageBaseType new_type,
|
||||
|
@ -38,8 +34,7 @@ void gimp_image_convert (GimpImage *gimage,
|
|||
gboolean remove_dups,
|
||||
GimpConvertPaletteType palette_type,
|
||||
GimpPalette *custom_palette,
|
||||
GimpImageConvertProgressCallback progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
void gimp_drawable_convert_rgb (GimpDrawable *drawable,
|
||||
TileManager *new_tiles,
|
||||
|
|
|
@ -31,23 +31,24 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
|
||||
void
|
||||
gimp_image_flip (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpOrientationType flip_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GList *list;
|
||||
gdouble axis;
|
||||
gint progress_max;
|
||||
gint progress_current = 1;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
|
@ -82,8 +83,8 @@ gimp_image_flip (GimpImage *gimage,
|
|||
|
||||
gimp_item_flip (item, context, flip_type, axis, TRUE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Flip all vectors */
|
||||
|
@ -95,16 +96,16 @@ gimp_image_flip (GimpImage *gimage,
|
|||
|
||||
gimp_item_flip (item, context, flip_type, axis, FALSE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Don't forget the selection mask! */
|
||||
gimp_item_flip (GIMP_ITEM (gimp_image_get_mask (gimage)), context,
|
||||
flip_type, axis, TRUE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Flip all layers */
|
||||
for (list = GIMP_LIST (gimage->layers)->list;
|
||||
|
@ -115,8 +116,8 @@ gimp_image_flip (GimpImage *gimage,
|
|||
|
||||
gimp_item_flip (item, context, flip_type, axis, FALSE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Flip all Guides */
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
void gimp_image_flip (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpOrientationType flip_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_FLIP_H__ */
|
||||
|
|
|
@ -31,27 +31,28 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
void
|
||||
gimp_image_resize (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data)
|
||||
gimp_image_resize (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GList *list;
|
||||
gint progress_max;
|
||||
gint progress_current = 1;
|
||||
GList *list;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (new_width > 0 && new_height > 0);
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
|
@ -84,8 +85,8 @@ gimp_image_resize (GimpImage *gimage,
|
|||
gimp_item_resize (item, context,
|
||||
new_width, new_height, offset_x, offset_y);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Resize all vectors */
|
||||
|
@ -98,16 +99,16 @@ gimp_image_resize (GimpImage *gimage,
|
|||
gimp_item_resize (item, context,
|
||||
new_width, new_height, offset_x, offset_y);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Don't forget the selection mask! */
|
||||
gimp_item_resize (GIMP_ITEM (gimp_image_get_mask (gimage)), context,
|
||||
new_width, new_height, offset_x, offset_y);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Reposition all layers */
|
||||
for (list = GIMP_LIST (gimage->layers)->list;
|
||||
|
@ -118,8 +119,8 @@ gimp_image_resize (GimpImage *gimage,
|
|||
|
||||
gimp_item_translate (item, offset_x, offset_y, TRUE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Reposition or remove all guides */
|
||||
|
|
|
@ -20,14 +20,13 @@
|
|||
#define __GIMP_IMAGE_RESIZE_H__
|
||||
|
||||
|
||||
void gimp_image_resize (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data);
|
||||
void gimp_image_resize (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
gint offset_x,
|
||||
gint offset_y,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_RESIZE_H__ */
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
|
||||
static void gimp_image_rotate_item_offset (GimpImage *gimage,
|
||||
|
@ -46,21 +47,21 @@ void
|
|||
gimp_image_rotate (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpRotationType rotate_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GList *list;
|
||||
gdouble center_x;
|
||||
gdouble center_y;
|
||||
gint progress_max;
|
||||
gint progress_current = 1;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
gint new_image_width;
|
||||
gint new_image_height;
|
||||
gboolean size_changed;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
|
@ -109,8 +110,8 @@ gimp_image_rotate (GimpImage *gimage,
|
|||
item->offset_x = 0;
|
||||
item->offset_y = 0;
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Rotate all vectors */
|
||||
|
@ -132,8 +133,8 @@ gimp_image_rotate (GimpImage *gimage,
|
|||
(new_image_height - gimage->height) / 2,
|
||||
FALSE);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Don't forget the selection mask! */
|
||||
|
@ -143,8 +144,8 @@ gimp_image_rotate (GimpImage *gimage,
|
|||
GIMP_ITEM (gimage->selection_mask)->offset_x = 0;
|
||||
GIMP_ITEM (gimage->selection_mask)->offset_y = 0;
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Rotate all layers */
|
||||
for (list = GIMP_LIST (gimage->layers)->list;
|
||||
|
@ -161,8 +162,8 @@ gimp_image_rotate (GimpImage *gimage,
|
|||
|
||||
gimp_image_rotate_item_offset (gimage, rotate_type, item, off_x, off_y);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Rotate all Guides */
|
||||
|
|
|
@ -23,8 +23,7 @@
|
|||
void gimp_image_rotate (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpRotationType rotate_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
#endif /* __GIMP_IMAGE_ROTATE_H__ */
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "gimpimage-undo-push.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
@ -41,8 +42,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
gint new_width,
|
||||
gint new_height,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItem *item;
|
||||
GList *list;
|
||||
|
@ -51,11 +51,12 @@ gimp_image_scale (GimpImage *gimage,
|
|||
gint old_height;
|
||||
gdouble img_scale_w = 1.0;
|
||||
gdouble img_scale_h = 1.0;
|
||||
gint progress_max;
|
||||
gint progress_current = 1;
|
||||
gdouble progress_max;
|
||||
gdouble progress_current = 1.0;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGE (gimage));
|
||||
g_return_if_fail (new_width > 0 && new_height > 0);
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimp_set_busy (gimage->gimp);
|
||||
|
||||
|
@ -92,10 +93,10 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_item_scale (item,
|
||||
new_width, new_height, 0, 0,
|
||||
interpolation_type, NULL, NULL);
|
||||
interpolation_type, NULL);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Scale all vectors */
|
||||
|
@ -107,19 +108,19 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
gimp_item_scale (item,
|
||||
new_width, new_height, 0, 0,
|
||||
interpolation_type, NULL, NULL);
|
||||
interpolation_type, NULL);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* Don't forget the selection mask! */
|
||||
gimp_item_scale (GIMP_ITEM (gimp_image_get_mask (gimage)),
|
||||
new_width, new_height, 0, 0,
|
||||
interpolation_type, NULL, NULL);
|
||||
interpolation_type, NULL);
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
|
||||
/* Scale all layers */
|
||||
for (list = GIMP_LIST (gimage->layers)->list;
|
||||
|
@ -130,7 +131,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
|
||||
if (! gimp_item_scale_by_factors (item,
|
||||
img_scale_w, img_scale_h,
|
||||
interpolation_type, NULL, NULL))
|
||||
interpolation_type, NULL))
|
||||
{
|
||||
/* Since 0 < img_scale_w, img_scale_h, failure due to one or more
|
||||
* vanishing scaled layer dimensions. Implicit delete implemented
|
||||
|
@ -140,8 +141,8 @@ gimp_image_scale (GimpImage *gimage,
|
|||
remove = g_list_prepend (remove, item);
|
||||
}
|
||||
|
||||
if (progress_func)
|
||||
(* progress_func) (0, progress_max, progress_current++, progress_data);
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, progress_current++ / progress_max);
|
||||
}
|
||||
|
||||
/* We defer removing layers lost to scaling until now so as not to mix
|
||||
|
|
|
@ -24,8 +24,7 @@ void gimp_image_scale (GimpImage *gimage,
|
|||
gint new_width,
|
||||
gint new_height,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_func,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
GimpImageScaleCheckType
|
||||
gimp_image_scale_check (const GimpImage *gimage,
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "gimpimage.h"
|
||||
#include "gimpimagefile.h"
|
||||
#include "gimpmarshal.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -55,6 +56,7 @@ enum
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
|
||||
static void gimp_imagefile_class_init (GimpImagefileClass *klass);
|
||||
static void gimp_imagefile_init (GimpImagefile *imagefile);
|
||||
static void gimp_imagefile_finalize (GObject *object);
|
||||
|
@ -233,12 +235,14 @@ gimp_imagefile_update (GimpImagefile *imagefile)
|
|||
void
|
||||
gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
gint size)
|
||||
{
|
||||
GimpThumbnail *thumbnail;
|
||||
|
||||
g_return_if_fail (GIMP_IS_IMAGEFILE (imagefile));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
if (! imagefile->gimp->config->layer_previews)
|
||||
return;
|
||||
|
@ -259,8 +263,7 @@ gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
|
|||
const gchar *mime_type = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
gimage = file_open_image (imagefile->gimp,
|
||||
context,
|
||||
gimage = file_open_image (imagefile->gimp, context, progress,
|
||||
thumbnail->image_uri,
|
||||
thumbnail->image_uri,
|
||||
NULL,
|
||||
|
|
|
@ -66,6 +66,7 @@ GimpImagefile * gimp_imagefile_new (Gimp *gimp,
|
|||
void gimp_imagefile_update (GimpImagefile *imagefile);
|
||||
void gimp_imagefile_create_thumbnail (GimpImagefile *imagefile,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
gint thumb_size);
|
||||
gboolean gimp_imagefile_save_thumbnail (GimpImagefile *imagefile,
|
||||
GimpImage *gimage);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "gimpitem.h"
|
||||
#include "gimpitem-linked.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
@ -134,8 +135,7 @@ gimp_item_linked_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
GList *linked_list;
|
||||
|
@ -144,6 +144,7 @@ gimp_item_linked_transform (GimpItem *item,
|
|||
g_return_if_fail (GIMP_IS_ITEM (item));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (gimp_item_get_linked (item) == TRUE);
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
gimage = gimp_item_get_image (item);
|
||||
|
||||
|
@ -156,8 +157,7 @@ gimp_item_linked_transform (GimpItem *item,
|
|||
matrix, direction,
|
||||
interpolation_type,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback, progress_data);
|
||||
clip_result, progress);
|
||||
|
||||
g_list_free (linked_list);
|
||||
}
|
||||
|
|
|
@ -55,8 +55,7 @@ void gimp_item_linked_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
GList * gimp_item_linked_get_list (GimpImage *gimage,
|
||||
GimpItem *item,
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "gimpmarshal.h"
|
||||
#include "gimppaintinfo.h"
|
||||
#include "gimpparasitelist.h"
|
||||
#include "gimpprogress.h"
|
||||
#include "gimpstrokeoptions.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
@ -83,8 +84,7 @@ static void gimp_item_real_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static void gimp_item_real_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -345,8 +345,7 @@ gimp_item_real_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
item->width = new_width;
|
||||
item->height = new_height;
|
||||
|
@ -700,13 +699,13 @@ gimp_item_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItemClass *item_class;
|
||||
GimpImage *gimage;
|
||||
|
||||
g_return_if_fail (GIMP_IS_ITEM (item));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
if (new_width < 1 || new_height < 1)
|
||||
return;
|
||||
|
@ -718,7 +717,7 @@ gimp_item_scale (GimpItem *item,
|
|||
item_class->scale_desc);
|
||||
|
||||
item_class->scale (item, new_width, new_height, new_offset_x, new_offset_y,
|
||||
interpolation, progress_callback, progress_data);
|
||||
interpolation, progress);
|
||||
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
@ -729,8 +728,7 @@ gimp_item_scale (GimpItem *item,
|
|||
* @w_factor: scale factor to apply to width and horizontal offset
|
||||
* @h_factor: scale factor to apply to height and vertical offset
|
||||
* @interpolation:
|
||||
* @progress_callback:
|
||||
* @progress_data:
|
||||
* @progress:
|
||||
*
|
||||
* Scales item dimensions and offsets by uniform width and
|
||||
* height factors.
|
||||
|
@ -759,13 +757,13 @@ gimp_item_scale_by_factors (GimpItem *item,
|
|||
gdouble w_factor,
|
||||
gdouble h_factor,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
gint new_width, new_height;
|
||||
gint new_offset_x, new_offset_y;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
|
||||
|
||||
if (w_factor == 0.0 || h_factor == 0.0)
|
||||
{
|
||||
|
@ -783,7 +781,7 @@ gimp_item_scale_by_factors (GimpItem *item,
|
|||
gimp_item_scale (item,
|
||||
new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interpolation, progress_callback, progress_data);
|
||||
interpolation, progress);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -796,8 +794,7 @@ gimp_item_scale_by_factors (GimpItem *item,
|
|||
* @new_width: The width that item will acquire
|
||||
* @new_height: The height that the item will acquire
|
||||
* @interpolation:
|
||||
* @progress_callback:
|
||||
* @progress_data:
|
||||
* @progress:
|
||||
* @local_origin: sets fixed point of the scaling transform. See below.
|
||||
*
|
||||
* Sets item dimensions to new_width and
|
||||
|
@ -824,13 +821,13 @@ gimp_item_scale_by_origin (GimpItem *item,
|
|||
gint new_width,
|
||||
gint new_height,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data,
|
||||
GimpProgress *progress,
|
||||
gboolean local_origin)
|
||||
{
|
||||
gint new_offset_x, new_offset_y;
|
||||
|
||||
g_return_if_fail (GIMP_IS_ITEM (item));
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
if (new_width == 0 || new_height == 0)
|
||||
{
|
||||
|
@ -857,7 +854,7 @@ gimp_item_scale_by_origin (GimpItem *item,
|
|||
gimp_item_scale (item,
|
||||
new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interpolation, progress_callback, progress_data);
|
||||
interpolation, progress);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -947,14 +944,15 @@ gimp_item_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpItemClass *item_class;
|
||||
GimpImage *gimage;
|
||||
|
||||
g_return_if_fail (GIMP_IS_ITEM (item));
|
||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||
g_return_if_fail (matrix != NULL);
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
|
||||
item_class = GIMP_ITEM_GET_CLASS (item);
|
||||
gimage = gimp_item_get_image (item);
|
||||
|
@ -964,8 +962,7 @@ gimp_item_transform (GimpItem *item,
|
|||
|
||||
item_class->transform (item, context, matrix, direction, interpolation,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback, progress_data);
|
||||
clip_result, progress);
|
||||
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
|
|
@ -85,8 +85,7 @@ struct _GimpItemClass
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
void (* resize) (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -112,8 +111,7 @@ struct _GimpItemClass
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
gboolean (* stroke) (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
GimpContext *context,
|
||||
|
@ -180,21 +178,18 @@ void gimp_item_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
gboolean gimp_item_scale_by_factors (GimpItem *item,
|
||||
gdouble w_factor,
|
||||
gdouble h_factor,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
void gimp_item_scale_by_origin (GimpItem *item,
|
||||
gint new_width,
|
||||
gint new_height,
|
||||
GimpInterpolationType interpolation,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data,
|
||||
gboolean local_origin);
|
||||
GimpProgress *progress,
|
||||
gboolean local_origin);
|
||||
void gimp_item_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -222,8 +217,7 @@ void gimp_item_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
|
||||
gboolean gimp_item_stroke (GimpItem *item,
|
||||
GimpDrawable *drawable,
|
||||
|
|
|
@ -94,8 +94,7 @@ static void gimp_layer_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static void gimp_layer_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -121,9 +120,7 @@ static void gimp_layer_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
|
||||
GimpProgress *progress);
|
||||
static void gimp_layer_invalidate_boundary (GimpDrawable *drawable);
|
||||
static void gimp_layer_get_active_components (const GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
|
@ -649,21 +646,19 @@ gimp_layer_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interpolation_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpLayer *layer = GIMP_LAYER (item);
|
||||
|
||||
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interpolation_type,
|
||||
progress_callback, progress_data);
|
||||
interpolation_type, progress);
|
||||
|
||||
if (layer->mask)
|
||||
gimp_item_scale (GIMP_ITEM (layer->mask),
|
||||
new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interpolation_type, NULL, NULL);
|
||||
interpolation_type, progress);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -729,24 +724,21 @@ gimp_layer_transform (GimpItem *item,
|
|||
gboolean supersample,
|
||||
gint recursion_level,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GimpLayer *layer = GIMP_LAYER (item);
|
||||
|
||||
GIMP_ITEM_CLASS (parent_class)->transform (item, context, matrix, direction,
|
||||
interpolation_type,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback, progress_data);
|
||||
clip_result, progress);
|
||||
|
||||
if (layer->mask)
|
||||
gimp_item_transform (GIMP_ITEM (layer->mask), context,
|
||||
matrix, direction,
|
||||
interpolation_type,
|
||||
supersample, recursion_level,
|
||||
clip_result,
|
||||
progress_callback, progress_data);
|
||||
clip_result, progress);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -0,0 +1,196 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpprogress.c
|
||||
* Copyright (C) 2004 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "core-types.h"
|
||||
|
||||
#include "gimpmarshal.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
CANCEL,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_progress_iface_base_init (GimpProgressInterface *progress_iface);
|
||||
|
||||
|
||||
static guint progress_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GType
|
||||
gimp_progress_interface_get_type (void)
|
||||
{
|
||||
static GType progress_iface_type = 0;
|
||||
|
||||
if (! progress_iface_type)
|
||||
{
|
||||
static const GTypeInfo progress_iface_info =
|
||||
{
|
||||
sizeof (GimpProgressInterface),
|
||||
(GBaseInitFunc) gimp_progress_iface_base_init,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
};
|
||||
|
||||
progress_iface_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GimpProgressInterface",
|
||||
&progress_iface_info,
|
||||
0);
|
||||
|
||||
g_type_interface_add_prerequisite (progress_iface_type, G_TYPE_OBJECT);
|
||||
}
|
||||
|
||||
return progress_iface_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_progress_iface_base_init (GimpProgressInterface *progress_iface)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
|
||||
if (! initialized)
|
||||
{
|
||||
progress_signals[CANCEL] =
|
||||
g_signal_new ("cancel",
|
||||
G_TYPE_FROM_INTERFACE (progress_iface),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (GimpProgressInterface, cancel),
|
||||
NULL, NULL,
|
||||
gimp_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
initialized = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
GimpProgress *
|
||||
gimp_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
|
||||
|
||||
if (! message || ! strlen (message))
|
||||
message = _("Please wait...");
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->start)
|
||||
return progress_iface->start (progress, message, cancelable);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_end (GimpProgress *progress)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_if_fail (GIMP_IS_PROGRESS (progress));
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->end)
|
||||
progress_iface->end (progress);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_if_fail (GIMP_IS_PROGRESS (progress));
|
||||
|
||||
if (! message || ! strlen (message))
|
||||
message = _("Please wait...");
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->set_text)
|
||||
progress_iface->set_text (progress, message);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_if_fail (GIMP_IS_PROGRESS (progress));
|
||||
|
||||
percentage = CLAMP (percentage, 0.0, 1.0);
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->set_value)
|
||||
progress_iface->set_value (progress, percentage);
|
||||
}
|
||||
|
||||
gdouble
|
||||
gimp_progress_get_value (GimpProgress *progress)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0.0);
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->get_value)
|
||||
return progress_iface->get_value (progress);
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_cancel (GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PROGRESS (progress));
|
||||
|
||||
g_signal_emit (progress, progress_signals[CANCEL], 0);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_update_and_flush (gint min,
|
||||
gint max,
|
||||
gint current,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_progress_set_value (GIMP_PROGRESS (data),
|
||||
(gfloat) (current - min) / (gfloat) (max - min));
|
||||
|
||||
while (g_main_context_pending (NULL))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpprogress.h
|
||||
* Copyright (C) 2004 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_PROGRESS_H__
|
||||
#define __GIMP_PROGRESS_H__
|
||||
|
||||
|
||||
#define GIMP_TYPE_PROGRESS (gimp_progress_interface_get_type ())
|
||||
#define GIMP_IS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROGRESS))
|
||||
#define GIMP_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROGRESS, GimpProgress))
|
||||
#define GIMP_PROGRESS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_PROGRESS, GimpProgressInterface))
|
||||
|
||||
|
||||
typedef struct _GimpProgressInterface GimpProgressInterface;
|
||||
|
||||
struct _GimpProgressInterface
|
||||
{
|
||||
GTypeInterface base_iface;
|
||||
|
||||
/* virtual functions */
|
||||
GimpProgress * (* start) (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable);
|
||||
void (* end) (GimpProgress *progress);
|
||||
|
||||
void (* set_text) (GimpProgress *progress,
|
||||
const gchar *message);
|
||||
void (* set_value) (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
gdouble (* get_value) (GimpProgress *progress);
|
||||
|
||||
/* signals */
|
||||
void (* cancel) (GimpProgress *progress);
|
||||
};
|
||||
|
||||
|
||||
GType gimp_progress_interface_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GimpProgress * gimp_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable);
|
||||
void gimp_progress_end (GimpProgress *progress);
|
||||
|
||||
void gimp_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message);
|
||||
void gimp_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
gdouble gimp_progress_get_value (GimpProgress *progress);
|
||||
|
||||
void gimp_progress_cancel (GimpProgress *progress);
|
||||
|
||||
void gimp_progress_update_and_flush (gint min,
|
||||
gint max,
|
||||
gint current,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GIMP_PROGRESS_H__ */
|
|
@ -56,8 +56,7 @@ static void gimp_selection_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
GimpProgress *progress);
|
||||
static void gimp_selection_resize (GimpItem *item,
|
||||
GimpContext *context,
|
||||
gint new_width,
|
||||
|
@ -240,13 +239,11 @@ gimp_selection_scale (GimpItem *item,
|
|||
gint new_offset_x,
|
||||
gint new_offset_y,
|
||||
GimpInterpolationType interp_type,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
GimpProgress *progress)
|
||||
{
|
||||
GIMP_ITEM_CLASS (parent_class)->scale (item, new_width, new_height,
|
||||
new_offset_x, new_offset_y,
|
||||
interp_type,
|
||||
progress_callback, progress_data);
|
||||
interp_type, progress);
|
||||
|
||||
item->offset_x = 0;
|
||||
item->offset_y = 0;
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
#include "core/gimpimage-convert.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimppalette.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpenumwidgets.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimppaletteselect.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget *shell;
|
||||
|
@ -55,8 +55,6 @@ typedef struct
|
|||
gint palette;
|
||||
GimpConvertPaletteType palette_type;
|
||||
GimpDisplay *gdisp;
|
||||
GimpProgress *progress;
|
||||
gint current_stage;
|
||||
} IndexedDialog;
|
||||
|
||||
|
||||
|
@ -412,28 +410,6 @@ build_palette_button (Gimp *gimp)
|
|||
return gtk_button_new_with_label (GIMP_OBJECT (theCustomPalette)->name);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progress_callback (gint stage,
|
||||
gdouble percentage,
|
||||
gpointer data)
|
||||
{
|
||||
IndexedDialog *dialog = data;
|
||||
|
||||
if (stage != dialog->current_stage)
|
||||
{
|
||||
gchar buffer[1024];
|
||||
|
||||
g_snprintf (buffer, sizeof (buffer), _("Stage %d"), stage);
|
||||
|
||||
dialog->current_stage = stage;
|
||||
dialog->progress = gimp_progress_restart (dialog->progress,
|
||||
buffer, NULL, NULL);
|
||||
}
|
||||
|
||||
gimp_progress_update (dialog->progress, percentage);
|
||||
}
|
||||
|
||||
static void
|
||||
indexed_response (GtkWidget *widget,
|
||||
gint response_id,
|
||||
|
@ -441,9 +417,11 @@ indexed_response (GtkWidget *widget,
|
|||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
dialog->current_stage = 1;
|
||||
dialog->progress = gimp_progress_start (dialog->gdisp, _("Stage 1"),
|
||||
FALSE, NULL, NULL);
|
||||
GimpProgress *progress;
|
||||
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (dialog->gdisp),
|
||||
_("Converting to indexed..."), FALSE);
|
||||
|
||||
/* Convert the image to indexed color */
|
||||
gimp_image_convert (dialog->gimage,
|
||||
GIMP_INDEXED,
|
||||
|
@ -453,10 +431,11 @@ indexed_response (GtkWidget *widget,
|
|||
dialog->remove_dups,
|
||||
dialog->palette_type,
|
||||
theCustomPalette,
|
||||
progress_callback,
|
||||
dialog);
|
||||
progress);
|
||||
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_progress_end (dialog->progress);
|
||||
gimp_image_flush (dialog->gimage);
|
||||
|
||||
/* Save defaults for next time */
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -118,6 +119,7 @@ file_open_dialog_response (GtkWidget *open_dialog,
|
|||
{
|
||||
GSList *uris;
|
||||
GSList *list;
|
||||
gboolean success = FALSE;
|
||||
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
{
|
||||
|
@ -141,13 +143,18 @@ file_open_dialog_response (GtkWidget *open_dialog,
|
|||
list->data,
|
||||
GIMP_FILE_DIALOG (open_dialog)->file_proc))
|
||||
{
|
||||
gtk_widget_hide (open_dialog);
|
||||
success = TRUE;
|
||||
|
||||
gdk_window_raise (open_dialog->window);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
if (success)
|
||||
gtk_widget_hide (open_dialog);
|
||||
|
||||
gtk_widget_set_sensitive (open_dialog, TRUE);
|
||||
|
||||
g_slist_foreach (uris, (GFunc) g_free, NULL);
|
||||
|
@ -167,6 +174,7 @@ file_open_dialog_open_image (GtkWidget *open_dialog,
|
|||
|
||||
gimage = file_open_with_proc_and_display (gimp,
|
||||
gimp_get_user_context (gimp),
|
||||
GIMP_PROGRESS (open_dialog),
|
||||
uri,
|
||||
entered_filename,
|
||||
load_proc,
|
||||
|
|
|
@ -157,9 +157,12 @@ file_open_location_response (GtkWidget *dialog,
|
|||
{
|
||||
uri = file_utils_filename_to_uri (gimp->load_procs, text, NULL);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: add progress bar to open location dialog
|
||||
#endif
|
||||
image = file_open_with_proc_and_display (gimp,
|
||||
gimp_get_user_context (gimp),
|
||||
NULL,
|
||||
uri, text, NULL,
|
||||
&status, &error);
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -300,6 +301,7 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
|||
|
||||
status = file_save_as (gimage,
|
||||
gimp_get_user_context (gimage->gimp),
|
||||
GIMP_PROGRESS (save_dialog),
|
||||
uri,
|
||||
raw_filename,
|
||||
save_proc,
|
||||
|
|
|
@ -64,8 +64,6 @@ libappdisplay_a_sources = \
|
|||
gimpdisplayshell-transform.h \
|
||||
gimpnavigationview.c \
|
||||
gimpnavigationview.h \
|
||||
gimpprogress.c \
|
||||
gimpprogress.h \
|
||||
gimpscalecombobox.c \
|
||||
gimpscalecombobox.h \
|
||||
gimpstatusbar.c \
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "core/gimparea.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "tools/gimptool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
@ -50,25 +51,39 @@ enum
|
|||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_display_class_init (GimpDisplayClass *klass);
|
||||
static void gimp_display_init (GimpDisplay *gdisp);
|
||||
static void gimp_display_class_init (GimpDisplayClass *klass);
|
||||
static void gimp_display_init (GimpDisplay *gdisp);
|
||||
static void gimp_display_progress_iface_init (GimpProgressInterface *progress_iface);
|
||||
|
||||
static void gimp_display_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gimp_display_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||
gboolean now);
|
||||
static void gimp_display_paint_area (GimpDisplay *gdisp,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h);
|
||||
static GimpProgress *
|
||||
gimp_display_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable);
|
||||
static void gimp_display_progress_end (GimpProgress *progress);
|
||||
static void gimp_display_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message);
|
||||
static void gimp_display_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
static gdouble gimp_display_progress_get_value (GimpProgress *progress);
|
||||
static void gimp_display_progress_canceled (GimpProgress *progress,
|
||||
GimpDisplay *display);
|
||||
|
||||
static void gimp_display_flush_whenever (GimpDisplay *gdisp,
|
||||
gboolean now);
|
||||
static void gimp_display_paint_area (GimpDisplay *gdisp,
|
||||
gint x,
|
||||
gint y,
|
||||
gint w,
|
||||
gint h);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
@ -94,9 +109,19 @@ gimp_display_get_type (void)
|
|||
(GInstanceInitFunc) gimp_display_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo progress_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_display_progress_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
display_type = g_type_register_static (GIMP_TYPE_OBJECT,
|
||||
"GimpDisplay",
|
||||
&display_info, 0);
|
||||
|
||||
g_type_add_interface_static (display_type, GIMP_TYPE_PROGRESS,
|
||||
&progress_iface_info);
|
||||
}
|
||||
|
||||
return display_type;
|
||||
|
@ -139,6 +164,16 @@ gimp_display_init (GimpDisplay *gdisp)
|
|||
gdisp->update_areas = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_iface_init (GimpProgressInterface *progress_iface)
|
||||
{
|
||||
progress_iface->start = gimp_display_progress_start;
|
||||
progress_iface->end = gimp_display_progress_end;
|
||||
progress_iface->set_text = gimp_display_progress_set_text;
|
||||
progress_iface->set_value = gimp_display_progress_set_value;
|
||||
progress_iface->get_value = gimp_display_progress_get_value;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_set_property (GObject *object,
|
||||
guint property_id,
|
||||
|
@ -183,6 +218,61 @@ gimp_display_get_property (GObject *object,
|
|||
}
|
||||
}
|
||||
|
||||
static GimpProgress *
|
||||
gimp_display_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (progress)->shell);
|
||||
|
||||
return gimp_progress_start (GIMP_PROGRESS (shell->statusbar),
|
||||
message, cancelable);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_end (GimpProgress *progress)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (progress)->shell);
|
||||
|
||||
gimp_progress_end (GIMP_PROGRESS (shell->statusbar));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (progress)->shell);
|
||||
|
||||
gimp_progress_set_text (GIMP_PROGRESS (shell->statusbar), message);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (progress)->shell);
|
||||
|
||||
gimp_progress_set_value (GIMP_PROGRESS (shell->statusbar), percentage);
|
||||
}
|
||||
|
||||
static gdouble
|
||||
gimp_display_progress_get_value (GimpProgress *progress)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (GIMP_DISPLAY (progress)->shell);
|
||||
|
||||
return gimp_progress_get_value (GIMP_PROGRESS (shell->statusbar));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_canceled (GimpProgress *progress,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
gimp_progress_cancel (GIMP_PROGRESS (display));
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
GimpDisplay *
|
||||
gimp_display_new (GimpImage *gimage,
|
||||
GimpUnit unit,
|
||||
|
@ -208,9 +298,12 @@ gimp_display_new (GimpImage *gimage,
|
|||
/* create the shell for the image */
|
||||
gdisp->shell = gimp_display_shell_new (gdisp, unit, scale,
|
||||
menu_factory, popup_manager);
|
||||
|
||||
gtk_widget_show (gdisp->shell);
|
||||
|
||||
g_signal_connect (GIMP_DISPLAY_SHELL (gdisp->shell)->statusbar, "cancel",
|
||||
G_CALLBACK (gimp_display_progress_canceled),
|
||||
gdisp);
|
||||
|
||||
return gdisp;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -300,7 +301,9 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
|
|||
GimpPDBStatusType status;
|
||||
GError *error = NULL;
|
||||
|
||||
new_layer = file_open_layer (gimage->gimp, context, gimage, uri,
|
||||
new_layer = file_open_layer (gimage->gimp, context,
|
||||
GIMP_PROGRESS (shell->statusbar),
|
||||
gimage, uri,
|
||||
&status, &error);
|
||||
|
||||
if (new_layer)
|
||||
|
|
|
@ -1,455 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
||||
#include "display-types.h"
|
||||
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpstatusbar.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
struct _GimpProgress
|
||||
{
|
||||
GimpDisplay *gdisp; /* gdisp in use, or NULL*/
|
||||
|
||||
/* next four fields are only valid if gdisp is NULL */
|
||||
GtkWidget *dialog; /* progress dialog, NULL if using gdisp */
|
||||
GtkWidget *dialog_label;
|
||||
GtkWidget *progressbar;
|
||||
GtkWidget *cancelbutton;
|
||||
|
||||
GCallback cancel_callback; /* callback to remove, or NULL */
|
||||
gpointer cancel_data;
|
||||
};
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
static void gimp_progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
static void gimp_progress_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpProgress *progress);
|
||||
|
||||
|
||||
/**
|
||||
* gimp_progress_start:
|
||||
* @gdisp: The #GimpDisplay to show the progress in.
|
||||
* @message: The message.
|
||||
* @important: Setting this to #FALSE will cause the progress
|
||||
* to silently fail if the display's statusbar
|
||||
* is hidden.
|
||||
* @cancel_callback: The callback to call if the "Cancel" button is clicked.
|
||||
* @cancel_data: The %cancel_callback's "user_data".
|
||||
*
|
||||
* Start a progress bar on %gdisp with reason %message. If %gdisp
|
||||
* is #NULL, the progress bar is presented in a new dialog box. If
|
||||
* %message is #NULL, then no message is used.
|
||||
*
|
||||
* If %cancel_callback is not %NULL, it is attached to the progress
|
||||
* bar cancel button's "clicked" signal, with data %cancel_data. The
|
||||
* cancel button is only made sensitive if the callback is set.
|
||||
*
|
||||
* It is an error to gimp_progress_start() a bar on a %gdisp for which
|
||||
* there is already a progress bar active.
|
||||
*
|
||||
* Progress bars with %important set to #TRUE will be shown to the
|
||||
* user in any possible way. Unimportant progress bars will not be
|
||||
* shown to the user if it would mean creating a new window.
|
||||
*
|
||||
* Return value: The new #GimpProgress.
|
||||
**/
|
||||
GimpProgress *
|
||||
gimp_progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GimpDisplayShell *shell = NULL;
|
||||
GimpProgress *progress;
|
||||
GtkWidget *vbox;
|
||||
|
||||
g_return_val_if_fail (gdisp == NULL || GIMP_IS_DISPLAY (gdisp), NULL);
|
||||
|
||||
if (gdisp)
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
progress = g_new0 (GimpProgress, 1);
|
||||
|
||||
/* do we have a useful gdisplay and statusarea? */
|
||||
if (gdisp && GTK_WIDGET_VISIBLE (shell->statusbar))
|
||||
{
|
||||
progress->gdisp = gdisp;
|
||||
|
||||
if (message)
|
||||
{
|
||||
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
|
||||
"progress",
|
||||
message);
|
||||
}
|
||||
|
||||
/* really need image locking to stop multiple people going at
|
||||
* the image
|
||||
*/
|
||||
if (GIMP_STATUSBAR (shell->statusbar)->progressid)
|
||||
{
|
||||
g_warning ("%s: %d progress bars already active for display %p",
|
||||
G_STRFUNC, GIMP_STATUSBAR (shell->statusbar)->progressid,
|
||||
gdisp);
|
||||
}
|
||||
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* unimporant progress indications are occasionally failed */
|
||||
if (! important)
|
||||
{
|
||||
g_free (progress);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
progress->dialog = gimp_dialog_new (_("Progress"), "progress",
|
||||
NULL, 0,
|
||||
NULL, NULL,
|
||||
NULL);
|
||||
|
||||
progress->cancelbutton =
|
||||
gtk_dialog_add_button (GTK_DIALOG (progress->dialog),
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (progress->dialog), FALSE);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (progress->dialog)->vbox),
|
||||
vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
progress->dialog_label = gtk_label_new (message ? message :
|
||||
_("Please wait..."));
|
||||
gtk_misc_set_alignment (GTK_MISC (progress->dialog_label), 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), progress->dialog_label,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (progress->dialog_label);
|
||||
|
||||
progress->progressbar = gtk_progress_bar_new ();
|
||||
gtk_widget_set_size_request (progress->progressbar, 150, 20);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), progress->progressbar,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (progress->progressbar);
|
||||
|
||||
gtk_widget_show (progress->dialog);
|
||||
}
|
||||
|
||||
gimp_progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gimp_progress_restart:
|
||||
* @progress: The #GimpProgress to restart.
|
||||
* @message: The new message.
|
||||
* @cancel_callback: The new cancel_callback
|
||||
* @cancel_data: The new cancel_data
|
||||
*
|
||||
* Update the message and/or the callbacks for a progress and reset
|
||||
* the bar to zero, with the minimum of disturbance to the user.
|
||||
*
|
||||
* Return value: The same #GimpProgress as passed in as %progress.
|
||||
**/
|
||||
GimpProgress *
|
||||
gimp_progress_restart (GimpProgress *progress,
|
||||
const char *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
g_return_val_if_fail (progress != NULL, NULL);
|
||||
|
||||
/* change the message */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "progress");
|
||||
|
||||
if (message)
|
||||
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
|
||||
"progress",
|
||||
message);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_label_set_text (GTK_LABEL (progress->dialog_label),
|
||||
message ? message : _("Please wait..."));
|
||||
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
/* reset the progress bar */
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
|
||||
|
||||
/* do we need to change the callbacks? */
|
||||
gimp_progress_signal_setup (progress, cancel_callback, cancel_data);
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gimp_progress_update (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
if (percentage < 0.0 || percentage > 1.0)
|
||||
return;
|
||||
|
||||
/* do we have a dialog box, or are we using the statusbar? */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), percentage);
|
||||
|
||||
/* force updates so there's feedback even when the main loop is busy */
|
||||
if (GTK_WIDGET_DRAWABLE (bar))
|
||||
gdk_window_process_updates (bar->window, TRUE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gimp_progress_step:
|
||||
* @progress: The #GimpProgress.
|
||||
*
|
||||
* Step the progress bar by one percent, wrapping at 100%
|
||||
**/
|
||||
void
|
||||
gimp_progress_step (GimpProgress *progress)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
gdouble val;
|
||||
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
bar = GIMP_STATUSBAR (shell->statusbar)->progressbar;
|
||||
}
|
||||
else
|
||||
{
|
||||
bar = progress->progressbar;
|
||||
}
|
||||
|
||||
val = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (bar)) + 0.01;
|
||||
if (val > 1.0)
|
||||
val = 0.0;
|
||||
|
||||
gimp_progress_update (progress, val);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gimp_progress_end:
|
||||
* @progress: The #GimpProgress.
|
||||
*
|
||||
* Finish using the progress bar.
|
||||
**/
|
||||
void
|
||||
gimp_progress_end (GimpProgress *progress)
|
||||
{
|
||||
g_return_if_fail (progress != NULL);
|
||||
|
||||
/* We might get called from gimp_exit() and at that time
|
||||
* the display shell has been destroyed already.
|
||||
*/
|
||||
if (progress->gdisp && !progress->gdisp->shell)
|
||||
return;
|
||||
|
||||
/* remove all callbacks so they don't get called while we're
|
||||
* destroying widgets
|
||||
*/
|
||||
gimp_progress_signal_setup (progress, NULL, NULL);
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
GtkProgressBar *bar;
|
||||
|
||||
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "progress");
|
||||
|
||||
bar = GTK_PROGRESS_BAR (GIMP_STATUSBAR (shell->statusbar)->progressbar);
|
||||
|
||||
gtk_progress_bar_set_fraction (bar, 0.0);
|
||||
|
||||
if (GIMP_STATUSBAR (shell->statusbar)->progressid > 0)
|
||||
GIMP_STATUSBAR (shell->statusbar)->progressid--;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (progress->dialog);
|
||||
}
|
||||
|
||||
g_free (progress);
|
||||
}
|
||||
|
||||
|
||||
/* This function's prototype is conveniently
|
||||
* the same as progress_func_t
|
||||
*/
|
||||
|
||||
/**
|
||||
* gimp_progress_update_and_flush:
|
||||
* @min: The minimum, ...
|
||||
* @max: ... the maximum, ...
|
||||
* @current: ... and the current progress of your operation.
|
||||
* @data: The #GimpProgress you want to update.
|
||||
*
|
||||
* This function's prototype is conveniently
|
||||
* the same as #GimpProgressFunc from libgimpcolor.
|
||||
**/
|
||||
void
|
||||
gimp_progress_update_and_flush (gint min,
|
||||
gint max,
|
||||
gint current,
|
||||
gpointer data)
|
||||
{
|
||||
gimp_progress_update ((GimpProgress *) data,
|
||||
(gfloat) (current - min) / (gfloat) (max - min));
|
||||
|
||||
while (gtk_events_pending ())
|
||||
gtk_main_iteration ();
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
/* Helper function to add or remove signals */
|
||||
static void
|
||||
gimp_progress_signal_setup (GimpProgress *progress,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *dialog;
|
||||
|
||||
if (progress->cancel_callback == cancel_callback &&
|
||||
progress->cancel_data == cancel_data)
|
||||
return;
|
||||
|
||||
/* are we using the statusbar or a freestanding dialog? */
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
dialog = NULL;
|
||||
button = GIMP_STATUSBAR (shell->statusbar)->cancelbutton;
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog = progress->dialog;
|
||||
button = progress->cancelbutton;
|
||||
}
|
||||
|
||||
/* remove any existing signal handlers */
|
||||
if (progress->cancel_callback)
|
||||
{
|
||||
if (dialog)
|
||||
g_signal_handlers_disconnect_by_func (dialog,
|
||||
progress->cancel_callback,
|
||||
progress->cancel_data);
|
||||
else
|
||||
g_signal_handlers_disconnect_by_func (button,
|
||||
progress->cancel_callback,
|
||||
progress->cancel_data);
|
||||
}
|
||||
|
||||
/* add the new handlers */
|
||||
if (cancel_callback)
|
||||
{
|
||||
if (dialog)
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gimp_progress_response),
|
||||
progress);
|
||||
else
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (cancel_callback),
|
||||
cancel_data);
|
||||
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (button),
|
||||
cancel_callback ? TRUE : FALSE);
|
||||
|
||||
progress->cancel_callback = cancel_callback;
|
||||
progress->cancel_data = cancel_data;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_progress_response (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
typedef void (* cb) (GtkWidget*, gpointer);
|
||||
|
||||
GtkWidget *button;
|
||||
cb callback;
|
||||
|
||||
callback = (cb) progress->cancel_callback;
|
||||
|
||||
if (progress->gdisp)
|
||||
{
|
||||
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress->gdisp->shell);
|
||||
|
||||
button = GIMP_STATUSBAR (shell->statusbar)->cancelbutton;
|
||||
}
|
||||
else
|
||||
{
|
||||
button = progress->cancelbutton;
|
||||
}
|
||||
|
||||
callback (button, progress->cancel_data);
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_PROGRESS_H__
|
||||
#define __GIMP_PROGRESS_H__
|
||||
|
||||
|
||||
GimpProgress * gimp_progress_start (GimpDisplay *gdisp,
|
||||
const gchar *message,
|
||||
gboolean important,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
GimpProgress * gimp_progress_restart (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_callback,
|
||||
gpointer cancel_data);
|
||||
void gimp_progress_update (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
void gimp_progress_step (GimpProgress *progress);
|
||||
void gimp_progress_end (GimpProgress *progress);
|
||||
|
||||
void gimp_progress_update_and_flush (gint min,
|
||||
gint max,
|
||||
gint current,
|
||||
gpointer data);
|
||||
|
||||
|
||||
#endif /* __GIMP_PROGRESS_H__ */
|
|
@ -27,6 +27,7 @@
|
|||
#include "core/gimpimage.h"
|
||||
#include "core/gimpunit.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpunitstore.h"
|
||||
#include "widgets/gimpunitcombobox.h"
|
||||
|
@ -54,20 +55,34 @@ struct _GimpStatusbarMsg
|
|||
#define CURSOR_LEN 256
|
||||
|
||||
|
||||
static void gimp_statusbar_class_init (GimpStatusbarClass *klass);
|
||||
static void gimp_statusbar_init (GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_class_init (GimpStatusbarClass *klass);
|
||||
static void gimp_statusbar_init (GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_progress_iface_init (GimpProgressInterface *progress_iface);
|
||||
|
||||
static void gimp_statusbar_destroy (GtkObject *object);
|
||||
static void gimp_statusbar_destroy (GtkObject *object);
|
||||
|
||||
static void gimp_statusbar_update (GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_unit_changed (GimpUnitComboBox *combo,
|
||||
GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_scale_changed (GimpScaleComboBox *combo,
|
||||
GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
|
||||
GimpStatusbar *statusbar);
|
||||
static guint gimp_statusbar_get_context_id (GimpStatusbar *statusbar,
|
||||
const gchar *context);
|
||||
static GimpProgress *
|
||||
gimp_statusbar_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable);
|
||||
static void gimp_statusbar_progress_end (GimpProgress *progress);
|
||||
static void gimp_statusbar_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message);
|
||||
static void gimp_statusbar_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
static gdouble gimp_statusbar_progress_get_value (GimpProgress *progress);
|
||||
static void gimp_statusbar_progress_canceled (GtkWidget *button,
|
||||
GimpStatusbar *statusbar);
|
||||
|
||||
static void gimp_statusbar_update (GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_unit_changed (GimpUnitComboBox *combo,
|
||||
GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_scale_changed (GimpScaleComboBox *combo,
|
||||
GimpStatusbar *statusbar);
|
||||
static void gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
|
||||
GimpStatusbar *statusbar);
|
||||
static guint gimp_statusbar_get_context_id (GimpStatusbar *statusbar,
|
||||
const gchar *context);
|
||||
|
||||
|
||||
static GtkHBoxClass *parent_class = NULL;
|
||||
|
@ -93,9 +108,19 @@ gimp_statusbar_get_type (void)
|
|||
(GInstanceInitFunc) gimp_statusbar_init,
|
||||
};
|
||||
|
||||
static const GInterfaceInfo progress_iface_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gimp_statusbar_progress_iface_init,
|
||||
NULL, /* iface_finalize */
|
||||
NULL /* iface_data */
|
||||
};
|
||||
|
||||
statusbar_type = g_type_register_static (GTK_TYPE_HBOX,
|
||||
"GimpStatusbar",
|
||||
&statusbar_info, 0);
|
||||
|
||||
g_type_add_interface_static (statusbar_type, GIMP_TYPE_PROGRESS,
|
||||
&progress_iface_info);
|
||||
}
|
||||
|
||||
return statusbar_type;
|
||||
|
@ -134,7 +159,7 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
|
|||
|
||||
statusbar->shell = NULL;
|
||||
statusbar->cursor_format_str[0] = '\0';
|
||||
statusbar->progressid = 0;
|
||||
statusbar->progress_active = FALSE;
|
||||
|
||||
gtk_box_set_spacing (box, 1);
|
||||
|
||||
|
@ -188,10 +213,14 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
|
|||
GTK_PROGRESS_BAR (statusbar->progressbar)->progress.x_align = 0.0;
|
||||
GTK_PROGRESS_BAR (statusbar->progressbar)->progress.y_align = 0.5;
|
||||
|
||||
statusbar->cancelbutton = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_set_sensitive (statusbar->cancelbutton, FALSE);
|
||||
gtk_box_pack_start (box, statusbar->cancelbutton, FALSE, FALSE, 0);
|
||||
gtk_widget_show (statusbar->cancelbutton);
|
||||
statusbar->cancel_button = gtk_button_new_with_label (_("Cancel"));
|
||||
gtk_widget_set_sensitive (statusbar->cancel_button, FALSE);
|
||||
gtk_box_pack_start (box, statusbar->cancel_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (statusbar->cancel_button);
|
||||
|
||||
g_signal_connect (statusbar->cancel_button, "clicked",
|
||||
G_CALLBACK (gimp_statusbar_progress_canceled),
|
||||
statusbar);
|
||||
|
||||
/* Update the statusbar once to work around a canvas size problem:
|
||||
*
|
||||
|
@ -210,6 +239,16 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
|
|||
statusbar->keys = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_iface_init (GimpProgressInterface *progress_iface)
|
||||
{
|
||||
progress_iface->start = gimp_statusbar_progress_start;
|
||||
progress_iface->end = gimp_statusbar_progress_end;
|
||||
progress_iface->set_text = gimp_statusbar_progress_set_text;
|
||||
progress_iface->set_value = gimp_statusbar_progress_set_value;
|
||||
progress_iface->get_value = gimp_statusbar_progress_get_value;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -236,6 +275,101 @@ gimp_statusbar_destroy (GtkObject *object)
|
|||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
}
|
||||
|
||||
static GimpProgress *
|
||||
gimp_statusbar_progress_start (GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable)
|
||||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
|
||||
if (! statusbar->progress_active)
|
||||
{
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
|
||||
gimp_statusbar_push (statusbar, "progress", message);
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
|
||||
gtk_widget_set_sensitive (statusbar->cancel_button, cancelable);
|
||||
|
||||
statusbar->progress_active = TRUE;
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
g_warning ("%s: progress bar already active for statusbar %p",
|
||||
G_STRFUNC, statusbar);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_end (GimpProgress *progress)
|
||||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
|
||||
if (statusbar->progress_active)
|
||||
{
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
|
||||
gimp_statusbar_pop (statusbar, "progress");
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
|
||||
gtk_widget_set_sensitive (statusbar->cancel_button, FALSE);
|
||||
|
||||
statusbar->progress_active = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_set_text (GimpProgress *progress,
|
||||
const gchar *message)
|
||||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
|
||||
if (statusbar->progress_active)
|
||||
{
|
||||
gimp_statusbar_replace (statusbar, "progress", message);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_set_value (GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
|
||||
if (statusbar->progress_active)
|
||||
{
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), percentage);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (bar))
|
||||
gdk_window_process_updates (bar->window, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static gdouble
|
||||
gimp_statusbar_progress_get_value (GimpProgress *progress)
|
||||
{
|
||||
GimpStatusbar *statusbar = GIMP_STATUSBAR (progress);
|
||||
|
||||
if (statusbar->progress_active)
|
||||
{
|
||||
GtkWidget *bar = statusbar->progressbar;
|
||||
|
||||
return gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (bar));
|
||||
}
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_progress_canceled (GtkWidget *button,
|
||||
GimpStatusbar *statusbar)
|
||||
{
|
||||
if (statusbar->progress_active)
|
||||
gimp_progress_cancel (GIMP_PROGRESS (statusbar));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_statusbar_update (GimpStatusbar *statusbar)
|
||||
{
|
||||
|
|
|
@ -53,8 +53,8 @@ struct _GimpStatusbar
|
|||
GtkWidget *scale_combo;
|
||||
|
||||
GtkWidget *progressbar;
|
||||
guint progressid;
|
||||
GtkWidget *cancelbutton;
|
||||
GtkWidget *cancel_button;
|
||||
gboolean progress_active;
|
||||
};
|
||||
|
||||
struct _GimpStatusbarClass
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpimagefile.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
|
@ -65,6 +66,7 @@
|
|||
GimpImage *
|
||||
file_open_image (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *entered_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
@ -82,6 +84,7 @@ file_open_image (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (status != NULL, NULL);
|
||||
g_return_val_if_fail (mime_type == NULL || *mime_type == NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
@ -134,7 +137,8 @@ file_open_image (Gimp *gimp,
|
|||
args[1].value.pdb_pointer = filename ? filename : (gchar *) uri;
|
||||
args[2].value.pdb_pointer = (gchar *) entered_filename;
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, proc->name, args);
|
||||
return_vals = procedural_db_execute (gimp, context, progress,
|
||||
proc->name, args);
|
||||
|
||||
if (filename)
|
||||
g_free (filename);
|
||||
|
@ -190,17 +194,19 @@ file_open_image (Gimp *gimp,
|
|||
GimpImage *
|
||||
file_open_with_display (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
GimpPDBStatusType *status,
|
||||
GError **error)
|
||||
{
|
||||
return file_open_with_proc_and_display (gimp, context,
|
||||
return file_open_with_proc_and_display (gimp, context, progress,
|
||||
uri, uri, NULL, status, error);
|
||||
}
|
||||
|
||||
GimpImage *
|
||||
file_open_with_proc_and_display (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *entered_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
@ -212,9 +218,10 @@ file_open_with_proc_and_display (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (status != NULL, NULL);
|
||||
|
||||
gimage = file_open_image (gimp, context,
|
||||
gimage = file_open_image (gimp, context, progress,
|
||||
uri,
|
||||
entered_filename,
|
||||
file_proc,
|
||||
|
@ -251,6 +258,7 @@ file_open_with_proc_and_display (Gimp *gimp,
|
|||
GimpLayer *
|
||||
file_open_layer (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
GimpImage *dest_image,
|
||||
const gchar *uri,
|
||||
GimpPDBStatusType *status,
|
||||
|
@ -261,12 +269,13 @@ file_open_layer (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (dest_image), NULL);
|
||||
g_return_val_if_fail (uri != NULL, NULL);
|
||||
g_return_val_if_fail (status != NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
new_image = file_open_image (gimp, context, uri, uri,
|
||||
new_image = file_open_image (gimp, context, progress, uri, uri,
|
||||
NULL, GIMP_RUN_NONINTERACTIVE,
|
||||
status, NULL, error);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
GimpImage * file_open_image (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *entered_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
@ -32,12 +33,14 @@ GimpImage * file_open_image (Gimp *gimp,
|
|||
|
||||
GimpImage * file_open_with_display (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
GimpPDBStatusType *status,
|
||||
GError **error);
|
||||
|
||||
GimpImage * file_open_with_proc_and_display (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *entered_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
@ -46,6 +49,7 @@ GimpImage * file_open_with_proc_and_display (Gimp *gimp,
|
|||
|
||||
GimpLayer * file_open_layer (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
GimpImage *dest_image,
|
||||
const gchar *uri,
|
||||
GimpPDBStatusType *status,
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimagefile.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
|
@ -65,6 +66,7 @@
|
|||
GimpPDBStatusType
|
||||
file_save (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
GimpRunMode run_mode,
|
||||
GError **error)
|
||||
{
|
||||
|
@ -73,6 +75,8 @@ file_save (GimpImage *gimage,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress),
|
||||
GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL,
|
||||
GIMP_PDB_CALLING_ERROR);
|
||||
|
||||
|
@ -82,13 +86,15 @@ file_save (GimpImage *gimage,
|
|||
|
||||
file_proc = gimp_image_get_save_proc (gimage);
|
||||
|
||||
return file_save_as (gimage, context, uri, uri, file_proc, run_mode,
|
||||
return file_save_as (gimage, context, progress,
|
||||
uri, uri, file_proc, run_mode,
|
||||
FALSE, TRUE, error);
|
||||
}
|
||||
|
||||
GimpPDBStatusType
|
||||
file_save_as (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *raw_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
@ -106,6 +112,8 @@ file_save_as (GimpImage *gimage,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress),
|
||||
GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (uri != NULL, GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (raw_filename != NULL, GIMP_PDB_CALLING_ERROR);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL,
|
||||
|
@ -165,7 +173,8 @@ file_save_as (GimpImage *gimage,
|
|||
args[3].value.pdb_pointer = (gpointer) (filename ? filename : uri);
|
||||
args[4].value.pdb_pointer = (gpointer) raw_filename;
|
||||
|
||||
return_vals = procedural_db_execute (gimage->gimp, context, proc->name, args);
|
||||
return_vals = procedural_db_execute (gimage->gimp, context, progress,
|
||||
proc->name, args);
|
||||
|
||||
if (filename)
|
||||
g_free (filename);
|
||||
|
|
|
@ -22,10 +22,12 @@
|
|||
|
||||
GimpPDBStatusType file_save (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
GimpRunMode run_mode,
|
||||
GError **error);
|
||||
GimpPDBStatusType file_save_as (GimpImage *gimage,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *uri,
|
||||
const gchar *raw_filename,
|
||||
PlugInProcDef *file_proc,
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
#include "core/gimpimage-convert.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimppalette.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpenumwidgets.h"
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimppaletteselect.h"
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "menus/menus.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget *shell;
|
||||
|
@ -55,8 +55,6 @@ typedef struct
|
|||
gint palette;
|
||||
GimpConvertPaletteType palette_type;
|
||||
GimpDisplay *gdisp;
|
||||
GimpProgress *progress;
|
||||
gint current_stage;
|
||||
} IndexedDialog;
|
||||
|
||||
|
||||
|
@ -412,28 +410,6 @@ build_palette_button (Gimp *gimp)
|
|||
return gtk_button_new_with_label (GIMP_OBJECT (theCustomPalette)->name);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
progress_callback (gint stage,
|
||||
gdouble percentage,
|
||||
gpointer data)
|
||||
{
|
||||
IndexedDialog *dialog = data;
|
||||
|
||||
if (stage != dialog->current_stage)
|
||||
{
|
||||
gchar buffer[1024];
|
||||
|
||||
g_snprintf (buffer, sizeof (buffer), _("Stage %d"), stage);
|
||||
|
||||
dialog->current_stage = stage;
|
||||
dialog->progress = gimp_progress_restart (dialog->progress,
|
||||
buffer, NULL, NULL);
|
||||
}
|
||||
|
||||
gimp_progress_update (dialog->progress, percentage);
|
||||
}
|
||||
|
||||
static void
|
||||
indexed_response (GtkWidget *widget,
|
||||
gint response_id,
|
||||
|
@ -441,9 +417,11 @@ indexed_response (GtkWidget *widget,
|
|||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
{
|
||||
dialog->current_stage = 1;
|
||||
dialog->progress = gimp_progress_start (dialog->gdisp, _("Stage 1"),
|
||||
FALSE, NULL, NULL);
|
||||
GimpProgress *progress;
|
||||
|
||||
progress = gimp_progress_start (GIMP_PROGRESS (dialog->gdisp),
|
||||
_("Converting to indexed..."), FALSE);
|
||||
|
||||
/* Convert the image to indexed color */
|
||||
gimp_image_convert (dialog->gimage,
|
||||
GIMP_INDEXED,
|
||||
|
@ -453,10 +431,11 @@ indexed_response (GtkWidget *widget,
|
|||
dialog->remove_dups,
|
||||
dialog->palette_type,
|
||||
theCustomPalette,
|
||||
progress_callback,
|
||||
dialog);
|
||||
progress);
|
||||
|
||||
if (progress)
|
||||
gimp_progress_end (progress);
|
||||
|
||||
gimp_progress_end (dialog->progress);
|
||||
gimp_image_flush (dialog->gimage);
|
||||
|
||||
/* Save defaults for next time */
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "file/file-open.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -118,6 +119,7 @@ file_open_dialog_response (GtkWidget *open_dialog,
|
|||
{
|
||||
GSList *uris;
|
||||
GSList *list;
|
||||
gboolean success = FALSE;
|
||||
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
{
|
||||
|
@ -141,13 +143,18 @@ file_open_dialog_response (GtkWidget *open_dialog,
|
|||
list->data,
|
||||
GIMP_FILE_DIALOG (open_dialog)->file_proc))
|
||||
{
|
||||
gtk_widget_hide (open_dialog);
|
||||
success = TRUE;
|
||||
|
||||
gdk_window_raise (open_dialog->window);
|
||||
}
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
if (success)
|
||||
gtk_widget_hide (open_dialog);
|
||||
|
||||
gtk_widget_set_sensitive (open_dialog, TRUE);
|
||||
|
||||
g_slist_foreach (uris, (GFunc) g_free, NULL);
|
||||
|
@ -167,6 +174,7 @@ file_open_dialog_open_image (GtkWidget *open_dialog,
|
|||
|
||||
gimage = file_open_with_proc_and_display (gimp,
|
||||
gimp_get_user_context (gimp),
|
||||
GIMP_PROGRESS (open_dialog),
|
||||
uri,
|
||||
entered_filename,
|
||||
load_proc,
|
||||
|
|
|
@ -157,9 +157,12 @@ file_open_location_response (GtkWidget *dialog,
|
|||
{
|
||||
uri = file_utils_filename_to_uri (gimp->load_procs, text, NULL);
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: add progress bar to open location dialog
|
||||
#endif
|
||||
image = file_open_with_proc_and_display (gimp,
|
||||
gimp_get_user_context (gimp),
|
||||
NULL,
|
||||
uri, text, NULL,
|
||||
&status, &error);
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "file/file-save.h"
|
||||
#include "file/file-utils.h"
|
||||
|
@ -300,6 +301,7 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
|||
|
||||
status = file_save_as (gimage,
|
||||
gimp_get_user_context (gimage->gimp),
|
||||
GIMP_PROGRESS (save_dialog),
|
||||
uri,
|
||||
raw_filename,
|
||||
save_proc,
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "core/gimpimage.h"
|
||||
#include "core/gimppalette.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "text/gimpfont.h"
|
||||
|
||||
|
@ -54,13 +55,13 @@
|
|||
#include "widgets/gimpmenufactory.h"
|
||||
#include "widgets/gimppaletteselect.h"
|
||||
#include "widgets/gimppatternselect.h"
|
||||
#include "widgets/gimpprogressdialog.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpprogress.h"
|
||||
|
||||
#include "actions/plug-in-actions.h"
|
||||
|
||||
|
@ -106,20 +107,8 @@ static void gui_menus_create_entry (Gimp *gimp,
|
|||
PlugInProcDef *proc_def);
|
||||
static void gui_menus_delete_entry (Gimp *gimp,
|
||||
PlugInProcDef *proc_def);
|
||||
static GimpProgress * gui_start_progress (Gimp *gimp,
|
||||
gint gdisp_ID,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
static GimpProgress * gui_restart_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data);
|
||||
static void gui_update_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
gdouble percentage);
|
||||
static void gui_end_progress (Gimp *gimp,
|
||||
static GimpProgress * gui_new_progress (Gimp *gimp);
|
||||
static void gui_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress);
|
||||
static gboolean gui_pdb_dialog_new (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
|
@ -163,10 +152,8 @@ gui_vtable_init (Gimp *gimp)
|
|||
gimp->gui.menus_init = gui_menus_init;
|
||||
gimp->gui.menus_create = gui_menus_create_entry;
|
||||
gimp->gui.menus_delete = gui_menus_delete_entry;
|
||||
gimp->gui.progress_start = gui_start_progress;
|
||||
gimp->gui.progress_restart = gui_restart_progress;
|
||||
gimp->gui.progress_update = gui_update_progress;
|
||||
gimp->gui.progress_end = gui_end_progress;
|
||||
gimp->gui.progress_new = gui_new_progress;
|
||||
gimp->gui.progress_free = gui_free_progress;
|
||||
gimp->gui.pdb_dialog_new = gui_pdb_dialog_new;
|
||||
gimp->gui.pdb_dialog_set = gui_pdb_dialog_set;
|
||||
gimp->gui.pdb_dialog_close = gui_pdb_dialog_close;
|
||||
|
@ -410,43 +397,18 @@ gui_menus_delete_entry (Gimp *gimp,
|
|||
}
|
||||
|
||||
static GimpProgress *
|
||||
gui_start_progress (Gimp *gimp,
|
||||
gint gdisp_ID,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data)
|
||||
gui_new_progress (Gimp *gimp)
|
||||
{
|
||||
GimpDisplay *gdisp = NULL;
|
||||
|
||||
if (gdisp_ID > 0)
|
||||
gdisp = gimp_display_get_by_ID (gimp, gdisp_ID);
|
||||
|
||||
return gimp_progress_start (gdisp, message, TRUE, cancel_cb, cancel_data);
|
||||
}
|
||||
|
||||
static GimpProgress *
|
||||
gui_restart_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
const gchar *message,
|
||||
GCallback cancel_cb,
|
||||
gpointer cancel_data)
|
||||
{
|
||||
return gimp_progress_restart (progress, message, cancel_cb, cancel_data);
|
||||
return GIMP_PROGRESS (gimp_progress_dialog_new ());
|
||||
}
|
||||
|
||||
static void
|
||||
gui_update_progress (Gimp *gimp,
|
||||
GimpProgress *progress,
|
||||
gdouble percentage)
|
||||
gui_free_progress (Gimp *gimp,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
gimp_progress_update (progress, percentage);
|
||||
}
|
||||
g_return_if_fail (GIMP_IS_PROGRESS_DIALOG (progress));
|
||||
|
||||
static void
|
||||
gui_end_progress (Gimp *gimp,
|
||||
GimpProgress *progress)
|
||||
{
|
||||
gimp_progress_end (progress);
|
||||
gtk_widget_destroy (GTK_WIDGET (progress));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -42,9 +42,10 @@ register_brush_select_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
brushes_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *brush_callback;
|
||||
|
@ -145,9 +146,10 @@ static ProcRecord brushes_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *brush_callback;
|
||||
|
@ -194,9 +196,10 @@ static ProcRecord brushes_close_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *brush_callback;
|
||||
|
|
|
@ -64,9 +64,10 @@ register_brushes_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
brushes_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_data_factory_data_save (gimp->brush_factory);
|
||||
gimp_data_factory_data_init (gimp->brush_factory, FALSE);
|
||||
|
@ -90,9 +91,10 @@ static ProcRecord brushes_refresh_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -158,9 +160,10 @@ static ProcRecord brushes_get_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_brush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_brush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -222,9 +225,10 @@ static ProcRecord brushes_get_brush_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_set_brush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_set_brush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -274,9 +278,10 @@ static ProcRecord brushes_set_brush_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
|
||||
|
@ -312,9 +317,10 @@ static ProcRecord brushes_get_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gdouble opacity;
|
||||
|
@ -355,9 +361,10 @@ static ProcRecord brushes_set_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_spacing_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_spacing_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
|
||||
|
@ -393,9 +400,10 @@ static ProcRecord brushes_get_spacing_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_set_spacing_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_set_spacing_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gint32 spacing;
|
||||
|
@ -436,9 +444,10 @@ static ProcRecord brushes_set_spacing_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_paint_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_paint_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
|
||||
|
@ -474,9 +483,10 @@ static ProcRecord brushes_get_paint_mode_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_set_paint_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_set_paint_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gint32 paint_mode;
|
||||
|
@ -517,9 +527,10 @@ static ProcRecord brushes_set_paint_mode_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
brushes_get_brush_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brushes_get_brush_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -57,9 +57,10 @@ register_channel_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
channel_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -170,9 +171,10 @@ static ProcRecord channel_new_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -233,9 +235,10 @@ static ProcRecord channel_copy_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_combine_masks_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_combine_masks_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpChannel *channel1;
|
||||
|
@ -314,9 +317,10 @@ static ProcRecord channel_combine_masks_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_get_show_masked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_get_show_masked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -369,9 +373,10 @@ static ProcRecord channel_get_show_masked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_set_show_masked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_set_show_masked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpChannel *channel;
|
||||
|
@ -420,9 +425,10 @@ static ProcRecord channel_set_show_masked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -475,9 +481,10 @@ static ProcRecord channel_get_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpChannel *channel;
|
||||
|
@ -528,9 +535,10 @@ static ProcRecord channel_set_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_get_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_get_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -587,9 +595,10 @@ static ProcRecord channel_get_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
channel_set_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
channel_set_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpChannel *channel;
|
||||
|
|
|
@ -79,9 +79,10 @@ register_color_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
brightness_contrast_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
brightness_contrast_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -174,9 +175,10 @@ static ProcRecord brightness_contrast_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
levels_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
levels_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -327,9 +329,10 @@ static ProcRecord levels_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
levels_auto_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
levels_auto_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -416,9 +419,10 @@ static ProcRecord levels_auto_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
posterize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
posterize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -499,9 +503,10 @@ static ProcRecord posterize_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
desaturate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
desaturate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -547,9 +552,10 @@ static ProcRecord desaturate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
equalize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
equalize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -603,9 +609,10 @@ static ProcRecord equalize_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
invert_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
invert_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -651,9 +658,10 @@ static ProcRecord invert_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
curves_spline_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
curves_spline_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -774,9 +782,10 @@ static ProcRecord curves_spline_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
curves_explicit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
curves_explicit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -892,9 +901,10 @@ static ProcRecord curves_explicit_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
color_balance_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
color_balance_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1021,9 +1031,10 @@ static ProcRecord color_balance_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
histogram_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
histogram_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1176,9 +1187,10 @@ static ProcRecord histogram_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
hue_saturation_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
hue_saturation_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1296,9 +1308,10 @@ static ProcRecord hue_saturation_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
threshold_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
threshold_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -46,9 +46,10 @@ register_convert_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
image_convert_rgb_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_convert_rgb_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -60,7 +61,7 @@ image_convert_rgb_invoker (Gimp *gimp,
|
|||
if (success)
|
||||
{
|
||||
if (gimp_image_base_type (gimage) != GIMP_RGB)
|
||||
gimp_image_convert (gimage, GIMP_RGB, 0, 0, FALSE, FALSE, 0, NULL, NULL, NULL);
|
||||
gimp_image_convert (gimage, GIMP_RGB, 0, 0, FALSE, FALSE, 0, NULL, NULL);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -94,9 +95,10 @@ static ProcRecord image_convert_rgb_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_convert_grayscale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_convert_grayscale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -108,7 +110,7 @@ image_convert_grayscale_invoker (Gimp *gimp,
|
|||
if (success)
|
||||
{
|
||||
if (gimp_image_base_type (gimage) != GIMP_GRAY)
|
||||
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, FALSE, FALSE, 0, NULL, NULL, NULL);
|
||||
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, FALSE, FALSE, 0, NULL, NULL);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -142,9 +144,10 @@ static ProcRecord image_convert_grayscale_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_convert_indexed_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_convert_indexed_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -214,7 +217,8 @@ image_convert_indexed_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
gimp_image_convert (gimage, GIMP_INDEXED, num_cols, dither_type,
|
||||
alpha_dither, remove_unused, palette_type, palette, NULL, NULL);
|
||||
alpha_dither, remove_unused, palette_type, palette,
|
||||
NULL);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_convert_indexed_proc, success);
|
||||
|
|
|
@ -45,9 +45,10 @@ register_display_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
display_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
display_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -112,9 +113,10 @@ static ProcRecord display_new_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
display_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
display_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpObject *display;
|
||||
|
@ -155,9 +157,10 @@ static ProcRecord display_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
displays_flush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
displays_flush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);
|
||||
return procedural_db_return_args (&displays_flush_proc, TRUE);
|
||||
|
@ -180,9 +183,10 @@ static ProcRecord displays_flush_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
displays_reconnect_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
displays_reconnect_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *old_image;
|
||||
|
|
|
@ -110,9 +110,10 @@ register_drawable_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
drawable_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -158,9 +159,10 @@ static ProcRecord drawable_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -213,9 +215,10 @@ static ProcRecord drawable_is_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -268,9 +271,10 @@ static ProcRecord drawable_is_layer_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -323,9 +327,10 @@ static ProcRecord drawable_is_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -378,9 +383,10 @@ static ProcRecord drawable_type_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_type_with_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_type_with_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -433,9 +439,10 @@ static ProcRecord drawable_type_with_alpha_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_has_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_has_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -488,9 +495,10 @@ static ProcRecord drawable_has_alpha_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_rgb_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_rgb_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -543,9 +551,10 @@ static ProcRecord drawable_is_rgb_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_gray_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_gray_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -598,9 +607,10 @@ static ProcRecord drawable_is_gray_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_is_indexed_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_is_indexed_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -653,9 +663,10 @@ static ProcRecord drawable_is_indexed_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_bpp_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_bpp_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -708,9 +719,10 @@ static ProcRecord drawable_bpp_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_width_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_width_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -763,9 +775,10 @@ static ProcRecord drawable_width_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_height_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_height_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -818,9 +831,10 @@ static ProcRecord drawable_height_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_offsets_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_offsets_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -886,9 +900,10 @@ static ProcRecord drawable_offsets_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_image_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_image_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -945,9 +960,10 @@ static ProcRecord drawable_get_image_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_image_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_image_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -998,9 +1014,10 @@ static ProcRecord drawable_set_image_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1053,9 +1070,10 @@ static ProcRecord drawable_get_name_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1106,9 +1124,10 @@ static ProcRecord drawable_set_name_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1161,9 +1180,10 @@ static ProcRecord drawable_get_visible_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1212,9 +1232,10 @@ static ProcRecord drawable_set_visible_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_linked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_linked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1267,9 +1288,10 @@ static ProcRecord drawable_get_linked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_linked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_linked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1318,9 +1340,10 @@ static ProcRecord drawable_set_linked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1373,9 +1396,10 @@ static ProcRecord drawable_get_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1426,9 +1450,10 @@ static ProcRecord drawable_set_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_mask_bounds_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_mask_bounds_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1515,9 +1540,10 @@ static ProcRecord drawable_mask_bounds_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_merge_shadow_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_merge_shadow_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1577,9 +1603,10 @@ static ProcRecord drawable_merge_shadow_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_update_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_update_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1652,9 +1679,10 @@ static ProcRecord drawable_update_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_get_pixel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_get_pixel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1764,9 +1792,10 @@ static ProcRecord drawable_get_pixel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_set_pixel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_set_pixel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1865,9 +1894,10 @@ static ProcRecord drawable_set_pixel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1918,9 +1948,10 @@ static ProcRecord drawable_fill_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_offset_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_offset_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1998,9 +2029,10 @@ static ProcRecord drawable_offset_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -60,9 +60,10 @@ register_edit_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
edit_cut_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_cut_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -123,9 +124,10 @@ static ProcRecord edit_cut_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -186,9 +188,10 @@ static ProcRecord edit_copy_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_paste_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_paste_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -265,9 +268,10 @@ static ProcRecord edit_paste_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_clear_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_clear_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -312,9 +316,10 @@ static ProcRecord edit_clear_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -369,9 +374,10 @@ static ProcRecord edit_fill_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_bucket_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_bucket_fill_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -495,9 +501,10 @@ static ProcRecord edit_bucket_fill_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_blend_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_blend_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -585,7 +592,7 @@ edit_blend_invoker (Gimp *gimp,
|
|||
supersample, max_depth,
|
||||
threshold, dither,
|
||||
x1, y1, x2, y2,
|
||||
NULL, NULL);
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -693,9 +700,10 @@ static ProcRecord edit_blend_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
edit_stroke_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
edit_stroke_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -79,9 +79,10 @@ register_fileops_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
file_load_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
file_load_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *new_args;
|
||||
Argument *return_vals;
|
||||
|
@ -114,7 +115,7 @@ file_load_invoker (Gimp *gimp,
|
|||
new_args[i].value.pdb_pointer = g_strdup ("");
|
||||
}
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, proc->name, new_args);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, proc->name, new_args);
|
||||
g_free (new_args);
|
||||
|
||||
return return_vals;
|
||||
|
@ -165,9 +166,10 @@ static ProcRecord file_load_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
file_save_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
file_save_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *new_args;
|
||||
Argument *return_vals;
|
||||
|
@ -200,7 +202,7 @@ file_save_invoker (Gimp *gimp,
|
|||
new_args[i].value.pdb_pointer = g_strdup ("");
|
||||
}
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, proc->name, new_args);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, proc->name, new_args);
|
||||
g_free (new_args);
|
||||
|
||||
return return_vals;
|
||||
|
@ -252,9 +254,10 @@ static ProcRecord file_save_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
file_load_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
file_load_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -383,9 +386,10 @@ static ProcRecord file_load_thumbnail_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
file_save_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
file_save_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -465,9 +469,10 @@ static ProcRecord file_save_thumbnail_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
temp_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
temp_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -542,9 +547,10 @@ static ProcRecord temp_name_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
register_magic_load_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
register_magic_load_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -644,9 +650,10 @@ static ProcRecord register_magic_load_handler_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
register_load_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
register_load_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
int i;
|
||||
Argument argv[4];
|
||||
|
@ -657,7 +664,7 @@ register_load_handler_invoker (Gimp *gimp,
|
|||
argv[3].arg_type = GIMP_PDB_STRING;
|
||||
argv[3].value.pdb_pointer = NULL;
|
||||
|
||||
return register_magic_load_handler_invoker (gimp, context, argv);
|
||||
return register_magic_load_handler_invoker (gimp, context, progress, argv);
|
||||
}
|
||||
|
||||
static ProcArg register_load_handler_inargs[] =
|
||||
|
@ -696,9 +703,10 @@ static ProcRecord register_load_handler_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
register_save_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
register_save_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -790,9 +798,10 @@ static ProcRecord register_save_handler_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
register_file_handler_mime_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
register_file_handler_mime_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
|
|
@ -49,9 +49,10 @@ register_floating_sel_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
floating_sel_remove_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_remove_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *floating_sel;
|
||||
|
@ -97,9 +98,10 @@ static ProcRecord floating_sel_remove_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
floating_sel_anchor_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_anchor_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *floating_sel;
|
||||
|
@ -145,9 +147,10 @@ static ProcRecord floating_sel_anchor_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
floating_sel_to_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_to_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *floating_sel;
|
||||
|
@ -193,9 +196,10 @@ static ProcRecord floating_sel_to_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
floating_sel_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -251,9 +255,10 @@ static ProcRecord floating_sel_attach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
floating_sel_rigor_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_rigor_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *floating_sel;
|
||||
|
@ -307,9 +312,10 @@ static ProcRecord floating_sel_rigor_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
floating_sel_relax_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
floating_sel_relax_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *floating_sel;
|
||||
|
|
|
@ -41,9 +41,10 @@ register_font_select_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
fonts_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
fonts_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *font_callback;
|
||||
|
@ -111,9 +112,10 @@ static ProcRecord fonts_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
fonts_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
fonts_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *font_callback;
|
||||
|
@ -159,9 +161,10 @@ static ProcRecord fonts_close_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
fonts_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
fonts_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *font_callback;
|
||||
|
|
|
@ -42,9 +42,10 @@ register_fonts_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
fonts_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
fonts_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_fonts_load (gimp);
|
||||
return procedural_db_return_args (&fonts_refresh_proc, TRUE);
|
||||
|
@ -67,9 +68,10 @@ static ProcRecord fonts_refresh_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
fonts_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
fonts_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "plug-in/plug-in-run.h"
|
||||
|
||||
|
@ -214,16 +215,18 @@ procedural_db_lookup (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args = NULL;
|
||||
GList *list;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
list = g_hash_table_lookup (gimp->procedural_ht, name);
|
||||
|
@ -288,13 +291,14 @@ procedural_db_execute (Gimp *gimp,
|
|||
case GIMP_INTERNAL:
|
||||
return_args =
|
||||
(* procedure->exec_method.internal.marshal_func) (gimp, context,
|
||||
progress,
|
||||
args);
|
||||
break;
|
||||
|
||||
case GIMP_PLUGIN:
|
||||
case GIMP_EXTENSION:
|
||||
case GIMP_TEMPORARY:
|
||||
return_args = plug_in_run (gimp, context, procedure,
|
||||
return_args = plug_in_run (gimp, context, progress, procedure,
|
||||
args, procedure->num_args,
|
||||
TRUE, FALSE, -1);
|
||||
break;
|
||||
|
@ -336,10 +340,11 @@ procedural_db_execute (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...)
|
||||
{
|
||||
ProcRecord *proc;
|
||||
|
@ -350,6 +355,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (nreturn_vals != NULL, NULL);
|
||||
|
||||
|
@ -441,7 +447,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
*nreturn_vals = proc->num_values;
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, name, params);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, name, params);
|
||||
|
||||
g_free (params);
|
||||
|
||||
|
|
|
@ -35,9 +35,10 @@ struct _Argument
|
|||
|
||||
|
||||
/* Argument marshalling procedures */
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args);
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args);
|
||||
|
||||
|
||||
/* Execution types */
|
||||
|
@ -136,10 +137,12 @@ ProcRecord * procedural_db_lookup (Gimp *gimp,
|
|||
|
||||
Argument * procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args);
|
||||
Argument * procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "plug-in/plug-in-run.h"
|
||||
|
||||
|
@ -214,16 +215,18 @@ procedural_db_lookup (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args = NULL;
|
||||
GList *list;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
list = g_hash_table_lookup (gimp->procedural_ht, name);
|
||||
|
@ -288,13 +291,14 @@ procedural_db_execute (Gimp *gimp,
|
|||
case GIMP_INTERNAL:
|
||||
return_args =
|
||||
(* procedure->exec_method.internal.marshal_func) (gimp, context,
|
||||
progress,
|
||||
args);
|
||||
break;
|
||||
|
||||
case GIMP_PLUGIN:
|
||||
case GIMP_EXTENSION:
|
||||
case GIMP_TEMPORARY:
|
||||
return_args = plug_in_run (gimp, context, procedure,
|
||||
return_args = plug_in_run (gimp, context, progress, procedure,
|
||||
args, procedure->num_args,
|
||||
TRUE, FALSE, -1);
|
||||
break;
|
||||
|
@ -336,10 +340,11 @@ procedural_db_execute (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...)
|
||||
{
|
||||
ProcRecord *proc;
|
||||
|
@ -350,6 +355,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (nreturn_vals != NULL, NULL);
|
||||
|
||||
|
@ -441,7 +447,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
*nreturn_vals = proc->num_values;
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, name, params);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, name, params);
|
||||
|
||||
g_free (params);
|
||||
|
||||
|
|
|
@ -35,9 +35,10 @@ struct _Argument
|
|||
|
||||
|
||||
/* Argument marshalling procedures */
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args);
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args);
|
||||
|
||||
|
||||
/* Execution types */
|
||||
|
@ -136,10 +137,12 @@ ProcRecord * procedural_db_lookup (Gimp *gimp,
|
|||
|
||||
Argument * procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args);
|
||||
Argument * procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "plug-in/plug-in-run.h"
|
||||
|
||||
|
@ -214,16 +215,18 @@ procedural_db_lookup (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args = NULL;
|
||||
GList *list;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
list = g_hash_table_lookup (gimp->procedural_ht, name);
|
||||
|
@ -288,13 +291,14 @@ procedural_db_execute (Gimp *gimp,
|
|||
case GIMP_INTERNAL:
|
||||
return_args =
|
||||
(* procedure->exec_method.internal.marshal_func) (gimp, context,
|
||||
progress,
|
||||
args);
|
||||
break;
|
||||
|
||||
case GIMP_PLUGIN:
|
||||
case GIMP_EXTENSION:
|
||||
case GIMP_TEMPORARY:
|
||||
return_args = plug_in_run (gimp, context, procedure,
|
||||
return_args = plug_in_run (gimp, context, progress, procedure,
|
||||
args, procedure->num_args,
|
||||
TRUE, FALSE, -1);
|
||||
break;
|
||||
|
@ -336,10 +340,11 @@ procedural_db_execute (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...)
|
||||
{
|
||||
ProcRecord *proc;
|
||||
|
@ -350,6 +355,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (nreturn_vals != NULL, NULL);
|
||||
|
||||
|
@ -441,7 +447,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
*nreturn_vals = proc->num_values;
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, name, params);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, name, params);
|
||||
|
||||
g_free (params);
|
||||
|
||||
|
|
|
@ -35,9 +35,10 @@ struct _Argument
|
|||
|
||||
|
||||
/* Argument marshalling procedures */
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args);
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args);
|
||||
|
||||
|
||||
/* Execution types */
|
||||
|
@ -136,10 +137,12 @@ ProcRecord * procedural_db_lookup (Gimp *gimp,
|
|||
|
||||
Argument * procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args);
|
||||
Argument * procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...);
|
||||
|
|
|
@ -54,9 +54,10 @@ register_gimprc_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
gimprc_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gimprc_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -119,9 +120,10 @@ static ProcRecord gimprc_query_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gimprc_set_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gimprc_set_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *token;
|
||||
|
@ -175,9 +177,10 @@ static ProcRecord gimprc_set_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
get_default_comment_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
get_default_comment_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gchar *comment;
|
||||
|
@ -216,9 +219,10 @@ static ProcRecord get_default_comment_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
get_monitor_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
get_monitor_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gdouble xres;
|
||||
|
@ -266,9 +270,10 @@ static ProcRecord get_monitor_resolution_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
get_theme_dir_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
get_theme_dir_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gchar *theme_dir;
|
||||
|
@ -307,9 +312,10 @@ static ProcRecord get_theme_dir_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
get_module_load_inhibit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
get_module_load_inhibit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gchar *load_inhibit;
|
||||
|
|
|
@ -89,9 +89,10 @@ register_gradient_edit_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_left_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_left_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -196,9 +197,10 @@ static ProcRecord gradient_segment_get_left_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_set_left_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_set_left_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -296,9 +298,10 @@ static ProcRecord gradient_segment_set_left_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_right_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_right_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -403,9 +406,10 @@ static ProcRecord gradient_segment_get_right_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_set_right_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_set_right_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -503,9 +507,10 @@ static ProcRecord gradient_segment_set_right_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_left_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_left_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -600,9 +605,10 @@ static ProcRecord gradient_segment_get_left_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_set_left_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_set_left_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -708,9 +714,10 @@ static ProcRecord gradient_segment_set_left_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_middle_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_middle_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -805,9 +812,10 @@ static ProcRecord gradient_segment_get_middle_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_set_middle_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_set_middle_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -913,9 +921,10 @@ static ProcRecord gradient_segment_set_middle_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_right_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_right_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1010,9 +1019,10 @@ static ProcRecord gradient_segment_get_right_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_set_right_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_set_right_pos_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1118,9 +1128,10 @@ static ProcRecord gradient_segment_set_right_pos_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_blending_function_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_blending_function_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1216,9 +1227,10 @@ static ProcRecord gradient_segment_get_blending_function_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_get_coloring_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_get_coloring_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1314,9 +1326,10 @@ static ProcRecord gradient_segment_get_coloring_type_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_set_blending_function_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_set_blending_function_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -1435,9 +1448,10 @@ static ProcRecord gradient_segment_range_set_blending_function_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_set_coloring_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_set_coloring_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -1556,9 +1570,10 @@ static ProcRecord gradient_segment_range_set_coloring_type_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_flip_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_flip_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -1667,9 +1682,10 @@ static ProcRecord gradient_segment_range_flip_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_replicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_replicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -1789,9 +1805,10 @@ static ProcRecord gradient_segment_range_replicate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_split_midpoint_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_split_midpoint_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -1900,9 +1917,10 @@ static ProcRecord gradient_segment_range_split_midpoint_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_split_uniform_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_split_uniform_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -2022,9 +2040,10 @@ static ProcRecord gradient_segment_range_split_uniform_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -2133,9 +2152,10 @@ static ProcRecord gradient_segment_range_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_redistribute_handles_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_redistribute_handles_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -2243,9 +2263,10 @@ static ProcRecord gradient_segment_range_redistribute_handles_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_blend_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_blend_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -2355,9 +2376,10 @@ static ProcRecord gradient_segment_range_blend_colors_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_blend_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_blend_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -2467,9 +2489,10 @@ static ProcRecord gradient_segment_range_blend_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradient_segment_range_move_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradient_segment_range_move_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -43,9 +43,10 @@ register_gradient_select_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
gradients_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *gradient_callback;
|
||||
|
@ -124,9 +125,10 @@ static ProcRecord gradients_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *gradient_callback;
|
||||
|
@ -173,9 +175,10 @@ static ProcRecord gradients_close_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *gradient_callback;
|
||||
|
|
|
@ -63,9 +63,10 @@ register_gradients_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
gradients_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_data_factory_data_save (gimp->gradient_factory);
|
||||
gimp_data_factory_data_init (gimp->gradient_factory, FALSE);
|
||||
|
@ -89,9 +90,10 @@ static ProcRecord gradients_refresh_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -157,9 +159,10 @@ static ProcRecord gradients_get_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_get_gradient_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_get_gradient_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -200,9 +203,10 @@ static ProcRecord gradients_get_gradient_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_set_gradient_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_set_gradient_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -252,9 +256,10 @@ static ProcRecord gradients_set_gradient_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_sample_uniform_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_sample_uniform_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -353,9 +358,10 @@ static ProcRecord gradients_sample_uniform_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_sample_custom_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_sample_custom_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -458,9 +464,10 @@ static ProcRecord gradients_sample_custom_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_get_gradient_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_get_gradient_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -589,9 +596,10 @@ static ProcRecord gradients_get_gradient_data_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -651,9 +659,10 @@ static ProcRecord gradients_new_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_duplicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_duplicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -735,9 +744,10 @@ static ProcRecord gradients_duplicate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -807,9 +817,10 @@ static ProcRecord gradients_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
gradients_rename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
gradients_rename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -49,9 +49,10 @@ register_guides_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
image_add_hguide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_add_hguide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -127,9 +128,10 @@ static ProcRecord image_add_hguide_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_add_vguide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_add_vguide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -205,9 +207,10 @@ static ProcRecord image_add_vguide_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_delete_guide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_delete_guide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -271,9 +274,10 @@ static ProcRecord image_delete_guide_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_find_next_guide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_find_next_guide_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -376,9 +380,10 @@ static ProcRecord image_find_next_guide_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_guide_orientation_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_guide_orientation_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -459,9 +464,10 @@ static ProcRecord image_get_guide_orientation_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_guide_position_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_guide_position_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -39,9 +39,10 @@ register_help_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
help_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
help_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *help_domain;
|
||||
|
|
|
@ -190,9 +190,10 @@ register_image_procs (Gimp *gimp)
|
|||
#endif
|
||||
|
||||
static Argument *
|
||||
image_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gint32 num_images = 0;
|
||||
|
@ -249,9 +250,10 @@ static ProcRecord image_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -331,9 +333,10 @@ static ProcRecord image_new_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_duplicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_duplicate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -390,9 +393,10 @@ static ProcRecord image_duplicate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -438,9 +442,10 @@ static ProcRecord image_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_base_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_base_type_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -497,9 +502,10 @@ static ProcRecord image_base_type_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_width_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_width_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -552,9 +558,10 @@ static ProcRecord image_width_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_height_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_height_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -607,9 +614,10 @@ static ProcRecord image_height_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_free_shadow_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_free_shadow_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -650,9 +658,10 @@ static ProcRecord image_free_shadow_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_resize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_resize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -680,7 +689,7 @@ image_resize_invoker (Gimp *gimp,
|
|||
if (success)
|
||||
{
|
||||
gimp_image_resize (gimage, context,
|
||||
new_width, new_height, offx, offy, NULL, NULL);
|
||||
new_width, new_height, offx, offy, NULL);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_resize_proc, success);
|
||||
|
@ -732,9 +741,10 @@ static ProcRecord image_resize_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_scale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_scale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -757,7 +767,7 @@ image_scale_invoker (Gimp *gimp,
|
|||
{
|
||||
gimp_image_scale (gimage, new_width, new_height,
|
||||
gimp->config->interpolation_type,
|
||||
NULL, NULL);
|
||||
NULL);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_scale_proc, success);
|
||||
|
@ -799,9 +809,10 @@ static ProcRecord image_scale_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_crop_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_crop_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -892,9 +903,10 @@ static ProcRecord image_crop_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_flip_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_flip_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -910,7 +922,7 @@ image_flip_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
gimp_image_flip (gimage, context, flip_type, NULL, NULL);
|
||||
gimp_image_flip (gimage, context, flip_type, NULL);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_flip_proc, success);
|
||||
|
@ -947,9 +959,10 @@ static ProcRecord image_flip_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_rotate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_rotate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -965,7 +978,7 @@ image_rotate_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
gimp_image_rotate (gimage, context, rotate_type, NULL, NULL);
|
||||
gimp_image_rotate (gimage, context, rotate_type, NULL);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_rotate_proc, success);
|
||||
|
@ -1002,9 +1015,10 @@ static ProcRecord image_rotate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_layers_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_layers_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1082,9 +1096,10 @@ static ProcRecord image_get_layers_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_channels_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_channels_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1162,9 +1177,10 @@ static ProcRecord image_get_channels_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_active_drawable_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_active_drawable_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1221,9 +1237,10 @@ static ProcRecord image_get_active_drawable_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_unset_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_unset_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1264,9 +1281,10 @@ static ProcRecord image_unset_active_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_floating_sel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_floating_sel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1323,9 +1341,10 @@ static ProcRecord image_get_floating_sel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_floating_sel_attached_to_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_floating_sel_attached_to_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1390,9 +1409,10 @@ static ProcRecord image_floating_sel_attached_to_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_pick_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_pick_color_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1514,9 +1534,10 @@ static ProcRecord image_pick_color_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_pick_correlate_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_pick_correlate_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1589,9 +1610,10 @@ static ProcRecord image_pick_correlate_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_add_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_add_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1660,9 +1682,10 @@ static ProcRecord image_add_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_remove_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_remove_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1713,9 +1736,10 @@ static ProcRecord image_remove_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_raise_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_raise_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1766,9 +1790,10 @@ static ProcRecord image_raise_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_lower_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_lower_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1819,9 +1844,10 @@ static ProcRecord image_lower_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_raise_layer_to_top_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_raise_layer_to_top_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1872,9 +1898,10 @@ static ProcRecord image_raise_layer_to_top_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_lower_layer_to_bottom_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_lower_layer_to_bottom_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1925,9 +1952,10 @@ static ProcRecord image_lower_layer_to_bottom_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_add_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_add_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1986,9 +2014,10 @@ static ProcRecord image_add_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_remove_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_remove_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2039,9 +2068,10 @@ static ProcRecord image_remove_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_raise_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_raise_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2092,9 +2122,10 @@ static ProcRecord image_raise_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_lower_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_lower_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2145,9 +2176,10 @@ static ProcRecord image_lower_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_flatten_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_flatten_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2204,9 +2236,10 @@ static ProcRecord image_flatten_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_merge_visible_layers_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_merge_visible_layers_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2276,9 +2309,10 @@ static ProcRecord image_merge_visible_layers_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_merge_down_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_merge_down_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2358,9 +2392,10 @@ static ProcRecord image_merge_down_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_add_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_add_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2423,9 +2458,10 @@ static ProcRecord image_add_layer_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_remove_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_remove_layer_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2486,9 +2522,10 @@ static ProcRecord image_remove_layer_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_cmap_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_cmap_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2557,9 +2594,10 @@ static ProcRecord image_get_cmap_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_cmap_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_cmap_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2618,9 +2656,10 @@ static ProcRecord image_set_cmap_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_clean_all_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_clean_all_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2661,9 +2700,10 @@ static ProcRecord image_clean_all_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_is_dirty_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_is_dirty_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2720,9 +2760,10 @@ static ProcRecord image_is_dirty_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_thumbnail_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2867,9 +2908,10 @@ static ProcRecord image_thumbnail_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_active_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_active_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -2926,9 +2968,10 @@ static ProcRecord image_get_active_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_active_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_active_layer_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -2979,9 +3022,10 @@ static ProcRecord image_set_active_layer_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3038,9 +3082,10 @@ static ProcRecord image_get_active_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_active_channel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3091,9 +3136,10 @@ static ProcRecord image_set_active_channel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_selection_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_selection_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3150,9 +3196,10 @@ static ProcRecord image_get_selection_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_component_active_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_component_active_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3225,9 +3272,10 @@ static ProcRecord image_get_component_active_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_component_active_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_component_active_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3296,9 +3344,10 @@ static ProcRecord image_set_component_active_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_component_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_component_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3371,9 +3420,10 @@ static ProcRecord image_get_component_visible_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_component_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_component_visible_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3442,9 +3492,10 @@ static ProcRecord image_set_component_visible_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_filename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_filename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3497,9 +3548,10 @@ static ProcRecord image_get_filename_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_filename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_filename_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3550,9 +3602,10 @@ static ProcRecord image_set_filename_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3622,9 +3675,10 @@ static ProcRecord image_get_name_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3685,9 +3739,10 @@ static ProcRecord image_get_resolution_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_resolution_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3758,9 +3813,10 @@ static ProcRecord image_set_resolution_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_unit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_unit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3813,9 +3869,10 @@ static ProcRecord image_get_unit_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_unit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_unit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3866,9 +3923,10 @@ static ProcRecord image_set_unit_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_tattoo_state_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_tattoo_state_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -3921,9 +3979,10 @@ static ProcRecord image_get_tattoo_state_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_set_tattoo_state_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_set_tattoo_state_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -3972,9 +4031,10 @@ static ProcRecord image_set_tattoo_state_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_layer_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_layer_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -4044,9 +4104,10 @@ static ProcRecord image_get_layer_by_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_get_channel_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_get_channel_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -96,9 +96,10 @@ register_layer_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
layer_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_new_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -222,9 +223,10 @@ static ProcRecord layer_new_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_new_from_drawable_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_new_from_drawable_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -309,9 +311,10 @@ static ProcRecord layer_new_from_drawable_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_copy_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -376,9 +379,10 @@ static ProcRecord layer_copy_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_add_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_add_alpha_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -419,9 +423,10 @@ static ProcRecord layer_add_alpha_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_scale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_scale_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -444,7 +449,7 @@ layer_scale_invoker (Gimp *gimp,
|
|||
local_origin = args[3].value.pdb_int ? TRUE : FALSE;
|
||||
|
||||
if (success)
|
||||
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height, gimp->config->interpolation_type, NULL, NULL, local_origin);
|
||||
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height, gimp->config->interpolation_type, NULL, local_origin);
|
||||
|
||||
return procedural_db_return_args (&layer_scale_proc, success);
|
||||
}
|
||||
|
@ -490,9 +495,10 @@ static ProcRecord layer_scale_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_resize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_resize_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -569,9 +575,10 @@ static ProcRecord layer_resize_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_resize_to_image_size_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_resize_to_image_size_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -617,9 +624,10 @@ static ProcRecord layer_resize_to_image_size_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_translate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_translate_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -694,9 +702,10 @@ static ProcRecord layer_translate_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_offsets_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_offsets_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -771,9 +780,10 @@ static ProcRecord layer_set_offsets_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_create_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_create_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -840,9 +850,10 @@ static ProcRecord layer_create_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -895,9 +906,10 @@ static ProcRecord layer_get_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_add_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_add_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -950,9 +962,10 @@ static ProcRecord layer_add_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_remove_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_remove_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1003,9 +1016,10 @@ static ProcRecord layer_remove_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_is_floating_sel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_is_floating_sel_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1058,9 +1072,10 @@ static ProcRecord layer_is_floating_sel_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_preserve_trans_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_preserve_trans_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1113,9 +1128,10 @@ static ProcRecord layer_get_preserve_trans_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_preserve_trans_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_preserve_trans_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1164,9 +1180,10 @@ static ProcRecord layer_set_preserve_trans_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_apply_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_apply_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1219,9 +1236,10 @@ static ProcRecord layer_get_apply_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_apply_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_apply_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1270,9 +1288,10 @@ static ProcRecord layer_set_apply_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_show_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_show_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1325,9 +1344,10 @@ static ProcRecord layer_get_show_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_show_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_show_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1376,9 +1396,10 @@ static ProcRecord layer_set_show_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_edit_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_edit_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1431,9 +1452,10 @@ static ProcRecord layer_get_edit_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_edit_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_edit_mask_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1482,9 +1504,10 @@ static ProcRecord layer_set_edit_mask_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1537,9 +1560,10 @@ static ProcRecord layer_get_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_opacity_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
@ -1590,9 +1614,10 @@ static ProcRecord layer_set_opacity_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_get_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_get_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1645,9 +1670,10 @@ static ProcRecord layer_get_mode_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
layer_set_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
layer_set_mode_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLayer *layer;
|
||||
|
|
|
@ -44,9 +44,10 @@ register_message_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
message_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
message_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *message;
|
||||
|
@ -96,9 +97,10 @@ static ProcRecord message_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
message_get_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
message_get_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
|
||||
|
@ -134,9 +136,10 @@ static ProcRecord message_get_handler_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
message_set_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
message_set_handler_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gint32 handler;
|
||||
|
|
|
@ -41,9 +41,10 @@ register_misc_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
version_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
version_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
|
||||
|
@ -79,9 +80,10 @@ static ProcRecord version_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
quit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
quit_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean force;
|
||||
|
||||
|
|
|
@ -132,9 +132,10 @@ paint_tools_stroke (Gimp *gimp,
|
|||
}
|
||||
|
||||
static Argument *
|
||||
airbrush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
airbrush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -216,9 +217,10 @@ static ProcRecord airbrush_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
airbrush_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
airbrush_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -288,9 +290,10 @@ static ProcRecord airbrush_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
clone_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
clone_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -409,9 +412,10 @@ static ProcRecord clone_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
clone_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
clone_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -481,9 +485,10 @@ static ProcRecord clone_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
convolve_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
convolve_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -578,9 +583,10 @@ static ProcRecord convolve_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
convolve_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
convolve_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -650,9 +656,10 @@ static ProcRecord convolve_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
dodgeburn_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
dodgeburn_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -758,9 +765,10 @@ static ProcRecord dodgeburn_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
dodgeburn_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
dodgeburn_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -830,9 +838,10 @@ static ProcRecord dodgeburn_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
eraser_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
eraser_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -927,9 +936,10 @@ static ProcRecord eraser_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
eraser_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
eraser_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -999,9 +1009,10 @@ static ProcRecord eraser_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
paintbrush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
paintbrush_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1109,9 +1120,10 @@ static ProcRecord paintbrush_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
paintbrush_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
paintbrush_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1181,9 +1193,10 @@ static ProcRecord paintbrush_default_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
pencil_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
pencil_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1253,9 +1266,10 @@ static ProcRecord pencil_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
smudge_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
smudge_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -1339,9 +1353,10 @@ static ProcRecord smudge_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
smudge_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
smudge_default_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
|
|
@ -50,9 +50,10 @@ register_palette_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
palette_get_foreground_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_get_foreground_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
GimpRGB color;
|
||||
|
@ -91,9 +92,10 @@ static ProcRecord palette_get_foreground_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palette_get_background_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_get_background_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
GimpRGB color;
|
||||
|
@ -132,9 +134,10 @@ static ProcRecord palette_get_background_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palette_set_foreground_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_set_foreground_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
GimpRGB color;
|
||||
|
||||
|
@ -172,9 +175,10 @@ static ProcRecord palette_set_foreground_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palette_set_background_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_set_background_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
GimpRGB color;
|
||||
|
||||
|
@ -212,9 +216,10 @@ static ProcRecord palette_set_background_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palette_set_default_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_set_default_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_context_set_default_colors (context);
|
||||
return procedural_db_return_args (&palette_set_default_colors_proc, TRUE);
|
||||
|
@ -237,9 +242,10 @@ static ProcRecord palette_set_default_colors_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palette_swap_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palette_swap_colors_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_context_swap_colors (context);
|
||||
return procedural_db_return_args (&palette_swap_colors_proc, TRUE);
|
||||
|
|
|
@ -42,9 +42,10 @@ register_palette_select_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
palettes_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *palette_callback;
|
||||
|
@ -112,9 +113,10 @@ static ProcRecord palettes_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *palette_callback;
|
||||
|
@ -161,9 +163,10 @@ static ProcRecord palettes_close_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *palette_callback;
|
||||
|
|
|
@ -53,9 +53,10 @@ register_palettes_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
palettes_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_data_factory_data_save (gimp->palette_factory);
|
||||
gimp_data_factory_data_init (gimp->palette_factory, FALSE);
|
||||
|
@ -79,9 +80,10 @@ static ProcRecord palettes_refresh_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -147,9 +149,10 @@ static ProcRecord palettes_get_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_get_palette_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_get_palette_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -199,9 +202,10 @@ static ProcRecord palettes_get_palette_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_set_palette_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_set_palette_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -251,9 +255,10 @@ static ProcRecord palettes_set_palette_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
palettes_get_palette_entry_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
palettes_get_palette_entry_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -63,9 +63,10 @@ register_parasite_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -125,9 +126,10 @@ static ProcRecord parasite_find_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpParasite *parasite;
|
||||
|
@ -168,9 +170,10 @@ static ProcRecord parasite_attach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -211,9 +214,10 @@ static ProcRecord parasite_detach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gint32 num_parasites;
|
||||
|
@ -260,9 +264,10 @@ static ProcRecord parasite_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -332,9 +337,10 @@ static ProcRecord drawable_parasite_find_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -385,9 +391,10 @@ static ProcRecord drawable_parasite_attach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpDrawable *drawable;
|
||||
|
@ -438,9 +445,10 @@ static ProcRecord drawable_parasite_detach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
drawable_parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
drawable_parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -506,9 +514,10 @@ static ProcRecord drawable_parasite_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_parasite_find_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -578,9 +587,10 @@ static ProcRecord image_parasite_find_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_parasite_attach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -631,9 +641,10 @@ static ProcRecord image_parasite_attach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_parasite_detach_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -684,9 +695,10 @@ static ProcRecord image_parasite_detach_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
image_parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
image_parasite_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -77,9 +77,10 @@ register_paths_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
path_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -145,9 +146,10 @@ static ProcRecord path_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_get_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_get_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -212,9 +214,10 @@ static ProcRecord path_get_current_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_set_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_set_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -273,9 +276,10 @@ static ProcRecord path_set_current_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_delete_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -334,9 +338,10 @@ static ProcRecord path_delete_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_get_points_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_get_points_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -465,9 +470,10 @@ static ProcRecord path_get_points_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_set_points_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_set_points_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -582,9 +588,10 @@ static ProcRecord path_set_points_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_stroke_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_stroke_current_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -641,9 +648,10 @@ static ProcRecord path_stroke_current_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_get_point_at_dist_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_get_point_at_dist_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -773,9 +781,10 @@ static ProcRecord path_get_point_at_dist_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_get_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_get_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -850,9 +859,10 @@ static ProcRecord path_get_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_set_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_set_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -919,9 +929,10 @@ static ProcRecord path_set_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
get_path_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
get_path_by_tattoo_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -994,9 +1005,10 @@ static ProcRecord get_path_by_tattoo_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_get_locked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_get_locked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1071,9 +1083,10 @@ static ProcRecord path_get_locked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_set_locked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_set_locked_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1140,9 +1153,10 @@ static ProcRecord path_set_locked_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_to_selection_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_to_selection_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
@ -1250,9 +1264,10 @@ static ProcRecord path_to_selection_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
path_import_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
path_import_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
|
|
|
@ -42,9 +42,10 @@ register_pattern_select_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
patterns_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *pattern_callback;
|
||||
|
@ -112,9 +113,10 @@ static ProcRecord patterns_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_close_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *pattern_callback;
|
||||
|
@ -161,9 +163,10 @@ static ProcRecord patterns_close_popup_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_set_popup_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *pattern_callback;
|
||||
|
|
|
@ -52,9 +52,10 @@ register_patterns_procs (Gimp *gimp)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
patterns_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_refresh_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gimp_data_factory_data_save (gimp->pattern_factory);
|
||||
gimp_data_factory_data_init (gimp->pattern_factory, FALSE);
|
||||
|
@ -78,9 +79,10 @@ static ProcRecord patterns_refresh_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_get_list_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -146,9 +148,10 @@ static ProcRecord patterns_get_list_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_get_pattern_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_get_pattern_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -204,9 +207,10 @@ static ProcRecord patterns_get_pattern_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_set_pattern_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_set_pattern_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *name;
|
||||
|
@ -256,9 +260,10 @@ static ProcRecord patterns_set_pattern_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
patterns_get_pattern_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
patterns_get_pattern_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
|
|
@ -73,9 +73,10 @@ match_strings (regex_t *preg,
|
|||
}
|
||||
|
||||
static Argument *
|
||||
progress_init_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
progress_init_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *message;
|
||||
|
@ -132,9 +133,10 @@ static ProcRecord progress_init_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
progress_update_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
progress_update_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gdouble percentage;
|
||||
|
@ -178,9 +180,10 @@ static ProcRecord progress_update_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
plugins_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
plugins_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gchar *search_str;
|
||||
|
@ -393,9 +396,10 @@ static ProcRecord plugins_query_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
plugin_domain_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
plugin_domain_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *domain_name;
|
||||
|
@ -454,9 +458,10 @@ static ProcRecord plugin_domain_register_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
plugin_help_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
plugin_help_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *domain_name;
|
||||
|
@ -517,9 +522,10 @@ static ProcRecord plugin_help_register_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
plugin_menu_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
plugin_menu_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *procedure_name;
|
||||
|
@ -633,9 +639,10 @@ static ProcRecord plugin_menu_register_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
plugin_icon_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
plugin_icon_register_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *procedure_name;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "plug-in/plug-in-run.h"
|
||||
|
||||
|
@ -214,16 +215,18 @@ procedural_db_lookup (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args = NULL;
|
||||
GList *list;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
list = g_hash_table_lookup (gimp->procedural_ht, name);
|
||||
|
@ -288,13 +291,14 @@ procedural_db_execute (Gimp *gimp,
|
|||
case GIMP_INTERNAL:
|
||||
return_args =
|
||||
(* procedure->exec_method.internal.marshal_func) (gimp, context,
|
||||
progress,
|
||||
args);
|
||||
break;
|
||||
|
||||
case GIMP_PLUGIN:
|
||||
case GIMP_EXTENSION:
|
||||
case GIMP_TEMPORARY:
|
||||
return_args = plug_in_run (gimp, context, procedure,
|
||||
return_args = plug_in_run (gimp, context, progress, procedure,
|
||||
args, procedure->num_args,
|
||||
TRUE, FALSE, -1);
|
||||
break;
|
||||
|
@ -336,10 +340,11 @@ procedural_db_execute (Gimp *gimp,
|
|||
}
|
||||
|
||||
Argument *
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...)
|
||||
{
|
||||
ProcRecord *proc;
|
||||
|
@ -350,6 +355,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (nreturn_vals != NULL, NULL);
|
||||
|
||||
|
@ -441,7 +447,7 @@ procedural_db_run_proc (Gimp *gimp,
|
|||
|
||||
*nreturn_vals = proc->num_values;
|
||||
|
||||
return_vals = procedural_db_execute (gimp, context, name, params);
|
||||
return_vals = procedural_db_execute (gimp, context, progress, name, params);
|
||||
|
||||
g_free (params);
|
||||
|
||||
|
|
|
@ -35,9 +35,10 @@ struct _Argument
|
|||
|
||||
|
||||
/* Argument marshalling procedures */
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args);
|
||||
typedef Argument * (* ArgMarshal) (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args);
|
||||
|
||||
|
||||
/* Execution types */
|
||||
|
@ -136,10 +137,12 @@ ProcRecord * procedural_db_lookup (Gimp *gimp,
|
|||
|
||||
Argument * procedural_db_execute (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
Argument *args);
|
||||
Argument * procedural_db_run_proc (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const gchar *name,
|
||||
gint *nreturn_vals,
|
||||
...);
|
||||
|
|
|
@ -333,9 +333,10 @@ pdb_type_name (gint type)
|
|||
}
|
||||
|
||||
static Argument *
|
||||
procedural_db_temp_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_temp_name_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
Argument *return_args;
|
||||
gchar *temp_name;
|
||||
|
@ -375,9 +376,10 @@ static ProcRecord procedural_db_temp_name_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_dump_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_dump_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *filename;
|
||||
|
@ -428,9 +430,10 @@ static ProcRecord procedural_db_dump_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_query_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -584,9 +587,10 @@ static ProcRecord procedural_db_query_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_proc_info_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_proc_info_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -711,9 +715,10 @@ static ProcRecord procedural_db_proc_info_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_proc_arg_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_proc_arg_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -810,9 +815,10 @@ static ProcRecord procedural_db_proc_arg_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_proc_val_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_proc_val_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -909,9 +915,10 @@ static ProcRecord procedural_db_proc_val_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_get_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_get_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -984,9 +991,10 @@ static ProcRecord procedural_db_get_data_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_get_data_size_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_get_data_size_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
|
@ -1047,9 +1055,10 @@ static ProcRecord procedural_db_get_data_size_proc =
|
|||
};
|
||||
|
||||
static Argument *
|
||||
procedural_db_set_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
Argument *args)
|
||||
procedural_db_set_data_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
gchar *identifier;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue