2004-04-15 Michael Natterer <mitch@gimp.org> Context cleanup continued: * app/core/gimpitem.[ch]: added context parameter to GimpItem::stroke(). * app/core/gimpchannel.c (gimp_channel_stroke) * app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get default values from instead of gimp_get_user_context(). * app/core/gimpselection.c * app/gui/stroke-dialog.c * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/paths.pdb: changed accordingly. * app/pdb/edit_cmds.c * app/pdb/paths_cmds.c: regenerated. * app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn struct. Added context parameter to plug_in_new(), plug_in_call_query() and plug_in_call_init(). * app/plug-in/plug-in-run.[ch]: added context parameters to plug_in_run() and plug_in_repeat(). * app/gui/plug-in-commands.c * app/gui/vectors-commands.c * app/pdb/procedural_db.c * app/widgets/gimphelp.c: pass a context to plug_in_run() and plug_in_repeat(). * app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call procedures with the plug-in's context. * app/plug-in/plug-ins.c: use a temporary context for running the plug-ins' query() and init() functions. Use the same context for running automatic extensions. This temporarily separates the main Script-Fu extension from the user context (i.e. scripts have no way of setting/getting the global FG, BG, brush etc.).
46 lines
1.8 KiB
C
46 lines
1.8 KiB
C
/* 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 __PLUG_IN_RUN_H__
|
|
#define __PLUG_IN_RUN_H__
|
|
|
|
|
|
/* Run a plug-in as if it were a procedure database procedure
|
|
*/
|
|
Argument * plug_in_run (Gimp *gimp,
|
|
GimpContext *context,
|
|
ProcRecord *proc_rec,
|
|
Argument *args,
|
|
gint argc,
|
|
gboolean synchronous,
|
|
gboolean destroy_return_vals,
|
|
gint gdisp_ID);
|
|
|
|
/* Run the last plug-in again with the same arguments. Extensions
|
|
* are exempt from this "privelege".
|
|
*/
|
|
void plug_in_repeat (Gimp *gimp,
|
|
GimpContext *context,
|
|
gint display_ID,
|
|
gint image_ID,
|
|
gint drawable_ID,
|
|
gboolean with_interface);
|
|
|
|
|
|
#endif /* __PLUG_IN_RUN_H__ */
|