gimp/libgimp/gimp.c

1899 lines
52 KiB
C
Raw Normal View History

1998-01-25 18:26:47 +08:00
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
Sven Neumann <sven@gimp.org> 2000-06-01 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> Completed the new file structure. Yet only few of the _pdb.[ch] files are based upon generated code and nothing is really autogenerated... * app/Makefile.am * app/gdisplay_cmds.c -> app/display_cmds.c * app/gimage_cmds.c -> app/image_cmds.c * app/gimage_mask_cmds.c -> app/selection_cmds.c * app/internal_procs.c: related change * libgimp/Makefile.am * libgimp/gimp.h * libgimp/gimp_pdb.h * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimpimage_pdb.[ch] * libgimp/gimpselection_pdb.[ch]: replaced with code based on files generated using pdbgen * libgimp/gimpchannelops_pdb.[ch] * libgimp/gimpcolor_pdb.[ch] * libgimp/gimpedit_pdb.[ch] * libgimp/gimpfloatingsel_pdb.[ch] * libgimp/gimpgimprc_pdb.[ch] * libgimp/gimptexttool_pdb.[ch] * libgimp/gimptools_pdb.[ch] * libgimp/gimpundo_pdb.[ch]: new files based on generated code * libgimp/gimpgradientselect.[ch] * libgimp/gimpimage.[ch] * libgimp/gimpselection.[ch]: new files wrapping around the autogenerated PDB wrappers as found in *_pdb.[ch]. This is necessary since the number of parameters or their order is different from the PDP calls. * plug-ins/common/CEL.c: plugged memleak * plug-ins/common/aa.c: removed compiler warning * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/gdisplay.pdb -> display.pdb * tools/pdbgen/pdb/gimage.pdb -> image.pdb * tools/pdbgen/pdb/gimage_mask.pdb -> selection.pdb * tools/pdbgen/pdb/channel_ops.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/floating_sel.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/text_tool.pdb * tools/pdbgen/pdb/tools.pdb * tools/pdbgen/pdb/undo.pdb: made them create libgimp code
2000-06-01 20:20:13 +08:00
* gimp.c
*
1998-01-25 18:26:47 +08:00
* This library is free software; you can redistribute it and/or
1999-11-18 05:13:50 +08:00
* modify it under the terms of the GNU Lesser General Public
1998-01-25 18:26:47 +08:00
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
1999-11-18 05:13:50 +08:00
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
1998-01-25 18:26:47 +08:00
*/
1997-11-25 06:05:25 +08:00
#include "config.h"
#define _GNU_SOURCE /* for the sigaction stuff */
1997-11-25 06:05:25 +08:00
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
1999-03-07 20:56:03 +08:00
#ifdef HAVE_SYS_TIME_H
1997-11-25 06:05:25 +08:00
#include <sys/time.h>
1999-03-07 20:56:03 +08:00
#endif
1999-03-07 20:56:03 +08:00
#ifdef HAVE_SYS_PARAM_H
1997-11-25 06:05:25 +08:00
#include <sys/param.h>
1999-03-07 20:56:03 +08:00
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
1999-03-07 20:56:03 +08:00
#ifdef HAVE_UNISTD_H
1997-11-25 06:05:25 +08:00
#include <unistd.h>
1999-03-07 20:56:03 +08:00
#endif
#ifndef WAIT_ANY
#define WAIT_ANY -1
#endif
#include <glib-object.h>
2000-04-23 03:47:01 +08:00
#ifndef G_OS_WIN32
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
#include "libgimpbase/gimpsignal.h"
2000-04-23 03:47:01 +08:00
#else
#include <signal.h>
#endif
1999-03-07 20:56:03 +08:00
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#if defined(USE_SYSV_SHM)
#ifdef HAVE_IPC_H
#include <sys/ipc.h>
#endif
#ifdef HAVE_SHM_H
#include <sys/shm.h>
#endif
#elif defined(USE_POSIX_SHM)
#ifdef HAVE_UNISTD_H
#include <unistd.h>
1997-11-25 06:05:25 +08:00
#endif
#include <fcntl.h>
#include <sys/mman.h>
#endif /* USE_POSIX_SHM */
1999-10-07 05:27:18 +08:00
#if defined(G_OS_WIN32) || defined(G_WITH_CYGWIN)
1999-03-07 20:56:03 +08:00
# define STRICT
# include <windows.h>
# undef RGB
# define USE_WIN32_SHM 1
1999-03-07 20:56:03 +08:00
#endif
#include <libintl.h>
#include <locale.h>
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
#include "libgimpbase/gimpbasetypes.h"
#include "libgimpbase/gimpbase-private.h"
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
#include "libgimpbase/gimpenv.h"
#include "libgimpbase/gimpprotocol.h"
#include "libgimpbase/gimpwire.h"
1997-11-25 06:05:25 +08:00
#include "gimp.h"
#include "gimpunitcache.h"
1997-11-25 06:05:25 +08:00
#define TILE_MAP_SIZE (_tile_width * _tile_height * 4)
#define ERRMSG_SHM_FAILED "Could not attach to gimp shared memory segment"
/* Maybe this should go in a public header if we add other things to it */
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
typedef enum
{
GIMP_DEBUG_PID = 1 << 0,
GIMP_DEBUG_FATAL_WARNINGS = 1 << 1,
GIMP_DEBUG_QUERY = 1 << 2,
GIMP_DEBUG_INIT = 1 << 3,
GIMP_DEBUG_RUN = 1 << 4,
GIMP_DEBUG_QUIT = 1 << 5,
GIMP_DEBUG_DEFAULT = (GIMP_DEBUG_RUN | GIMP_DEBUG_FATAL_WARNINGS)
} GimpDebugFlag;
1997-11-25 06:05:25 +08:00
#define WRITE_BUFFER_SIZE 1024
void gimp_read_expect_msg (GimpWireMessage *msg,
gint type);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static void gimp_close (void);
static void gimp_debug_stop (void);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static void gimp_message_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer data);
#ifndef G_OS_WIN32
static void gimp_plugin_sigfatal_handler (gint sig_num);
app/appenv.h New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc 1999-09-01 Tor Lillqvist <tml@iki.fi> * app/appenv.h * libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc from app/appenv.h here, so plug-ins can use them, too. Remove some commented-out old stuff in appenv.h. * libgimp/gimp.h: Include gimpmath.h. * libgimp/gimp.c (gimp_main): Win32: Don't install signal handlers, we can't do anything useful in the handler ourselves anyway (it would be nice to print out a backtrace, but that seems pretty hard to do, even if not impossible). Let Windows inform the user about the crash. If the plug-in was compiled with MSVC, and the user also has it, she is offered a chance to start the debugger automatically anyway. * app/*several*.c: Include gimpmath.h for G_PI etc. Don't include <math.h>, as gimpmath.h includes it. * plug-ins/*/*many*.c: Include config.h. Don't include <math.h>. Remove all the duplicated definitions of G_PI and rint(). Use RINT() instead of rint(). * app/app_procs.[ch]: app_exit() takes a gboolean. * app/batch.c * app/commands.c * app/interface.c: Call app_exit() with FALSE or TRUE. * app/main.c (on_error): Call gimp_fatal_error. (main): Don't install any signal handler on Win32 here, either. * app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format the message and call MessageBox with it. g_on_error_query doesn't do anything useful on Win32, and printf'ing a message to stdout or stderr doesn't do anything, either, in a windowing application.
1999-09-02 04:30:56 +08:00
#endif
static gboolean gimp_plugin_io_error_handler (GIOChannel *channel,
GIOCondition cond,
gpointer data);
static gboolean gimp_write (GIOChannel *channel,
const guint8 *buf,
gulong count,
gpointer user_data);
static gboolean gimp_flush (GIOChannel *channel,
gpointer user_data);
static void gimp_loop (void);
static void gimp_config (GPConfig *config);
static void gimp_proc_run (GPProcRun *proc_run);
static void gimp_temp_proc_run (GPProcRun *proc_run);
static void gimp_process_message (GimpWireMessage *msg);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static void gimp_single_message (void);
static gboolean gimp_extension_read (GIOChannel *channel,
GIOCondition condition,
gpointer data);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static GIOChannel *_readchannel = NULL;
1999-03-07 20:56:03 +08:00
GIOChannel *_writechannel = NULL;
#ifdef USE_WIN32_SHM
1999-03-07 20:56:03 +08:00
static HANDLE shm_handle;
#endif
1998-07-15 10:28:31 +08:00
static gint _tile_width = -1;
static gint _tile_height = -1;
static gint _shm_ID = -1;
static guchar *_shm_addr = NULL;
static gdouble _gamma_val = 1.0;
static gboolean _install_cmap = FALSE;
static gboolean _show_tool_tips = TRUE;
static gboolean _show_help_button = TRUE;
static GimpCheckSize _check_size = GIMP_CHECK_SIZE_MEDIUM_CHECKS;
static GimpCheckType _check_type = GIMP_CHECK_TYPE_GRAY_CHECKS;
static gint _min_colors = 144;
static gint _gdisp_ID = -1;
static gchar *_wm_class = NULL;
static gchar *_display_name = NULL;
static gint _monitor_number = 0;
static const gchar *progname = NULL;
1997-11-25 06:05:25 +08:00
static gchar write_buffer[WRITE_BUFFER_SIZE];
static gulong write_buffer_index = 0;
1997-11-25 06:05:25 +08:00
static GimpStackTraceMode stack_trace_mode = GIMP_STACK_TRACE_NEVER;
static GHashTable *temp_proc_ht = NULL;
1997-11-25 06:05:25 +08:00
static guint gimp_debug_flags = 0;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static const GDebugKey gimp_debug_keys[] =
{
{ "pid", GIMP_DEBUG_PID },
{ "fatal-warnings", GIMP_DEBUG_FATAL_WARNINGS },
{ "fw", GIMP_DEBUG_FATAL_WARNINGS },
{ "query", GIMP_DEBUG_QUERY },
{ "init", GIMP_DEBUG_INIT },
{ "run", GIMP_DEBUG_RUN },
{ "quit", GIMP_DEBUG_QUIT },
{ "on", GIMP_DEBUG_DEFAULT }
};
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
static GimpPlugInInfo PLUG_IN_INFO;
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_main:
* @info: the PLUG_IN_INFO structure
* @argc: the number of arguments
* @argv: the arguments
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* The main procedure that must be called with the PLUG_IN_INFO structure
* and the 'argc' and 'argv' that are passed to "main".
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Return value:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
**/
gint
gimp_main (const GimpPlugInInfo *info,
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gint argc,
gchar *argv[])
1997-11-25 06:05:25 +08:00
{
gchar *basename;
const gchar *env_string;
gchar *debug_string;
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
#ifdef G_OS_WIN32
gint i, j, k;
/* Check for exe file name with spaces in the path having been split up
* by buggy NT C runtime, or something. I don't know why this happens
* on NT (including w2k), but not on w95/98.
*/
for (i = 1; i < argc; i++)
{
k = strlen (argv[i]);
if (k > 10)
{
if (g_ascii_strcasecmp (argv[i] + k - 4, ".exe") == 0)
{
/* Found the end of the executable name, most probably.
* Splice the parts of the name back together.
*/
GString *s;
s = g_string_new (argv[0]);
for (j = 1; j <= i; j++)
{
s = g_string_append_c (s, ' ');
s = g_string_append (s, argv[j]);
}
argv[0] = s->str;
/* Move rest of argv down */
for (j = 1; j < argc - i; j++)
argv[j] = argv[j + i];
argv[argc - i] = NULL;
argc -= i;
break;
}
}
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
}
1999-03-07 20:56:03 +08:00
#endif
g_assert (info != NULL);
PLUG_IN_INFO = *info;
if ((argc != 6) || (strcmp (argv[1], "-gimp") != 0))
1997-11-25 06:05:25 +08:00
{
g_printerr ("%s is a GIMP plug-in and must be run by GIMP to be used\n",
argv[0]);
1997-11-25 06:05:25 +08:00
return 1;
}
gimp_env_init (TRUE);
1997-11-25 06:05:25 +08:00
progname = argv[0];
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
basename = g_path_get_basename (progname);
g_set_prgname (basename);
env_string = g_getenv ("GIMP_PLUGIN_DEBUG");
if (env_string)
{
debug_string = strchr (env_string, ',');
if (debug_string)
{
gint len = debug_string - env_string;
if ((strlen (basename) == len) &&
(strncmp (basename, env_string, len) == 0))
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gimp_debug_flags =
g_parse_debug_string (debug_string + 1,
gimp_debug_keys,
G_N_ELEMENTS (gimp_debug_keys));
}
}
else if (strcmp (env_string, basename) == 0)
{
gimp_debug_flags = GIMP_DEBUG_DEFAULT;
}
}
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
g_free (basename);
stack_trace_mode = (GimpStackTraceMode) CLAMP (atoi (argv[5]),
GIMP_STACK_TRACE_NEVER,
GIMP_STACK_TRACE_ALWAYS);
#ifndef G_OS_WIN32
app/appenv.h New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc 1999-09-01 Tor Lillqvist <tml@iki.fi> * app/appenv.h * libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc from app/appenv.h here, so plug-ins can use them, too. Remove some commented-out old stuff in appenv.h. * libgimp/gimp.h: Include gimpmath.h. * libgimp/gimp.c (gimp_main): Win32: Don't install signal handlers, we can't do anything useful in the handler ourselves anyway (it would be nice to print out a backtrace, but that seems pretty hard to do, even if not impossible). Let Windows inform the user about the crash. If the plug-in was compiled with MSVC, and the user also has it, she is offered a chance to start the debugger automatically anyway. * app/*several*.c: Include gimpmath.h for G_PI etc. Don't include <math.h>, as gimpmath.h includes it. * plug-ins/*/*many*.c: Include config.h. Don't include <math.h>. Remove all the duplicated definitions of G_PI and rint(). Use RINT() instead of rint(). * app/app_procs.[ch]: app_exit() takes a gboolean. * app/batch.c * app/commands.c * app/interface.c: Call app_exit() with FALSE or TRUE. * app/main.c (on_error): Call gimp_fatal_error. (main): Don't install any signal handler on Win32 here, either. * app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format the message and call MessageBox with it. g_on_error_query doesn't do anything useful on Win32, and printf'ing a message to stdout or stderr doesn't do anything, either, in a windowing application.
1999-09-02 04:30:56 +08:00
/* No use catching these on Win32, the user won't get any meaningful
* stack trace from glib anyhow. It's better to let Windows inform
* about the program error, and offer debugging if the plug-in
* has been built with MSVC, and the user has MSVC installed.
*/
gimp_signal_private (SIGHUP, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGINT, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGQUIT, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGBUS, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGSEGV, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGTERM, gimp_plugin_sigfatal_handler, 0);
gimp_signal_private (SIGFPE, gimp_plugin_sigfatal_handler, 0);
/* Ignore SIGPIPE from crashing Gimp */
gimp_signal_private (SIGPIPE, SIG_IGN, 0);
/* Restart syscalls interrupted by SIGCHLD */
gimp_signal_private (SIGCHLD, SIG_DFL, SA_RESTART);
app/appenv.h New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc 1999-09-01 Tor Lillqvist <tml@iki.fi> * app/appenv.h * libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc from app/appenv.h here, so plug-ins can use them, too. Remove some commented-out old stuff in appenv.h. * libgimp/gimp.h: Include gimpmath.h. * libgimp/gimp.c (gimp_main): Win32: Don't install signal handlers, we can't do anything useful in the handler ourselves anyway (it would be nice to print out a backtrace, but that seems pretty hard to do, even if not impossible). Let Windows inform the user about the crash. If the plug-in was compiled with MSVC, and the user also has it, she is offered a chance to start the debugger automatically anyway. * app/*several*.c: Include gimpmath.h for G_PI etc. Don't include <math.h>, as gimpmath.h includes it. * plug-ins/*/*many*.c: Include config.h. Don't include <math.h>. Remove all the duplicated definitions of G_PI and rint(). Use RINT() instead of rint(). * app/app_procs.[ch]: app_exit() takes a gboolean. * app/batch.c * app/commands.c * app/interface.c: Call app_exit() with FALSE or TRUE. * app/main.c (on_error): Call gimp_fatal_error. (main): Don't install any signal handler on Win32 here, either. * app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format the message and call MessageBox with it. g_on_error_query doesn't do anything useful on Win32, and printf'ing a message to stdout or stderr doesn't do anything, either, in a windowing application.
1999-09-02 04:30:56 +08:00
#endif
1997-11-25 06:05:25 +08:00
_readchannel = g_io_channel_unix_new (atoi (argv[2]));
1999-03-07 20:56:03 +08:00
_writechannel = g_io_channel_unix_new (atoi (argv[3]));
1997-11-25 06:05:25 +08:00
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
g_io_channel_set_encoding (_readchannel, NULL, NULL);
g_io_channel_set_encoding (_writechannel, NULL, NULL);
g_io_channel_set_buffered (_readchannel, FALSE);
g_io_channel_set_buffered (_writechannel, FALSE);
g_io_channel_set_close_on_unref (_readchannel, TRUE);
g_io_channel_set_close_on_unref (_writechannel, TRUE);
1997-11-25 06:05:25 +08:00
gp_init ();
gimp_wire_set_writer (gimp_write);
gimp_wire_set_flusher (gimp_flush);
1997-11-25 06:05:25 +08:00
g_type_init ();
gimp_enums_init ();
/* initialize units */
{
GimpUnitVtable vtable;
vtable.unit_get_number_of_units = _gimp_unit_cache_get_number_of_units;
vtable.unit_get_number_of_built_in_units =
_gimp_unit_cache_get_number_of_built_in_units;
vtable.unit_new = _gimp_unit_cache_new;
vtable.unit_get_deletion_flag = _gimp_unit_cache_get_deletion_flag;
vtable.unit_set_deletion_flag = _gimp_unit_cache_set_deletion_flag;
vtable.unit_get_factor = _gimp_unit_cache_get_factor;
vtable.unit_get_digits = _gimp_unit_cache_get_digits;
vtable.unit_get_identifier = _gimp_unit_cache_get_identifier;
vtable.unit_get_symbol = _gimp_unit_cache_get_symbol;
vtable.unit_get_abbreviation = _gimp_unit_cache_get_abbreviation;
vtable.unit_get_singular = _gimp_unit_cache_get_singular;
vtable.unit_get_plural = _gimp_unit_cache_get_plural;
gimp_base_init (&vtable);
}
/* initialize i18n support */
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE"-libgimp", gimp_locale_directory ());
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE"-libgimp", "UTF-8");
#endif
/* set handler both for the "LibGimp" and "" domains */
g_log_set_handler (G_LOG_DOMAIN,
G_LOG_LEVEL_MESSAGE,
gimp_message_func,
NULL);
g_log_set_handler (NULL,
G_LOG_LEVEL_MESSAGE,
gimp_message_func,
NULL);
if (gimp_debug_flags & GIMP_DEBUG_FATAL_WARNINGS)
{
GLogLevelFlags fatal_mask;
fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
g_log_set_always_fatal (fatal_mask);
}
if (strcmp (argv[4], "-query") == 0)
1997-11-25 06:05:25 +08:00
{
if (PLUG_IN_INFO.init_proc)
gp_has_init_write (_writechannel, NULL);
if (gimp_debug_flags & GIMP_DEBUG_QUERY)
gimp_debug_stop ();
1997-11-25 06:05:25 +08:00
if (PLUG_IN_INFO.query_proc)
(* PLUG_IN_INFO.query_proc) ();
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
1999-03-13 05:30:44 +08:00
gimp_close ();
return EXIT_SUCCESS;
1997-11-25 06:05:25 +08:00
}
if (strcmp (argv[4], "-init") == 0)
{
if (gimp_debug_flags & GIMP_DEBUG_INIT)
gimp_debug_stop ();
if (PLUG_IN_INFO.init_proc)
(* PLUG_IN_INFO.init_proc) ();
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
gimp_close ();
return EXIT_SUCCESS;
}
if (gimp_debug_flags & GIMP_DEBUG_RUN)
gimp_debug_stop ();
else if (gimp_debug_flags & GIMP_DEBUG_PID)
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Here I am!");
temp_proc_ht = g_hash_table_new (g_str_hash, g_str_equal);
1997-11-25 06:05:25 +08:00
g_io_add_watch (_readchannel,
G_IO_ERR | G_IO_HUP,
gimp_plugin_io_error_handler,
NULL);
1997-11-25 06:05:25 +08:00
gimp_loop ();
return EXIT_SUCCESS;
1997-11-25 06:05:25 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_quit:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Forcefully causes the gimp library to exit and close down its
* connection to main gimp application. This function never returns.
**/
1999-03-13 05:30:44 +08:00
void
gimp_quit (void)
1999-03-13 05:30:44 +08:00
{
gimp_close ();
exit (EXIT_SUCCESS);
1997-11-25 06:05:25 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_install_procedure:
* @name: the procedure's name.
* @blurb: a short text describing what the procedure does.
* @help: the help text for the procedure (usually considerably
* longer than @blurb).
* @author: the procedure's author(s).
* @copyright: the procedure's copyright.
* @date: the date the procedure was added.
* @menu_label: the label to use for the procedure's menu entry,
* or #NULL if the procedure has no menu entry.
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* @image_types: the drawable types the procedure can handle.
* @type: the type of the procedure.
* @n_params: the number of parameters the procedure takes.
* @n_return_vals: the number of return values the procedure returns.
* @params: the procedure's parameters.
* @return_vals: the procedure's return values.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Installs a new procedure with the PDB (procedural database).
*
* Call this function from within your Plug-In's query() function for
* each procedure your Plug-In implements.
*
* The @name parameter is mandatory and should be unique, or it will
* overwrite an already existing procedure (overwrite procedures only
* if you know what you're doing).
*
* The @blurb, @help, @author, @copyright and @date parameters are
* optional but then you shouldn't write procedures without proper
* documentation, should you.
*
* @menu_label defines the label that should be used for the
* procedure's menu entry (use #NULL if the procedure shouldn't have a
* menu entry). The position where to register in the menu hierarchy
* is chosen using gimp_plugin_menu_register(). This function also
* still accepts the old (pre-2.2) way of registering a menu entry and
* takes a string in the form "&lt;Domain&gt;/Path/To/My/Menu"
* (e.g. "&lt;Image&gt;/Filters/Render/Useless").
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* @type must be one of #GIMP_PLUGIN or #GIMP_EXTENSION. Note that
* temporary procedures must be installed using
* gimp_install_temp_proc().
*
* NOTE: Unlike the GIMP 1.2 API, #GIMP_EXTENSION no longer means
* that the procedure's menu prefix is &lt;Toolbox&gt;, but that
* it will install temporary procedures. Therefore, the GIMP core
* will wait until the #GIMP_EXTENSION procedure has called
* gimp_extension_ack(), which means that the procedure has done
* its initialization, installed its temporary procedures and is
* ready to run.
*
* <emphasis>Not calling gimp_extension_ack() from a #GIMP_EXTENSION
* procedure will cause the GIMP core to lock up.</emphasis>
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* Additionally, a #GIMP_EXTENSION procedure with no parameters
* (@n_params == 0 and @params == #NULL) is an "automatic" extension
* that will be automatically started on each GIMP startup.
**/
1997-11-25 06:05:25 +08:00
void
gimp_install_procedure (const gchar *name,
const gchar *blurb,
const gchar *help,
const gchar *author,
const gchar *copyright,
const gchar *date,
const gchar *menu_label,
const gchar *image_types,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
const GimpParamDef *params,
const GimpParamDef *return_vals)
1997-11-25 06:05:25 +08:00
{
GPProcInstall proc_install;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_return_if_fail (name != NULL);
g_return_if_fail (type != GIMP_INTERNAL);
g_return_if_fail ((n_params == 0 && params == NULL) ||
(n_params > 0 && params != NULL));
g_return_if_fail ((n_return_vals == 0 && return_vals == NULL) ||
(n_return_vals > 0 && return_vals != NULL));
proc_install.name = (gchar *) name;
proc_install.blurb = (gchar *) blurb;
proc_install.help = (gchar *) help;
proc_install.author = (gchar *) author;
proc_install.copyright = (gchar *) copyright;
proc_install.date = (gchar *) date;
proc_install.menu_path = (gchar *) menu_label;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
proc_install.image_types = (gchar *) image_types;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
proc_install.type = type;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
proc_install.nparams = n_params;
proc_install.nreturn_vals = n_return_vals;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
proc_install.params = (GPParamDef *) params;
proc_install.return_vals = (GPParamDef *) return_vals;
1997-11-25 06:05:25 +08:00
if (! gp_proc_install_write (_writechannel, &proc_install, NULL))
1997-11-25 06:05:25 +08:00
gimp_quit ();
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_install_temp_proc:
* @name: the procedure's name.
* @blurb: a short text describing what the procedure does.
* @help: the help text for the procedure (usually considerably
* longer than @blurb).
* @author: the procedure's author(s).
* @copyright: the procedure's copyright.
* @date: the date the procedure was added.
* @menu_label: the procedure's menu label, or #NULL if the procedure has
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* no menu entry.
* @image_types: the drawable types the procedure can handle.
* @type: the type of the procedure.
* @n_params: the number of parameters the procedure takes.
* @n_return_vals: the number of return values the procedure returns.
* @params: the procedure's parameters.
* @return_vals: the procedure's return values.
* @run_proc: the function to call for executing the procedure.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Installs a new temporary procedure with the PDB (procedural database).
*
* A temporary procedure is a procedure which is only available while
* one of your Plug-In's "real" procedures is running.
*
* See gimp_install_procedure() for most details.
*
* @type <emphasis>must</emphasis> be #GIMP_TEMPORARY or the function
* will fail.
*
* @run_proc is the function which will be called to execute the
* procedure.
*
* NOTE: Normally, Plug-In communication is triggered by the Plug-In
* and the GIMP core only responds to the Plug-In's requests. You must
* explicitly enable receiving of temporary procedure run requests
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* using either gimp_extension_enable() or
* gimp_extension_process(). See this functions' documentation for
* details.
**/
1997-11-25 06:05:25 +08:00
void
gimp_install_temp_proc (const gchar *name,
const gchar *blurb,
const gchar *help,
const gchar *author,
const gchar *copyright,
const gchar *date,
const gchar *menu_label,
const gchar *image_types,
GimpPDBProcType type,
gint n_params,
gint n_return_vals,
const GimpParamDef *params,
const GimpParamDef *return_vals,
GimpRunProc run_proc)
1997-11-25 06:05:25 +08:00
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_return_if_fail (name != NULL);
g_return_if_fail ((n_params == 0 && params == NULL) ||
(n_params > 0 && params != NULL));
g_return_if_fail ((n_return_vals == 0 && return_vals == NULL) ||
(n_return_vals > 0 && return_vals != NULL));
g_return_if_fail (type == GIMP_TEMPORARY);
g_return_if_fail (run_proc != NULL);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
gimp_install_procedure (name,
blurb, help,
author, copyright, date,
menu_label,
image_types,
type,
n_params, n_return_vals,
params, return_vals);
1997-11-25 06:05:25 +08:00
/* Insert the temp proc run function into the hash table */
g_hash_table_insert (temp_proc_ht, g_strdup (name), (gpointer) run_proc);
1997-11-25 06:05:25 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_uninstall_temp_proc:
* @name: the procedure's name
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Uninstalls a temporary procedure which has previously been
* installed using gimp_install_temp_proc().
**/
1997-11-25 06:05:25 +08:00
void
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gimp_uninstall_temp_proc (const gchar *name)
1997-11-25 06:05:25 +08:00
{
GPProcUninstall proc_uninstall;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gpointer hash_name;
gboolean found;
g_return_if_fail (name != NULL);
proc_uninstall.name = (gchar *) name;
1997-11-25 06:05:25 +08:00
if (! gp_proc_uninstall_write (_writechannel, &proc_uninstall, NULL))
1997-11-25 06:05:25 +08:00
gimp_quit ();
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
1999-08-17 22:43:45 +08:00
found = g_hash_table_lookup_extended (temp_proc_ht, name, &hash_name, NULL);
if (found)
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
{
g_hash_table_remove (temp_proc_ht, (gpointer) name);
g_free (hash_name);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
}
1997-11-25 06:05:25 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_run_procedure:
* @name: the name of the procedure to run
* @n_return_vals: return location for the number of return values
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
* @Varargs: list of procedure parameters
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* This function calls a GIMP procedure and returns its return values.
*
* The procedure's parameters are given by a va_list in the format
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* (type, value, type, value) and must be terminated by #GIMP_PDB_END.
*
* This function converts the va_list of parameters into an array and
* passes them to gimp_run_procedure2(). Please look there for further
* information.
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* Return value: the procedure's return values.
**/
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
GimpParam *
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gimp_run_procedure (const gchar *name,
gint *n_return_vals,
...)
1997-11-25 06:05:25 +08:00
{
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
GimpPDBArgType param_type;
GimpParam *return_vals;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
GimpParam *params = NULL;
gint n_params = 0;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
va_list args;
gint i;
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (n_return_vals != NULL, NULL);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
va_start (args, n_return_vals);
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
param_type = va_arg (args, GimpPDBArgType);
1997-11-25 06:05:25 +08:00
while (param_type != GIMP_PDB_END)
1997-11-25 06:05:25 +08:00
{
switch (param_type)
{
case GIMP_PDB_INT32:
case GIMP_PDB_DISPLAY:
case GIMP_PDB_IMAGE:
case GIMP_PDB_LAYER:
case GIMP_PDB_CHANNEL:
case GIMP_PDB_DRAWABLE:
case GIMP_PDB_SELECTION:
case GIMP_PDB_BOUNDARY:
case GIMP_PDB_VECTORS:
case GIMP_PDB_STATUS:
(void) va_arg (args, gint);
break;
case GIMP_PDB_INT16:
(void) va_arg (args, gint);
break;
case GIMP_PDB_INT8:
(void) va_arg (args, gint);
break;
case GIMP_PDB_FLOAT:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gdouble);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_STRING:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gchar *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT32ARRAY:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gint32 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT16ARRAY:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gint16 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT8ARRAY:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gint8 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_FLOATARRAY:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gdouble *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_STRINGARRAY:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, gchar **);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_COLOR:
(void) va_arg (args, GimpRGB *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_PARASITE:
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
(void) va_arg (args, GimpParasite *);
break;
case GIMP_PDB_REGION:
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_END:
break;
}
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
n_params++;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
param_type = va_arg (args, GimpPDBArgType);
1997-11-25 06:05:25 +08:00
}
va_end (args);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params = g_new0 (GimpParam, n_params);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
va_start (args, n_return_vals);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
for (i = 0; i < n_params; i++)
1997-11-25 06:05:25 +08:00
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].type = va_arg (args, GimpPDBArgType);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
switch (params[i].type)
{
case GIMP_PDB_INT32:
params[i].data.d_int32 = (gint32) va_arg (args, gint);
break;
case GIMP_PDB_INT16:
params[i].data.d_int16 = (gint16) va_arg (args, gint);
break;
case GIMP_PDB_INT8:
params[i].data.d_int8 = (guint8) va_arg (args, gint);
break;
case GIMP_PDB_FLOAT:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_float = (gdouble) va_arg (args, gdouble);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_STRING:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_string = va_arg (args, gchar *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT32ARRAY:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_int32array = va_arg (args, gint32 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT16ARRAY:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_int16array = va_arg (args, gint16 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_INT8ARRAY:
params[i].data.d_int8array = va_arg (args, guint8 *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_FLOATARRAY:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_floatarray = va_arg (args, gdouble *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_STRINGARRAY:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_stringarray = va_arg (args, gchar **);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_COLOR:
params[i].data.d_color = *va_arg (args, GimpRGB *);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_REGION:
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_DISPLAY:
params[i].data.d_display = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_IMAGE:
params[i].data.d_image = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_LAYER:
params[i].data.d_layer = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_CHANNEL:
params[i].data.d_channel = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_DRAWABLE:
params[i].data.d_drawable = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_SELECTION:
params[i].data.d_selection = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_BOUNDARY:
params[i].data.d_boundary = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_VECTORS:
params[i].data.d_vectors = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_PARASITE:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
{
GimpParasite *parasite = va_arg (args, GimpParasite *);
if (parasite == NULL)
{
params[i].data.d_parasite.name = NULL;
params[i].data.d_parasite.data = NULL;
}
else
{
params[i].data.d_parasite.name = parasite->name;
params[i].data.d_parasite.flags = parasite->flags;
params[i].data.d_parasite.size = parasite->size;
params[i].data.d_parasite.data = parasite->data;
}
}
break;
case GIMP_PDB_STATUS:
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
params[i].data.d_status = va_arg (args, gint32);
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_END:
break;
}
1997-11-25 06:05:25 +08:00
}
va_end (args);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
return_vals = gimp_run_procedure2 (name, n_return_vals,
n_params, params);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_free (params);
1997-11-25 06:05:25 +08:00
return return_vals;
}
void
gimp_read_expect_msg (GimpWireMessage *msg,
gint type)
{
while (TRUE)
{
if (! gimp_wire_read_msg (_readchannel, msg, NULL))
gimp_quit ();
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
if (msg->type == type)
return; /* up to the caller to call wire_destroy() */
if (msg->type == GP_TEMP_PROC_RUN || msg->type == GP_QUIT)
{
gimp_process_message (msg);
}
else
{
g_error ("unexpected message: %d", msg->type);
}
gimp_wire_destroy (msg);
}
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_run_procedure2:
* @name: the name of the procedure to run
* @n_return_vals: return location for the number of return values
* @n_params: the number of parameters the procedure takes.
* @params: the procedure's parameters array.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* This function calls a GIMP procedure and returns its return values.
* To get more information about the available procedures and the
* parameters they expect, please have a look at the Procedure Browser
* as found in the Xtns menu in the GIMP's Toolbox.
*
* As soon as you don't need the return values any longer, you should
* free them using gimp_destroy_params().
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* Return value: the procedure's return values.
**/
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
GimpParam *
gimp_run_procedure2 (const gchar *name,
gint *n_return_vals,
gint n_params,
const GimpParam *params)
1997-11-25 06:05:25 +08:00
{
GPProcRun proc_run;
GPProcReturn *proc_return;
GimpWireMessage msg;
GimpParam *return_vals;
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (n_return_vals != NULL, NULL);
proc_run.name = (gchar *) name;
proc_run.nparams = n_params;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
proc_run.params = (GPParam *) params;
1997-11-25 06:05:25 +08:00
if (! gp_proc_run_write (_writechannel, &proc_run, NULL))
1997-11-25 06:05:25 +08:00
gimp_quit ();
gimp_read_expect_msg (&msg, GP_PROC_RETURN);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
1997-11-25 06:05:25 +08:00
proc_return = msg.data;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*n_return_vals = proc_return->nparams;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
return_vals = (GimpParam *) proc_return->params;
1997-11-25 06:05:25 +08:00
switch (return_vals[0].data.d_status)
{
case GIMP_PDB_EXECUTION_ERROR:
1997-11-25 06:05:25 +08:00
break;
case GIMP_PDB_CALLING_ERROR:
g_printerr ("a calling error occurred while trying to run: \"%s\"\n",
name);
1997-11-25 06:05:25 +08:00
break;
1997-11-25 06:05:25 +08:00
default:
break;
}
g_free (proc_return->name);
1997-11-25 06:05:25 +08:00
g_free (proc_return);
return return_vals;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_destroy_params:
* @params: the #GimpParam array to destroy
* @n_params: the number of elements in the array
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Destroys a #GimpParam array as returned by gimp_run_procedure() or
* gimp_run_procedure2().
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
**/
1997-11-25 06:05:25 +08:00
void
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
gimp_destroy_params (GimpParam *params,
gint n_params)
1997-11-25 06:05:25 +08:00
{
gp_params_destroy ((GPParam *) params, n_params);
1997-11-25 06:05:25 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_destroy_paramdefs:
* @paramdefs: the #GimpParamDef array to destroy
* @n_params: the number of elements in the array
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Destroys a #GimpParamDef array as returned by gimp_query_procedure()
**/
void
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
gimp_destroy_paramdefs (GimpParamDef *paramdefs,
gint n_params)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
while (n_params--)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
g_free (paramdefs[n_params].name);
g_free (paramdefs[n_params].description);
}
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
g_free (paramdefs);
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_tile_width:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the tile_width the GIMP is using. This is a constant value
* given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the tile_width
**/
guint
gimp_tile_width (void)
{
return _tile_width;
}
/**
* gimp_tile_height:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the tile_height the GIMP is using. This is a constant value
* given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the tile_height
**/
guint
gimp_tile_height (void)
{
return _tile_height;
}
/**
* gimp_shm_ID:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the shared memory ID used for passing tile data between the GIMP
* core and the Plug-In. This is a constant value
* given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the shared memory ID
**/
gint
gimp_shm_ID (void)
{
return _shm_ID;
}
/**
* gimp_shm_addr:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the address of the shared memory segment used for passing
* tile data between the GIMP core and the Plug-In. This is a constant
* value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the shared memory address
**/
guchar *
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gimp_shm_addr (void)
{
return _shm_addr;
}
/**
* gimp_gamma:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the global gamma value the GIMP and all its Plug-Ins should
* use. This is a constant value given at Plug-In configuration time.
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* NOTE: this feature is unimplemented.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the gamma value
**/
1997-11-25 06:05:25 +08:00
gdouble
gimp_gamma (void)
1997-11-25 06:05:25 +08:00
{
return _gamma_val;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_install_cmap:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns whether or not the Plug-In should allocate an own colormap
* when running on an 8 bit display. This is a constant value given at
* Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* See also: gimp_min_colors()
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the install_cmap boolean
**/
gboolean
gimp_install_cmap (void)
1997-11-25 06:05:25 +08:00
{
return _install_cmap;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_min_colors:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the minimum number of colors to use when allocating an own
* colormap on 8 bit displays. This is a constant value given at
* Plug-In configuration time.
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
*
* See also: gimp_install_cmap()
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the minimum number of colors to allocate
**/
gimprc.in replaced "color-cube" by "min-colors". 2000-04-30 Michael Natterer <mitch@gimp.org> * gimprc.in * app/gimprc.[ch]: replaced "color-cube" by "min-colors". * app/app_procs.c: read unitrc/gimprc before displaying the splash. * app/colormaps.c: set min_colors and install_cmap before initializing GdkRGB. * app/gimprc.[ch] * app/gimpunit.c: don't call the splash's progress_update function. * app/plug_in.c: pass min_colors instead of color_cube to plugins. * app/preferences_dialog.c: widget for min_colors. * libgimp/gimp.[ch]: s/color_cube/min_colors/ but left gimp_color_cube() there for source level compatibility. * libgimp/gimpprotocol.[ch]: changed the GPConfig message accordinly and increased the gimp protocol version number because the change breaks binary compatibility. Also actually pass the use_xshm variable over the wire (was only in the GPConfig struct before). Was it the right thing to do to increase the version number?? * libgimp/gimpui.c (gimp_ui_init): use the same code as the app for initializing GdkRGB. Never explicitly activate Gdk's SHM usage (only switch it off). * app/main.c * libgimp/gimp.c: reverted the handling of all signals except SIGCHLD back to plain old signal() because those signals are fatal anyway and sigaction() as used by gimp_signal_*() made debugging (stacktrace) impossible. * plug-ins/AlienMap/AlienMap.c * plug-ins/AlienMap2/AlienMap2.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/bmp/bmp.c * plug-ins/borderaverage/borderaverage.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/faxg3/faxg3.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/fp/fp.c * plug-ins/fp/fp_gtk.c * plug-ins/gdyntext/Makefile.am * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gfli/gfli.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/Makefile.am * plug-ins/imagemap/imap_main.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/print/print.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-server.c * plug-ins/sel2path/Makefile.am * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/sinus/sinus.c * plug-ins/struc/struc.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjt.c: use gimp_ui_init(). * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off, never on. Don't use gimp_ui_init() here because of libgck.
2000-05-01 02:17:55 +08:00
gint
gimp_min_colors (void)
{
return _min_colors;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_show_tool_tips:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Returns whether or not the Plug-In should show tool-tips. This is a
* constant value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the show_tool_tips boolean
**/
removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimphelpui.[ch]: removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() instead. * libgimpwidgets/gimpwidgets.def: changed accordingly. * libgimpwidgets/gimpwidgets.c (gimp_widgets_init): call _gimp_help_init() so it doesn't need to be done in all plug-ins manually. * libgimp/gimpcompat.h: added gimp_help_init() and gimp_help_free() here as COMPAT_CRUFT. * app/gui/gui.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c * plug-ins/common/AlienMap.c * plug-ins/common/AlienMap2.c * plug-ins/common/CML_explorer.c * plug-ins/common/blur.c * plug-ins/common/curve_bend.c * plug-ins/common/gtm.c * plug-ins/common/illusion.c * plug-ins/common/jigsaw.c * plug-ins/common/plasma.c * plug-ins/common/polar.c * plug-ins/common/ps.c * plug-ins/common/randomize.c * plug-ins/common/sinus.c * plug-ins/common/snoise.c * plug-ins/common/sparkle.c * plug-ins/common/uniteditor.c * plug-ins/common/warp.c * plug-ins/common/wind.c * plug-ins/gap/gap_arr_dialog.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gap/gap_navigator_dialog.c * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/maze/maze_face.c * plug-ins/print/gimp_main_window.c * plug-ins/sel2path/sel2path.c: removed the calls to gimp_help_init() and gimp_help_free(). Fixed bug #81017: * libgimpbase/gimpprotocol.[ch]: added "guint8 show_tool_tips" to the GPConfig message. Increased the protocol version number. * app/plug-in/plug-in.c: pass the value of gui_config->show_tool_tips. * libgimp/gimp.[ch]: added gimp_show_tool_tips() to get the value which was passed in the GPConfig message. * libgimp/gimpui.c (gimp_ui_init): disable the tooltips if show_tool_tips is FALSE. * plug-ins/MapObject/mapobject_main.[ch] * plug-ins/MapObject/mapobject_ui.c * plug-ins/common/jigsaw.c * plug-ins/gap/gap_navigator_dialog.c * plug-ins/gfig/gfig.c: removed all plug-in specific GUI for enabling/disabling tooltips.
2003-01-08 01:00:49 +08:00
gboolean
gimp_show_tool_tips (void)
{
return _show_tool_tips;
}
/**
* gimp_show_help_button:
*
* Returns whether or not GimpDialog should automatically add a help
* button if help_func and help_id are given.
*
* Return value: the show_help_button boolean
*
* Since: GIMP 2.2
**/
gboolean
gimp_show_help_button (void)
{
return _show_help_button;
}
/**
* gimp_check_size:
*
* Returns the size of the checkerboard to be used in previews.
* This is a constant value given at Plug-In configuration time.
*
* Return value: the check_size value
*
* Since: GIMP 2.2
**/
GimpCheckSize
gimp_check_size (void)
{
return _check_size;
}
/**
* gimp_check_type:
*
* Returns the type of the checkerboard to be used in previews.
* This is a constant value given at Plug-In configuration time.
*
* Return value: the check_type value
*
* Since: GIMP 2.2
**/
GimpCheckType
gimp_check_type (void)
{
return _check_type;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_default_display:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the default display ID. This corresponds to the display the
* running procedure's menu entry was invoked from. This is a
* constant value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the default display ID
**/
gint32
gimp_default_display (void)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
return _gdisp_ID;
}
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
/**
* gimp_wm_class:
*
* Returns the window manager class to be used for plug-in windows.
* This is a constant value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Return value: the window manager class
**/
const gchar *
gimp_wm_class (void)
{
return (const gchar *) _wm_class;
}
/**
* gimp_display_name:
*
* Returns the display to be used for plug-in windows.
* This is a constant value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Return value: the display name
**/
const gchar *
gimp_display_name (void)
{
return (const gchar *) _display_name;
}
/**
* gimp_monitor_number:
*
* Returns the monitor number to be used for plug-in windows.
* This is a constant value given at Plug-In configuration time.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Return value: the monitor number
**/
gint
gimp_monitor_number (void)
{
return _monitor_number;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_get_progname:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Returns the Plug-In's executable name.
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Return value: the executable name
**/
const gchar *
gimp_get_progname (void)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
return progname;
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_extension_ack:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* Notify the main GIMP application that the extension has been properly
* initialized and is ready to run.
*
* This function <emphasis>must</emphasis> be called from every
* procedure that was registered as #GIMP_EXTENSION.
*
* Subsequently, extensions can process temporary procedure run
* requests using either gimp_extension_enable() or
* gimp_extension_process().
*
* See also: gimp_install_procedure(), gimp_install_temp_proc()
**/
void
gimp_extension_ack (void)
{
if (! gp_extension_ack_write (_writechannel, NULL))
gimp_quit ();
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_extension_enable:
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
*
* Enables asynchronous processing of messages from the main GIMP
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
* application.
*
* Normally, a plug-in is not called by the GIMP except for the call
* to the procedure it implements. All subsequent communication is
* triggered by the plug-in and all messages sent from the GIMP to the
* plug-in are just answers to requests the plug-in made.
*
* If the plug-in however registered temporary procedures using
* gimp_install_temp_proc(), it needs to be able to receive requests
* to execute them. Usually this will be done by running
* gimp_extension_process() in an endless loop.
*
* If the plug-in cannot use gimp_extension_process(), i.e. if it has
* a GUI and is hanging around in a #GMainLoop, it must call
* gimp_extension_enable().
*
* Note that the plug-in does not need to be a #GIMP_EXTENSION to
* register temporary procedures.
*
* See also: gimp_install_procedure(), gimp_install_temp_proc()
**/
void
gimp_extension_enable (void)
{
static gboolean callback_added = FALSE;
if (! callback_added)
{
g_io_add_watch (_readchannel, G_IO_IN | G_IO_PRI, gimp_extension_read,
NULL);
callback_added = TRUE;
}
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/**
* gimp_extension_process:
* @timeout: The timeout (in ms) to use for the select() call.
*
* Processes one message sent by the GIMP and returns.
*
* Call this function in an endless loop after calling
* gimp_extension_ack() to process requests for running temporary
* procedures.
*
* See gimp_extension_enable() for an asynchronous way of doing the
* same if running an endless loop is not an option.
*
* See also: gimp_install_procedure(), gimp_install_temp_proc()
**/
1997-11-25 06:05:25 +08:00
void
gimp_extension_process (guint timeout)
{
#ifndef G_OS_WIN32
1997-11-25 06:05:25 +08:00
fd_set readfds;
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
gint select_val;
struct timeval tv;
1997-11-25 06:05:25 +08:00
struct timeval *tvp;
if (timeout)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
tv.tv_sec = timeout / 1000;
1999-03-07 20:56:03 +08:00
tv.tv_usec = (timeout % 1000) * 1000;
1997-11-25 06:05:25 +08:00
tvp = &tv;
}
else
tvp = NULL;
FD_ZERO (&readfds);
1999-03-07 20:56:03 +08:00
FD_SET (g_io_channel_unix_get_fd (_readchannel), &readfds);
1997-11-25 06:05:25 +08:00
if ((select_val = select (FD_SETSIZE, &readfds, NULL, NULL, tvp)) > 0)
{
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
gimp_single_message ();
1997-11-25 06:05:25 +08:00
}
else if (select_val == -1)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
perror ("gimp_extension_process");
1997-11-25 06:05:25 +08:00
gimp_quit ();
}
1999-03-07 20:56:03 +08:00
#else
/* Zero means infinite wait for us, but g_poll and
* g_io_channel_win32_poll use -1 to indicate
* infinite wait.
*/
GPollFD pollfd;
if (timeout == 0)
timeout = -1;
g_io_channel_win32_make_pollfd (_readchannel, G_IO_IN, &pollfd);
if (g_io_channel_win32_poll (&pollfd, 1, timeout) == 1)
1999-03-07 20:56:03 +08:00
gimp_single_message ();
#endif
1997-11-25 06:05:25 +08:00
}
/**
* gimp_attach_new_parasite:
* @name: the name of the #GimpParasite to create and attach.
* @flags: the flags set on the #GimpParasite.
* @size: the size of the parasite data in bytes.
* @data: a pointer to the data attached with the #GimpParasite.
*
* Convenience function that creates a parasite and attaches it
* to the GIMP.
*
* Return value: TRUE on successful creation and attachment of
* the new parasite.
*
* See Also: gimp_parasite_attach()
*/
gboolean
gimp_attach_new_parasite (const gchar *name,
gint flags,
gint size,
gconstpointer data)
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
{
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
gboolean success;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
success = gimp_parasite_attach (parasite);
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
gimp_parasite_free (parasite);
return success;
Makefile.am configure.in added new directory libgimpbase/ 2001-05-21 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool-1.4.in: added new directory libgimpbase/ * app/Makefile.am: link against the new lib. * app/appenums.h: removed the PDB enums which are in libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed. * app/apptypes.h: #include "libgimpbase/gimpbasetypes.h" * app/[lots] * app/core/[of] * app/gui/[files] * app/tools/: changed includes and all PDB types. * app/pdb/*: regenerated. * libgimp/Makefile.am: don't build libgimpi.a uglyness any more. * libgimp/gimpenv.[ch] * libgimp/gimplimits.[hh] * libgimp/gimpparasite.[ch] * libgimp/gimpparasiteio.[ch] * libgimp/gimpprotocol.[ch] * libgimp/gimpsignal.[ch] * libgimp/gimpunit.h * libgimp/gimputils.[ch] * libgimp/gimpwire.[ch]: removed... * libgimpbase/*: ...and added here as new library. * libgimp/gimp.[ch] * libgimp/gimpdrawable.[ch] * libgimp/gimpenums.h * libgimp/gimpimage.[ch] * libgimp/gimptile.c * libgimp/gimptypes.h * libgimp/gimpunit.c: changed accordingly. Added the gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and gimpimage.[ch]. * libgimpwidgets/gimppatheditor.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpsizeentry.c * libgimpwidgets/gimpunitmenu.c * libgimpwidgets/gimpwidgets.c * libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly. * plug-ins/*/Makefile.am * plug-ins/common/mkgen.pl: link against libgimpbase. * tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so the enums are known to pdbgen... * tools/pdbgen/enumcode.pl: ...but don't write them out to libgimp/gimpenums.h * tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c files. Added GIMP_ to the type names ganerated in app/. * tools/pdbgen/enums.pl: regenerated. * tools/pdbgen/pdb.pl * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/unit.pdb: changed includes.
2001-05-21 21:58:46 +08:00
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/* private functions */
static void
gimp_close (void)
{
if (gimp_debug_flags & GIMP_DEBUG_QUIT)
gimp_debug_stop ();
if (PLUG_IN_INFO.quit_proc)
(* PLUG_IN_INFO.quit_proc) ();
#if defined(USE_SYSV_SHM)
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
if ((_shm_ID != -1) && _shm_addr)
shmdt ((char *) _shm_addr);
#elif defined(USE_WIN32_SHM)
if (shm_handle)
CloseHandle (shm_handle);
#elif defined(USE_POSIX_SHM)
if ((_shm_ID != -1) && (_shm_addr != MAP_FAILED))
munmap (_shm_addr, TILE_MAP_SIZE);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
#endif
gp_quit_write (_writechannel, NULL);
}
static void
gimp_debug_stop (void)
{
#ifndef G_OS_WIN32
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Waiting for debugger...");
raise (SIGSTOP);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
#else
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Debugging not implemented on Win32");
#endif
}
static void
gimp_message_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer data)
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
{
gimp_message (message);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
}
#ifndef G_OS_WIN32
static void
gimp_plugin_sigfatal_handler (gint sig_num)
1997-11-25 06:05:25 +08:00
{
switch (sig_num)
{
case SIGHUP:
case SIGINT:
case SIGQUIT:
case SIGABRT:
case SIGTERM:
g_printerr ("%s terminated: %s\n", progname, g_strsignal (sig_num));
break;
case SIGBUS:
case SIGSEGV:
case SIGFPE:
case SIGPIPE:
default:
g_printerr ("%s: fatal error: %s\n", progname, g_strsignal (sig_num));
switch (stack_trace_mode)
{
case GIMP_STACK_TRACE_NEVER:
break;
case GIMP_STACK_TRACE_QUERY:
{
sigset_t sigset;
sigemptyset (&sigset);
sigprocmask (SIG_SETMASK, &sigset, NULL);
g_on_error_query (progname);
}
break;
case GIMP_STACK_TRACE_ALWAYS:
{
sigset_t sigset;
sigemptyset (&sigset);
sigprocmask (SIG_SETMASK, &sigset, NULL);
g_on_error_stack_trace (progname);
}
break;
}
break;
}
1997-11-25 06:05:25 +08:00
gimp_quit ();
}
app/appenv.h New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc 1999-09-01 Tor Lillqvist <tml@iki.fi> * app/appenv.h * libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI, RINT(), ROUND() etc from app/appenv.h here, so plug-ins can use them, too. Remove some commented-out old stuff in appenv.h. * libgimp/gimp.h: Include gimpmath.h. * libgimp/gimp.c (gimp_main): Win32: Don't install signal handlers, we can't do anything useful in the handler ourselves anyway (it would be nice to print out a backtrace, but that seems pretty hard to do, even if not impossible). Let Windows inform the user about the crash. If the plug-in was compiled with MSVC, and the user also has it, she is offered a chance to start the debugger automatically anyway. * app/*several*.c: Include gimpmath.h for G_PI etc. Don't include <math.h>, as gimpmath.h includes it. * plug-ins/*/*many*.c: Include config.h. Don't include <math.h>. Remove all the duplicated definitions of G_PI and rint(). Use RINT() instead of rint(). * app/app_procs.[ch]: app_exit() takes a gboolean. * app/batch.c * app/commands.c * app/interface.c: Call app_exit() with FALSE or TRUE. * app/main.c (on_error): Call gimp_fatal_error. (main): Don't install any signal handler on Win32 here, either. * app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format the message and call MessageBox with it. g_on_error_query doesn't do anything useful on Win32, and printf'ing a message to stdout or stderr doesn't do anything, either, in a windowing application.
1999-09-02 04:30:56 +08:00
#endif
1997-11-25 06:05:25 +08:00
static gboolean
gimp_plugin_io_error_handler (GIOChannel *channel,
GIOCondition cond,
gpointer data)
{
g_printerr ("%s: fatal error: GIMP crashed\n", progname);
gimp_quit ();
/* never reached */
return TRUE;
}
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
static gboolean
gimp_write (GIOChannel *channel,
const guint8 *buf,
gulong count,
gpointer user_data)
1997-11-25 06:05:25 +08:00
{
gulong bytes;
while (count > 0)
{
if ((write_buffer_index + count) >= WRITE_BUFFER_SIZE)
{
bytes = WRITE_BUFFER_SIZE - write_buffer_index;
memcpy (&write_buffer[write_buffer_index], buf, bytes);
write_buffer_index += bytes;
if (! gimp_wire_flush (channel, NULL))
return FALSE;
}
1997-11-25 06:05:25 +08:00
else
{
bytes = count;
memcpy (&write_buffer[write_buffer_index], buf, bytes);
write_buffer_index += bytes;
}
1997-11-25 06:05:25 +08:00
buf += bytes;
count -= bytes;
}
return TRUE;
}
Sven Neumann <sven@gimp.org> 2000-05-31 Michael Natterer <mitch@gimp.org> Sven Neumann <sven@gimp.org> * libgimp/Makefile.am * libgimp/gimpchannel_pdb.h * libgimp/gimpdisplay_pdb.h * libgimp/gimpdrawable_pdb.h * libgimp/gimpgradient_pdb.h * libgimp/gimphelp_pdb.h * libgimp/gimpimage_pdb.h * libgimp/gimplayer_pdb.h * libgimp/gimpparasite_pdb.h * libgimp/gimpselection_pdb.h * libgimp/gimpunit_pdb.h * libgimp/gimpdrawable.[ch] * libgimp/gimphelp.c * libgimp/gimppixelrgn.h * libgimp/gimptile.h: new files * libgimp/gimp.[ch] * libgimp/gimpchannel_pdb.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimpselection_pdb.c * libgimp/gimphelp_pdb.c * libgimp/gimpimage_pdb.c * libgimp/gimplayer_pdb.c * libgimp/gimpgradientmenu.c * libgimp/gimpbrushmenu.c * libgimp/gimpmenu.[ch] * libgimp/gimppatternmenu.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: part III of the (final) libgimp cleanup Split gimp.h into a bunch of headers. More or less finished the task of moving PDB wrappers into separate files in preparation of the upcoming autogen-it-all-attack. * libgimp/gimpcompat.h: declared the following functions obsolete: gimp_[channel|layer]_[width|height] gimp_layer_[bpp|type] gimp_channel_get_[image|layer]_ID * libgimp/gimptypes.h: new file: GPlugInInfo GTile GDrawable GPixelRgn GParamColor GParamRegion GParamData GParamDef GParam: s/G/Gimp/ * app/gimphelp_cmds.c * app/plug_in_cmds.c * tools/pdbgen/pdb/gimphelp.pdb * tools/pdbgen/pdb/plug_in.pdb: changed help texts.
2000-05-31 14:15:06 +08:00
static gboolean
gimp_flush (GIOChannel *channel,
gpointer user_data)
1997-11-25 06:05:25 +08:00
{
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
GIOStatus status;
GError *error = NULL;
added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. 2001-08-29 Michael Natterer <mitch@gimp.org> * configure.in: added -DG_DISABLE_DEPRECATED and -DGDK_DISABLE_COMPAT_H. * app/batch.c * app/file-utils.c * app/gdisplay.c * app/gdisplay_ops.c * app/gimprc.[ch] * app/module_db.c * app/nav_window.c * app/undo_history.c * app/core/gimpgradient.c * app/core/gimpimagefile.c * app/core/gimppalette.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/error-console-dialog.c * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpdatafactoryview.c * libgimp/gimpmenu.c * plug-ins/common/bz2.c * plug-ins/common/compose.c * plug-ins/common/csource.c * plug-ins/common/decompose.c * plug-ins/common/gz.c * plug-ins/common/uniteditor.c * plug-ins/common/wmf.c * plug-ins/common/xbm.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/interp_slib.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gimprc.pdb * app/pdb/fileops_cmds.c * app/pdb/gimprc_cmds.c: removed deprecated stuff like g_basename(), g_dirname(), g_strup() and friends. Added some "const gchar *" declarations while I was on it. Added some G_N_ELEMENTS() macros instead of declaring a useless variable for the number of items. * app/widgets/gtkhwrapbox.[ch] * app/widgets/gtkvwrapbox.[ch] * app/widgets/gtkwrapbox.[ch]: replaced with the latest versions from GLE, ported by the master himself. * app/gui/toolbox.c: changed accordingly. * app/plug_in.c * libgimp/gimp.c * libgimpbase/gimpwire.[ch]: use evil hacks to get binary mode from the new GIOChannel implementation (upstream bugreport already posted).
2001-08-30 01:48:28 +08:00
gsize count;
gsize bytes;
1997-11-25 06:05:25 +08:00
if (write_buffer_index > 0)
{
count = 0;
while (count != write_buffer_index)
{
do
{
bytes = 0;
status = g_io_channel_write_chars (channel,
&write_buffer[count],
(write_buffer_index - count),
&bytes,
&error);
}
while (status == G_IO_STATUS_AGAIN);
if (status != G_IO_STATUS_NORMAL)
{
if (error)
{
g_warning ("%s: gimp_flush(): error: %s",
g_get_prgname (), error->message);
g_error_free (error);
}
else
{
g_warning ("%s: gimp_flush(): error", g_get_prgname ());
}
return FALSE;
}
1997-11-25 06:05:25 +08:00
count += bytes;
}
write_buffer_index = 0;
}
return TRUE;
}
static void
gimp_loop (void)
1997-11-25 06:05:25 +08:00
{
GimpWireMessage msg;
1997-11-25 06:05:25 +08:00
while (TRUE)
1997-11-25 06:05:25 +08:00
{
if (! gimp_wire_read_msg (_readchannel, &msg, NULL))
1999-03-13 05:30:44 +08:00
{
gimp_close ();
1999-03-13 05:30:44 +08:00
return;
}
1997-11-25 06:05:25 +08:00
switch (msg.type)
{
case GP_QUIT:
gimp_wire_destroy (&msg);
gimp_close ();
return;
case GP_CONFIG:
gimp_config (msg.data);
break;
case GP_TILE_REQ:
case GP_TILE_ACK:
case GP_TILE_DATA:
g_warning ("unexpected tile message received (should not happen)");
break;
case GP_PROC_RUN:
gimp_proc_run (msg.data);
gimp_wire_destroy (&msg);
gimp_close ();
1999-03-13 05:30:44 +08:00
return;
case GP_PROC_RETURN:
g_warning ("unexpected proc return message received (should not happen)");
break;
case GP_TEMP_PROC_RUN:
g_warning ("unexpected temp proc run message received (should not happen");
break;
case GP_TEMP_PROC_RETURN:
g_warning ("unexpected temp proc return message received (should not happen");
break;
case GP_PROC_INSTALL:
g_warning ("unexpected proc install message received (should not happen)");
break;
case GP_HAS_INIT:
g_warning ("unexpected has init message received (should not happen)");
break;
}
1997-11-25 06:05:25 +08:00
gimp_wire_destroy (&msg);
1997-11-25 06:05:25 +08:00
}
}
static void
gimp_config (GPConfig *config)
{
if (config->version < GIMP_PROTOCOL_VERSION)
1997-11-25 06:05:25 +08:00
{
g_message ("Could not execute plug-in \"%s\"\n(%s)\n"
"because the GIMP is using an older version of the "
"plug-in protocol.",
gimp_filename_to_utf8 (g_get_prgname ()),
gimp_filename_to_utf8 (progname));
1997-11-25 06:05:25 +08:00
gimp_quit ();
}
else if (config->version > GIMP_PROTOCOL_VERSION)
1997-11-25 06:05:25 +08:00
{
g_message ("Could not execute plug-in \"%s\"\n(%s)\n"
"because it uses an obsolete version of the "
"plug-in protocol.",
gimp_filename_to_utf8 (g_get_prgname ()),
gimp_filename_to_utf8 (progname));
1997-11-25 06:05:25 +08:00
gimp_quit ();
}
_tile_width = config->tile_width;
_tile_height = config->tile_height;
_shm_ID = config->shm_ID;
_check_size = config->check_size;
_check_type = config->check_type;
_install_cmap = config->install_cmap ? TRUE : FALSE;
_show_tool_tips = config->show_tooltips ? TRUE : FALSE;
_show_help_button = config->show_help_button ? TRUE : FALSE;
_min_colors = config->min_colors;
_gdisp_ID = config->gdisp_ID;
_wm_class = g_strdup (config->wm_class);
_display_name = g_strdup (config->display_name);
_monitor_number = config->monitor_number;
1997-11-25 06:05:25 +08:00
if (config->app_name)
g_set_application_name (config->app_name);
gimp_cpu_accel_set_use (config->use_cpu_accel);
1997-11-25 06:05:25 +08:00
if (_shm_ID != -1)
{
#if defined(USE_SYSV_SHM)
/* Use SysV shared memory mechanisms for transferring tile data. */
Fix a bunch of warnings from Sparse: 2004-11-13 Manish Singh <yosh@gimp.org> Fix a bunch of warnings from Sparse: * app/actions/dockable-commands.c * app/actions/layers-actions.c * app/actions/view-commands.c * app/base/pixel-surround.c * app/config/gimpconfig-utils.c * app/config/gimpscanner.c * app/core/gimpbrushgenerated.c * app/core/gimpcontainer.c * app/core/gimpimage.c * app/dialogs/palette-import-dialog.c * app/file/gimprecentlist.c * app/plug-in/plug-in-params.c * app/text/gimptext-compat.c * app/text/gimptext-parasite.c * app/vectors/gimpbezierstroke.c * app/vectors/gimpstroke.c * app/widgets/gimpcellrendereraccel.c * app/widgets/gimpselectiondata.c * app/xcf/xcf.c * libgimp/gimp.c * libgimpthumb/gimpthumb-utils.c * libgimpthumb/gimpthumbnail.c * modules/cdisplay_proof.c * plug-ins/Lighting/lighting_ui.c * plug-ins/common/csource.c * plug-ins/common/glasstile.c * plug-ins/common/nova.c * plug-ins/common/pcx.c * plug-ins/common/pnm.c * plug-ins/common/randomize.c * plug-ins/common/screenshot.c * plug-ins/common/sel_gauss.c * plug-ins/common/spheredesigner.c * plug-ins/common/wind.c * plug-ins/gfig/gfig-dialog.c * plug-ins/gfig/gfig-dobject.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/ifscompose/ifscompose.c * plug-ins/print/gimp_main_window.c * plug-ins/print/print.c: Cleanup integer vs. pointer confusion. * app/base/temp-buf.c * app/dialogs/about-dialog.c * plug-ins/common/bumpmap.c * plug-ins/common/jigsaw.c * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups. * app/config/gimpconfig-deserialize.c * app/config/gimpconfig-path.c * app/config/gimpconfigwriter.c * app/core/gimpgradient.c * app/tools/gimpdrawtool.c * plug-ins/common/nlfilt.c * plug-ins/common/unsharp.c * plug-ins/common/zealouscrop.c: Define inline functions before they are used. * app/core/gimpdrawable-blend.c: PixelRegion definition was changed some time ago, but the initialization here didn't change. Fix it. * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to assign token twice in a row. * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No need to initialize file_data, since the code fills out all the fields. * plug-ins/common/CML_explorer.c * plug-ins/common/vpropagate.c: Declare function pointers fully. * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed, we assume we can use the "inline" keyword always. * plug-ins/common/psd_save.c * plug-ins/common/vinvert.c * plug-ins/gfig/gfig-arc.c * plug-ins/gfig/gfig-bezier.c * plug-ins/gfig/gfig-circle.c * plug-ins/gfig/gfig-dialog.c * plug-ins/gfig/gfig-dobject.c * plug-ins/gfig/gfig-ellipse.c * plug-ins/gfig/gfig-line.c * plug-ins/gfig/gfig-poly.c * plug-ins/gfig/gfig-spiral.c * plug-ins/gfig/gfig-star.c * plug-ins/gfig/gfig.c * plug-ins/gimpressionist/orientmap.c * plug-ins/gimpressionist/placement.c * plug-ins/gimpressionist/sizemap.c * plug-ins/imagemap/imap_grid.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_preferences.c * plug-ins/imagemap/imap_settings.c * plug-ins/maze/maze.c * plug-ins/sel2path/curve.c * plug-ins/sel2path/fit.c * plug-ins/sel2path/pxl-outline.c * plug-ins/sel2path/spline.c * plug-ins/xjt/xjt.c: Functions with no args should be declared with (void). * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet the compiler.
2004-11-14 10:50:33 +08:00
_shm_addr = (guchar *) shmat (_shm_ID, NULL, 0);
if (_shm_addr == (guchar *) -1)
{
g_error ("shmat() failed: %s\n" ERRMSG_SHM_FAILED,
g_strerror (errno));
}
#elif defined(USE_WIN32_SHM)
/* Use Win32 shared memory mechanisms for transferring tile data. */
gchar fileMapName[128];
1999-03-07 20:56:03 +08:00
/* From the id, derive the file map name */
g_snprintf (fileMapName, sizeof (fileMapName), "GIMP%d.SHM", _shm_ID);
1999-03-07 20:56:03 +08:00
/* Open the file mapping */
shm_handle = OpenFileMapping (FILE_MAP_ALL_ACCESS,
0, fileMapName);
1999-03-07 20:56:03 +08:00
if (shm_handle)
{
/* Map the shared memory into our address space for use */
_shm_addr = (guchar *) MapViewOfFile (shm_handle,
FILE_MAP_ALL_ACCESS,
0, 0, TILE_MAP_SIZE);
/* Verify that we mapped our view */
if (!_shm_addr)
{
g_error ("MapViewOfFile error: %d... " ERRMSG_SHM_FAILED,
GetLastError ());
}
}
1999-03-07 20:56:03 +08:00
else
{
g_error ("OpenFileMapping error: %d... " ERRMSG_SHM_FAILED,
GetLastError ());
}
1997-11-25 06:05:25 +08:00
#elif defined(USE_POSIX_SHM)
/* Use POSIX shared memory mechanisms for transferring tile data. */
gchar map_file[32];
gint shm_fd;
/* From the id, derive the file map name */
g_snprintf (map_file, sizeof (map_file), "/gimp-shm-%d", _shm_ID);
/* Open the file mapping */
shm_fd = shm_open (map_file, O_RDWR, 0600);
if (shm_fd != -1)
{
/* Map the shared memory into our address space for use */
_shm_addr = (guchar *) mmap (NULL, TILE_MAP_SIZE,
PROT_READ | PROT_WRITE, MAP_SHARED,
shm_fd, 0);
/* Verify that we mapped our view */
if (_shm_addr == MAP_FAILED)
{
g_error ("mmap() failed: %s\n" ERRMSG_SHM_FAILED,
g_strerror (errno));
}
close (shm_fd);
}
else
{
g_error ("shm_open() failed: %s\n" ERRMSG_SHM_FAILED,
g_strerror (errno));
}
1999-03-07 20:56:03 +08:00
#endif
}
1997-11-25 06:05:25 +08:00
}
static void
gimp_proc_run (GPProcRun *proc_run)
{
if (PLUG_IN_INFO.run_proc)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
GPProcReturn proc_return;
GimpParam *return_vals;
gint n_return_vals;
1997-11-25 06:05:25 +08:00
(* PLUG_IN_INFO.run_proc) (proc_run->name,
proc_run->nparams,
(GimpParam *) proc_run->params,
&n_return_vals,
&return_vals);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
proc_return.name = proc_run->name;
proc_return.nparams = n_return_vals;
proc_return.params = (GPParam *) return_vals;
1997-11-25 06:05:25 +08:00
if (! gp_proc_return_write (_writechannel, &proc_return, NULL))
gimp_quit ();
1997-11-25 06:05:25 +08:00
}
}
1997-11-25 06:05:25 +08:00
static void
gimp_temp_proc_run (GPProcRun *proc_run)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
GimpRunProc run_proc;
1997-11-25 06:05:25 +08:00
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
run_proc = (GimpRunProc) g_hash_table_lookup (temp_proc_ht,
(gpointer) proc_run->name);
1997-11-25 06:05:25 +08:00
if (run_proc)
{
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
GPProcReturn proc_return;
GimpParam *return_vals;
gint n_return_vals;
1997-11-25 06:05:25 +08:00
(* run_proc) (proc_run->name,
proc_run->nparams,
(GimpParam*) proc_run->params,
&n_return_vals,
&return_vals);
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
proc_return.name = proc_run->name;
proc_return.nparams = n_return_vals;
proc_return.params = (GPParam *) return_vals;
if (! gp_temp_proc_return_write (_writechannel, &proc_return, NULL))
gimp_quit ();
}
}
1997-11-25 06:05:25 +08:00
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static void
gimp_process_message (GimpWireMessage *msg)
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
{
switch (msg->type)
{
case GP_QUIT:
gimp_quit ();
break;
case GP_CONFIG:
gimp_config (msg->data);
break;
case GP_TILE_REQ:
case GP_TILE_ACK:
case GP_TILE_DATA:
g_warning ("unexpected tile message received (should not happen)");
break;
case GP_PROC_RUN:
g_warning ("unexpected proc run message received (should not happen)");
break;
case GP_PROC_RETURN:
g_warning ("unexpected proc return message received (should not happen)");
break;
case GP_TEMP_PROC_RUN:
gimp_temp_proc_run (msg->data);
break;
case GP_TEMP_PROC_RETURN:
g_warning ("unexpected temp proc return message received (should not happen)");
break;
case GP_PROC_INSTALL:
g_warning ("unexpected proc install message received (should not happen)");
break;
case GP_HAS_INIT:
g_warning ("unexpected has init message received (should not happen)");
break;
1997-11-25 06:05:25 +08:00
}
}
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
static void
gimp_single_message (void)
{
GimpWireMessage msg;
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
/* Run a temp function */
if (! gimp_wire_read_msg (_readchannel, &msg, NULL))
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
gimp_quit ();
gimp_process_message (&msg);
added "wm_name", "wm_class", "display_name" and "monitor_number" to the 2003-11-07 Michael Natterer <mitch@gimp.org> * libgimpbase/gimpprotocol.[ch]: added "wm_name", "wm_class", "display_name" and "monitor_number" to the GPConfig message. Increased protocol version number. * libgimp/gimp.[ch] (gimp_config): read them from the GPConfig message and remember them. Added public accessors for the new config values. * libgimp/gimpui.c (gimp_ui_init): pass wm_name and wm_class to gtk_init() and export the display/screen to use to the environment. * app/core/gimp.[ch]: added vtable entries to get the values from the GUI. * app/gui/gui-vtable.c: implement the vtable entries. * app/plug-in/plug-in-run.c: fill in the GPConfig values using the new Gimp vtable functions. * app/display/gimpdisplayshell-layer-select.c * app/display/gimpdisplayshell.c * app/gui/about-dialog.c * app/gui/channels-commands.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/file-dialog-utils.[ch] * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor-commands.c * app/gui/gradients-commands.c * app/gui/grid-dialog.c * app/gui/image-commands.c * app/gui/info-dialog.[ch] * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/module-browser.c * app/gui/offset-dialog.c * app/gui/palette-import-dialog.c * app/gui/qmask-commands.c * app/gui/resize-dialog.c * app/gui/splash.c * app/gui/stroke-dialog.c * app/gui/templates-commands.c * app/gui/tips-dialog.c * app/gui/vectors-commands.c * app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c * app/widgets/gimpdock.c * app/widgets/gimperrorconsole.c * app/widgets/gimptexteditor.c * app/widgets/gimptoolbox.c * app/widgets/gimpviewabledialog.[ch] * libgimpwidgets/gimpfileselection.c * libgimpwidgets/gimpquerybox.c * libgimpwidgets/gimpunitmenu.c * plug-ins/helpbrowser/dialog.c * plug-ins/ifscompose/ifscompose.c: replaced all calls to gtk_window_set_wmclass() by gtk_window_set_role() and all "const gchar *wmclass_name" parameters by "const gchar *role". Cleaned up the window role strings.
2003-11-08 01:29:02 +08:00
gimp_wire_destroy (&msg);
Changed the semantics of GIMP_EXTENSION and (to some extent) of 2003-06-19 Michael Natterer <mitch@gimp.org> Changed the semantics of GIMP_EXTENSION and (to some extent) of GIMP_PLUGIN: The old meaning of EXTENSION was "I live in the toolbox" and PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I am invoked interactively)". This is completely useless, since living in the toolbox means having "<Toolbox>" in the menu_path and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of what type of procedure we are. The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure, I am invoked, do my job and finish", while GIMP_EXTENSION means "I will install temporary procedures and I will keep running to keep them available". (A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the core that it's ready to run, or the core will block waiting for the message !!!). * configure.in: bumped version number to 1.3.16. * libgimpbase/gimpprotocol.h: increased protocol version number so old extensions will refuse to load. * app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but look at their parameters and pass them either RUN-MODE, or RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE. * app/pdb/procedural_db.c: cleaned up, better error reporting, replaced an impossible error message by g_return_if_fail() * app/plug-in/plug-in-message.c (plug_in_handle_proc_install): better error messages. * app/plug-in/plug-in-params.c: allocate parameter arrays using g_new0() so we don't have to worry about uninitialized stuff later. * app/plug-in/plug-in-run.c (plug_in_run): wait for gimp_extension_ack() installation confirmation for ALL extensions, not just for automatically started ones. * app/plug-in/plug-ins.c: cleanup. * libgimp/gimp.[ch]: cleaned up and API-documented massively. Made all magic values given in the GPConfig message static and added accessor functions for them. Added gimp_tile_width()/height(). Added new function gimp_extension_enable() which turns on asynchronous processing of temp_proc run requests without having to enter an endless gimp_extension_process() loop. Moved all private functions to the end of the file. Added tons of g_return_if_fail() all over the place. Call gimp_run_procedure2() from gimp_run_procedure() instead of duplicating the code. Indentation, spacing, stuff... * libgimp/gimptile.[ch]: removed gimp_tile_width()/height(). * libgimp/gimpdrawable.c * libgimp/gimppixelrgn.c * libgimp/gimptile.c: use the gimp_tile_width()/height() accessor functions. * libgimp/gimp.def: added gimp_extension_enable. * libgimp/gimpmenu.c: removed evil code which connected to _readchannel manually and use gimp_extension_enable() for watching temp_procs. * plug-ins/helpbrowser/helpbrowser.c: removed the same evil code here and call gimp_extension_enable(). Call gimp_extension_ack() to let the core know that the temp_proc is installed. * plug-ins/script-fu/script-fu.c: made all procedures except the permanently running "extension_script_fu" ordinary GIMP_PLUGIN procedures. * plug-ins/common/curve_bend.c * plug-ins/common/plugindetails.c * plug-ins/common/screenshot.c * plug-ins/common/uniteditor.c * plug-ins/common/winclipboard.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/gfli/gfli.c * plug-ins/twain/twain.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN procedures and renamed them from "extension_*" to "plug_in_*". Random cleanups. * app/widgets/gimphelp.c * plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-20 01:12:00 +08:00
}
static gboolean
gimp_extension_read (GIOChannel *channel,
GIOCondition condition,
gpointer data)
{
gimp_single_message ();
return TRUE;
}