gimp/app/pdb/context-cmds.c

5771 lines
253 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* NOTE: This file is auto-generated by pdbgen.pl. */
#include "config.h"
#include "stamp-pdbgen.h"
#include <cairo.h>
#include <gegl.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
#include "libgimpcolor/gimpcolor.h"
#include "libgimpconfig/gimpconfig.h"
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
#include "libgimpbase/gimpbase.h"
#include "pdb-types.h"
#include "core/gimp-gradients.h"
#include "core/gimp.h"
#include "core/gimpcontainer.h"
#include "core/gimpdashpattern.h"
#include "core/gimpdatafactory.h"
#include "core/gimplist.h"
#include "core/gimpparamspecs.h"
#include "core/gimpstrokeoptions.h"
#include "paint/gimppaintoptions.h"
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
#include "plug-in/gimpplugin-context.h"
#include "plug-in/gimpplugin.h"
app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps 2006-04-29 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager.[ch]: new object which keeps all plug-in related stuff that was kept in the Gimp instance. Has "menu-branch-added" and "last-plug-in-changed" signals. * app/plug-in/plug-ins.[ch]: removed, all its functions are in GimpPlugInManager now. * app/core/gimpmarshal.list: new marshaller for the new object. * app/core/gimp.[ch]: removed all plug-in related stuff and keep a GimpPlugInManager around. * app/plug-in/plug-in-data.[ch] * app/plug-in/plug-in-file.[ch] * app/plug-in/plug-in-help-domain.[ch] * app/plug-in/plug-in-locale-domain.[ch] * app/plug-in/plug-in-menu-branch.[ch] * app/plug-in/plug-ins-query.[ch]: removed... * app/plug-in/gimppluginmanager-data.[ch] * app/plug-in/gimppluginmanager-file.[ch] * app/plug-in/gimppluginmanager-help-domain.[ch] * app/plug-in/gimppluginmanager-locale-domain.[ch] * app/plug-in/gimppluginmanager-menu-branch.[ch] * app/plug-in/gimppluginmanager-query.[ch]: ...and added as methods of GimpPlugInManager. * app/plug-in/plug-in-debug.[ch] * app/plug-in/plug-in-shm.[ch]: removed... * app/plug-in/gimpplugindebug.[ch] * app/plug-in/gimppluginshm.[ch]: ...and added as properly namespeced structs with constructors and destructors. * app/core/Makefile.am * app/core/gimpenvirontable.[ch] * app/core/gimpinterpreterdb.[ch]: removed... * app/plug-in/gimpenvirontable.[ch] * app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all related stuff. * app/actions/plug-in-actions.[ch]: connect to the plug-in-manager's "menu-path-added" signal and create menu branch actions accordingly. * app/plug-in/plug-in-context.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/plug-in/plug-in.[ch] * app/app_procs.c * app/actions/file-commands.c * app/actions/plug-in-commands.c * app/core/gimpimage.c * app/dialogs/file-open-location-dialog.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/gui/gui.c * app/menus/plug-in-menus.c * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/widgets/gimpdnd-xds.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimphelp.c * app/widgets/gimpthumbbox.c * app/xcf/xcf.c * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: follow above refactoring. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-04-29 06:26:51 +08:00
#include "plug-in/gimppluginmanager.h"
#include "gimppdb.h"
#include "gimppdb-utils.h"
#include "gimppdbcontext.h"
#include "gimpprocedure.h"
#include "internal-procs.h"
static GimpValueArray *
context_push_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open)
success = gimp_plug_in_context_push (plug_in);
else
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
success = FALSE;
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_pop_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
if (plug_in && plug_in->open)
success = gimp_plug_in_context_pop (plug_in);
else
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
success = FALSE;
Made an object out of the plug-in struct. Also change refcounting 2006-05-03 Michael Natterer <mitch@gimp.org> Made an object out of the plug-in struct. Also change refcounting considerably: - gimp_plug_in_open() adds a reference that is only dropped by gimp_plug_in_close(). - temporarily ref the plug-in while handling messages. - remporarily ref the plug-in while a recursive main loop is running. - each caller of gimp_plug_in_new() also unrefs the plug-in before returning, the only reference that persists across functions (that keeps the plug-in alive) is the one added by open(). * app/plug-in/plug-in.[ch] * app/plug-in/plug-in-context.[ch] * app/plug-in/plug-in-message.[ch] * app/plug-in/plug-in-progress.[ch]: removed these files... * app/plug-in/gimpplugin.[ch] * app/plug-in/gimpplugin-context.[ch] * app/plug-in/gimpplugin-message.[ch] * app/plug-in/gimpplugin-progress.[ch]: ...and added here as GObject. * app/plug-in/plug-in-proc-frame.[ch]: removed... * app/plug-in/gimppluginprocframe.[ch]: ...and added with a namespace. * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/gimppluginmanager-call.c * app/plug-in/gimppluginmanager-file.c * app/plug-in/gimppluginmanager.[ch] * app/pdb/gimppluginprocedure.c * app/pdb/gimptemporaryprocedure.c * app/pdb/gimptemporaryprocedure.h * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/undo.pdb: changed accordingly. * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/progress_cmds.c * app/pdb/undo_cmds.c: regenerated.
2006-05-04 02:05:06 +08:00
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_set_defaults_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gimp_config_reset (GIMP_CONFIG (context));
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
static GimpValueArray *
context_list_paint_methods_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gchar **paint_methods = NULL;
paint_methods = gimp_container_get_name_array (gimp->paint_info_list);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_take_boxed (gimp_value_array_index (return_vals, 1), paint_methods);
return return_vals;
}
static GimpValueArray *
context_get_paint_method_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
GimpPaintInfo *paint_info = gimp_context_get_paint_info (context);
if (paint_info)
name = g_strdup (gimp_object_get_name (paint_info));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_paint_method_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintInfo *paint_info = gimp_pdb_get_paint_info (gimp, name, error);
if (paint_info)
gimp_context_set_paint_info (context, paint_info);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_stroke_method_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint stroke_method = 0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"method", &stroke_method,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), stroke_method);
return return_vals;
}
static GimpValueArray *
context_set_stroke_method_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint stroke_method;
stroke_method = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"method", stroke_method,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_foreground_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
GimpValueArray *return_vals;
GimpRGB foreground = { 0.0, 0.0, 0.0, 1.0 };
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
gimp_context_get_foreground (context, &foreground);
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
gimp_rgb_set_alpha (&foreground, 1.0);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &foreground);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return return_vals;
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_set_foreground_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
replace the value union by a GValue. 2006-03-30 Michael Natterer <mitch@gimp.org> * app/pdb/procedural_db.[ch] (struct Argument): replace the value union by a GValue. (procedural_db_argument_init) (procedural_db_compat_arg_init): new functions to initialize an Argument. They call g_value_init() on the Argument's value. (procedural_db_arguments) (procedural_db_return_values): initialize the returned Argument arrays so their GValues are ready to use. Allow to get the (unsuccessful) return values of a NULL ProcRecord. (procedural_db_destroy_args): g_value_unset() the values. Added a "gboolean full_destroy" parameter. Its only effect is to destroy PDB arrays, everything else is nicely memory managed by GValue. (procedural_db_execute) (procedural_db_run_proc): do GValue stuff. Added n_args and n_return_vals parameters to execute(). (procedural_db_execute_proc): private function to execute a procedure. Validates the passed in arguments using the registered GParamSpecs before passing them to the resp. exec method. * app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs an array of ProcArgs now in order to initialize the Arguments' GValues correctly. Passing NULL ProcArgs uses procedural_db_compat_arg_init(), so procedures (plug-ins) returning more values than expected work. (plug_in_args_to_params): do GValue stuff here too. (plug_in_args_destroy): removed this function, procedural_db_destroy_args() does the same now. * app/plug-in/plug-in-message.c (plug_in_handle_proc_run): simplified quite a bit because everything returns n_return_values now. Call plug_in_params_to_args() only of the procedure was found. (plug_in_handle_proc_return_priv): pass ProcRecs to plug_in_params_to_args(). * app/batch.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * app/core/gimppdbprogress.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-ins.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/widgets/gimphelp.c * app/widgets/gimppdbdialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't g_new/g_free Argument arrays, always use procedural_db_foo() functions. Use GValue functions to get/set Arguments. * tools/pdbgen/pdb.pl: added get_value_func and set_value_func to all PDB types. Removed id_func, id_ret_func and check_func. Added flags which indicated that a type is an ID. Removed unused utility functions. * tools/pdbgen/lib.pl: use the flag instead of looking at functions and value types. * tools/pdbgen/app.pl: use the get_value_func and set_value_func to marshal inargs and outargs. Removed all checks performed on inargs because that's done by GParamSpec validation now. Added the missing bits to register excluded values with GimpParamSpecEnum. * app/pdb/*_cmds.c: regenerated.
2006-03-30 07:56:07 +08:00
gboolean success = TRUE;
GimpRGB foreground;
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
gimp_value_get_rgb (gimp_value_array_index (args, 0), &foreground);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
replace the value union by a GValue. 2006-03-30 Michael Natterer <mitch@gimp.org> * app/pdb/procedural_db.[ch] (struct Argument): replace the value union by a GValue. (procedural_db_argument_init) (procedural_db_compat_arg_init): new functions to initialize an Argument. They call g_value_init() on the Argument's value. (procedural_db_arguments) (procedural_db_return_values): initialize the returned Argument arrays so their GValues are ready to use. Allow to get the (unsuccessful) return values of a NULL ProcRecord. (procedural_db_destroy_args): g_value_unset() the values. Added a "gboolean full_destroy" parameter. Its only effect is to destroy PDB arrays, everything else is nicely memory managed by GValue. (procedural_db_execute) (procedural_db_run_proc): do GValue stuff. Added n_args and n_return_vals parameters to execute(). (procedural_db_execute_proc): private function to execute a procedure. Validates the passed in arguments using the registered GParamSpecs before passing them to the resp. exec method. * app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs an array of ProcArgs now in order to initialize the Arguments' GValues correctly. Passing NULL ProcArgs uses procedural_db_compat_arg_init(), so procedures (plug-ins) returning more values than expected work. (plug_in_args_to_params): do GValue stuff here too. (plug_in_args_destroy): removed this function, procedural_db_destroy_args() does the same now. * app/plug-in/plug-in-message.c (plug_in_handle_proc_run): simplified quite a bit because everything returns n_return_values now. Call plug_in_params_to_args() only of the procedure was found. (plug_in_handle_proc_return_priv): pass ProcRecs to plug_in_params_to_args(). * app/batch.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * app/core/gimppdbprogress.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-ins.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/widgets/gimphelp.c * app/widgets/gimppdbdialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't g_new/g_free Argument arrays, always use procedural_db_foo() functions. Use GValue functions to get/set Arguments. * tools/pdbgen/pdb.pl: added get_value_func and set_value_func to all PDB types. Removed id_func, id_ret_func and check_func. Added flags which indicated that a type is an ID. Removed unused utility functions. * tools/pdbgen/lib.pl: use the flag instead of looking at functions and value types. * tools/pdbgen/app.pl: use the get_value_func and set_value_func to marshal inargs and outargs. Removed all checks performed on inargs because that's done by GParamSpec validation now. Added the missing bits to register excluded values with GimpParamSpecEnum. * app/pdb/*_cmds.c: regenerated.
2006-03-30 07:56:07 +08:00
if (success)
{
gimp_rgb_set_alpha (&foreground, 1.0);
gimp_context_set_foreground (context, &foreground);
}
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_get_background_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
GimpValueArray *return_vals;
GimpRGB background = { 0.0, 0.0, 0.0, 1.0 };
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
gimp_context_get_background (context, &background);
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
gimp_rgb_set_alpha (&background, 1.0);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &background);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return return_vals;
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_set_background_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
replace the value union by a GValue. 2006-03-30 Michael Natterer <mitch@gimp.org> * app/pdb/procedural_db.[ch] (struct Argument): replace the value union by a GValue. (procedural_db_argument_init) (procedural_db_compat_arg_init): new functions to initialize an Argument. They call g_value_init() on the Argument's value. (procedural_db_arguments) (procedural_db_return_values): initialize the returned Argument arrays so their GValues are ready to use. Allow to get the (unsuccessful) return values of a NULL ProcRecord. (procedural_db_destroy_args): g_value_unset() the values. Added a "gboolean full_destroy" parameter. Its only effect is to destroy PDB arrays, everything else is nicely memory managed by GValue. (procedural_db_execute) (procedural_db_run_proc): do GValue stuff. Added n_args and n_return_vals parameters to execute(). (procedural_db_execute_proc): private function to execute a procedure. Validates the passed in arguments using the registered GParamSpecs before passing them to the resp. exec method. * app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs an array of ProcArgs now in order to initialize the Arguments' GValues correctly. Passing NULL ProcArgs uses procedural_db_compat_arg_init(), so procedures (plug-ins) returning more values than expected work. (plug_in_args_to_params): do GValue stuff here too. (plug_in_args_destroy): removed this function, procedural_db_destroy_args() does the same now. * app/plug-in/plug-in-message.c (plug_in_handle_proc_run): simplified quite a bit because everything returns n_return_values now. Call plug_in_params_to_args() only of the procedure was found. (plug_in_handle_proc_return_priv): pass ProcRecs to plug_in_params_to_args(). * app/batch.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * app/core/gimppdbprogress.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-ins.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/widgets/gimphelp.c * app/widgets/gimppdbdialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't g_new/g_free Argument arrays, always use procedural_db_foo() functions. Use GValue functions to get/set Arguments. * tools/pdbgen/pdb.pl: added get_value_func and set_value_func to all PDB types. Removed id_func, id_ret_func and check_func. Added flags which indicated that a type is an ID. Removed unused utility functions. * tools/pdbgen/lib.pl: use the flag instead of looking at functions and value types. * tools/pdbgen/app.pl: use the get_value_func and set_value_func to marshal inargs and outargs. Removed all checks performed on inargs because that's done by GParamSpec validation now. Added the missing bits to register excluded values with GimpParamSpecEnum. * app/pdb/*_cmds.c: regenerated.
2006-03-30 07:56:07 +08:00
gboolean success = TRUE;
GimpRGB background;
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
gimp_value_get_rgb (gimp_value_array_index (args, 0), &background);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
replace the value union by a GValue. 2006-03-30 Michael Natterer <mitch@gimp.org> * app/pdb/procedural_db.[ch] (struct Argument): replace the value union by a GValue. (procedural_db_argument_init) (procedural_db_compat_arg_init): new functions to initialize an Argument. They call g_value_init() on the Argument's value. (procedural_db_arguments) (procedural_db_return_values): initialize the returned Argument arrays so their GValues are ready to use. Allow to get the (unsuccessful) return values of a NULL ProcRecord. (procedural_db_destroy_args): g_value_unset() the values. Added a "gboolean full_destroy" parameter. Its only effect is to destroy PDB arrays, everything else is nicely memory managed by GValue. (procedural_db_execute) (procedural_db_run_proc): do GValue stuff. Added n_args and n_return_vals parameters to execute(). (procedural_db_execute_proc): private function to execute a procedure. Validates the passed in arguments using the registered GParamSpecs before passing them to the resp. exec method. * app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs an array of ProcArgs now in order to initialize the Arguments' GValues correctly. Passing NULL ProcArgs uses procedural_db_compat_arg_init(), so procedures (plug-ins) returning more values than expected work. (plug_in_args_to_params): do GValue stuff here too. (plug_in_args_destroy): removed this function, procedural_db_destroy_args() does the same now. * app/plug-in/plug-in-message.c (plug_in_handle_proc_run): simplified quite a bit because everything returns n_return_values now. Call plug_in_params_to_args() only of the procedure was found. (plug_in_handle_proc_return_priv): pass ProcRecs to plug_in_params_to_args(). * app/batch.c * app/actions/plug-in-commands.c * app/actions/vectors-commands.c * app/core/gimppdbprogress.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-ins.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-run.[ch] * app/widgets/gimphelp.c * app/widgets/gimppdbdialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't g_new/g_free Argument arrays, always use procedural_db_foo() functions. Use GValue functions to get/set Arguments. * tools/pdbgen/pdb.pl: added get_value_func and set_value_func to all PDB types. Removed id_func, id_ret_func and check_func. Added flags which indicated that a type is an ID. Removed unused utility functions. * tools/pdbgen/lib.pl: use the flag instead of looking at functions and value types. * tools/pdbgen/app.pl: use the get_value_func and set_value_func to marshal inargs and outargs. Removed all checks performed on inargs because that's done by GParamSpec validation now. Added the missing bits to register excluded values with GimpParamSpecEnum. * app/pdb/*_cmds.c: regenerated.
2006-03-30 07:56:07 +08:00
if (success)
{
gimp_rgb_set_alpha (&background, 1.0);
gimp_context_set_background (context, &background);
}
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_set_default_colors_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
gimp_context_set_default_colors (context);
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_swap_colors_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
{
gimp_context_swap_colors (context);
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
tools/pdbgen/Makefile.am tools/pdbgen/groups.pl removed the "Palette" pdb 2004-09-22 Michael Natterer <mitch@gimp.org> * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/palette.pdb: removed the "Palette" pdb group... * tools/pdbgen/pdb/context.pdb: and added its functions to the "Context" namespace instead. * app/pdb/Makefile.am * app/pdb/palette_cmds.c: removed. * app/pdb/procedural_db.c: added them to the pdb_compat hash table. * libgimp/Makefile.am * libgimp/gimppalette_pdb.[ch]: removed. * libgimp/gimppalette.[ch]: new files holding compat functions which call gimp_context_*() functions. * libgimp/gimp.h * libgimp/gimpui.c: changed accordingly. * app/pdb/context_cmds.c * app/pdb/internal_procs.c * libgimp/gimp_pdb.h * libgimp/gimpcontext_pdb.[ch]: regenerated. * plug-ins/MapObject/mapobject_image.c * plug-ins/MapObject/mapobject_preview.c * plug-ins/common/apply_lens.c * plug-ins/common/blinds.c * plug-ins/common/borderaverage.c * plug-ins/common/checkerboard.c * plug-ins/common/colortoalpha.c * plug-ins/common/cubism.c * plug-ins/common/exchange.c * plug-ins/common/film.c * plug-ins/common/gif.c * plug-ins/common/grid.c * plug-ins/common/mapcolor.c * plug-ins/common/mblur.c * plug-ins/common/mng.c * plug-ins/common/mosaic.c * plug-ins/common/papertile.c * plug-ins/common/png.c * plug-ins/common/polar.c * plug-ins/common/semiflatten.c * plug-ins/common/sinus.c * plug-ins/common/sparkle.c * plug-ins/common/vpropagate.c * plug-ins/common/warp.c * plug-ins/common/whirlpinch.c * plug-ins/gfig/gfig-style.c * plug-ins/gfli/gfli.c * plug-ins/ifscompose/ifscompose.c * plug-ins/maze/handy.c * plug-ins/pagecurl/pagecurl.c * plug-ins/pygimp/gimpmodule.c * plug-ins/script-fu/scripts/*.scm: changed accordingly.
2004-09-23 02:43:09 +08:00
}
static GimpValueArray *
context_get_opacity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble opacity = 0.0;
opacity = gimp_context_get_opacity (context) * 100.0;
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), opacity);
return return_vals;
}
static GimpValueArray *
context_set_opacity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble opacity;
opacity = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
gimp_context_set_opacity (context, opacity / 100.0);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_paint_mode_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint paint_mode = 0;
paint_mode = gimp_context_get_paint_mode (context);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), paint_mode);
return return_vals;
}
static GimpValueArray *
context_set_paint_mode_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint paint_mode;
paint_mode = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
if (paint_mode == GIMP_LAYER_MODE_OVERLAY_LEGACY)
paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_LEGACY;
gimp_context_set_paint_mode (context, paint_mode);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_width_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble line_width = 0.0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"width", &line_width,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), line_width);
return return_vals;
}
static GimpValueArray *
context_set_line_width_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble line_width;
line_width = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"width", line_width,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_width_unit_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
GimpUnit line_width_unit = GIMP_UNIT_PIXEL;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"unit", &line_width_unit,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), line_width_unit);
return return_vals;
}
static GimpValueArray *
context_set_line_width_unit_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpUnit line_width_unit;
line_width_unit = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"unit", line_width_unit,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_cap_style_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint cap_style = 0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"cap-style", &cap_style,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), cap_style);
return return_vals;
}
static GimpValueArray *
context_set_line_cap_style_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint cap_style;
cap_style = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"cap-style", cap_style,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_join_style_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint join_style = 0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"join-style", &join_style,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), join_style);
return return_vals;
}
static GimpValueArray *
context_set_line_join_style_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint join_style;
join_style = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"join-style", join_style,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_miter_limit_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble miter_limit = 0.0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"miter-limit", &miter_limit,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), miter_limit);
return return_vals;
}
static GimpValueArray *
context_set_line_miter_limit_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble miter_limit;
miter_limit = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"miter-limit", miter_limit,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_dash_offset_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble dash_offset = 0.0;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_get (options,
"dash-offset", &dash_offset,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), dash_offset);
return return_vals;
}
static GimpValueArray *
context_set_line_dash_offset_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble dash_offset;
dash_offset = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
g_object_set (options,
"dash-offset", dash_offset,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_line_dash_pattern_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint num_dashes = 0;
gdouble *dashes = NULL;
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
GArray *pattern = gimp_stroke_options_get_dash_info (options);
dashes = gimp_dash_pattern_to_double_array (pattern, &num_dashes);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), num_dashes);
gimp_value_take_float_array (gimp_value_array_index (return_vals, 2), dashes, num_dashes);
return return_vals;
}
static GimpValueArray *
context_set_line_dash_pattern_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint num_dashes;
const gdouble *dashes;
num_dashes = g_value_get_int (gimp_value_array_index (args, 0));
dashes = gimp_value_get_float_array (gimp_value_array_index (args, 1));
if (success)
{
GimpStrokeOptions *options =
gimp_pdb_context_get_stroke_options (GIMP_PDB_CONTEXT (context));
GArray *pattern = NULL;
if (num_dashes > 0)
{
pattern = gimp_dash_pattern_from_double_array (num_dashes, dashes);
if (! pattern)
success = FALSE;
}
if (success)
gimp_stroke_options_take_dash_pattern (options, GIMP_DASH_CUSTOM, pattern);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
GimpBrush *brush = gimp_context_get_brush (context);
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
if (brush)
name = g_strdup (gimp_object_get_name (brush));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpBrush *brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
if (brush)
gimp_context_set_brush (context, brush);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble size = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-size", &size,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), size);
return return_vals;
}
static GimpValueArray *
context_set_brush_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble size;
size = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-size", (gdouble) size,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_set_brush_default_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpBrush *brush = gimp_context_get_brush (context);
if (brush)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
gimp_paint_options_set_default_brush_size (list->data, brush);
g_list_free (options);
}
else
{
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_aspect_ratio_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble aspect = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-aspect-ratio", &aspect,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), aspect);
return return_vals;
}
static GimpValueArray *
context_set_brush_aspect_ratio_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble aspect;
aspect = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-aspect-ratio", (gdouble) aspect,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble angle = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-angle", &angle,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
return return_vals;
}
static GimpValueArray *
context_set_brush_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble angle;
angle = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-angle", (gdouble) angle,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble spacing = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-spacing", &spacing,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), spacing);
return return_vals;
}
static GimpValueArray *
context_set_brush_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble spacing;
spacing = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-spacing", (gdouble) spacing,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_set_brush_default_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpBrush *brush = gimp_context_get_brush (context);
if (brush)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
gimp_paint_options_set_default_brush_spacing (list->data, brush);
g_list_free (options);
}
else
{
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_hardness_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble hardness = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-hardness", &hardness,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), hardness);
return return_vals;
}
static GimpValueArray *
context_set_brush_hardness_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble hardness;
hardness = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-hardness", (gdouble) hardness,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_set_brush_default_hardness_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpBrush *brush = gimp_context_get_brush (context);
if (brush)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
gimp_paint_options_set_default_brush_hardness (list->data, brush);
g_list_free (options);
}
else
{
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_brush_force_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble force = 0.0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-force", &force,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), force);
return return_vals;
}
static GimpValueArray *
context_set_brush_force_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble force;
force = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GList *options;
GList *list;
options = gimp_pdb_context_get_brush_options (GIMP_PDB_CONTEXT (context));
for (list = options; list; list = g_list_next (list))
g_object_set (list->data,
"brush-force", (gdouble) force,
NULL);
g_list_free (options);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_dynamics_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gchar *name = NULL;
GimpDynamics *dynamics = gimp_context_get_dynamics (context);
if (dynamics)
name = g_strdup (gimp_object_get_name (dynamics));
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_dynamics_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpDynamics *dynamics = gimp_pdb_get_dynamics (gimp, name, GIMP_PDB_DATA_ACCESS_READ, error);
if (dynamics)
gimp_context_set_dynamics (context, dynamics);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_are_dynamics_enabled_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gboolean enabled = FALSE;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
enabled = gimp_paint_options_are_dynamics_enabled (options);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_boolean (gimp_value_array_index (return_vals, 1), enabled);
return return_vals;
}
static GimpValueArray *
context_enable_dynamics_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean enable;
enable = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
gimp_paint_options_enable_dynamics (options, enable);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_mypaint_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gchar *name = NULL;
GimpMybrush *brush = gimp_context_get_mybrush (context);
if (brush)
name = g_strdup (gimp_object_get_name (brush));
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_mypaint_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpMybrush *brush = gimp_pdb_get_mybrush (gimp, name, GIMP_PDB_DATA_ACCESS_READ, error);
if (brush)
gimp_context_set_mybrush (context, brush);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_pattern_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
GimpPattern *pattern = gimp_context_get_pattern (context);
if (pattern)
name = g_strdup (gimp_object_get_name (pattern));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_pattern_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpPattern *pattern = gimp_pdb_get_pattern (gimp, name, error);
if (pattern)
gimp_context_set_pattern (context, pattern);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_gradient_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
GimpGradient *gradient = gimp_context_get_gradient (context);
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
if (gradient)
name = g_strdup (gimp_object_get_name (gradient));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_gradient_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpGradient *gradient = gimp_pdb_get_gradient (gimp, name, FALSE, error);
if (gradient)
gimp_context_set_gradient (context, gradient);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_set_gradient_fg_bg_rgb_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gimp_context_set_gradient (context,
gimp_gradients_get_fg_bg_rgb (gimp));
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
static GimpValueArray *
context_set_gradient_fg_bg_hsv_cw_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gimp_context_set_gradient (context,
gimp_gradients_get_fg_bg_hsv_cw (gimp));
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
static GimpValueArray *
context_set_gradient_fg_bg_hsv_ccw_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gimp_context_set_gradient (context,
gimp_gradients_get_fg_bg_hsv_ccw (gimp));
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
static GimpValueArray *
context_set_gradient_fg_transparent_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gimp_context_set_gradient (context,
gimp_gradients_get_fg_transparent (gimp));
return gimp_procedure_get_return_values (procedure, TRUE, NULL);
}
static GimpValueArray *
context_get_gradient_blend_color_space_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gint blend_color_space = 0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"gradient-blend-color-space", &blend_color_space,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_enum (gimp_value_array_index (return_vals, 1), blend_color_space);
return return_vals;
}
static GimpValueArray *
context_set_gradient_blend_color_space_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint blend_color_space;
blend_color_space = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpContainer *options;
GList *list;
options = gimp_pdb_context_get_paint_options_list (GIMP_PDB_CONTEXT (context));
for (list = GIMP_LIST (options)->queue->head; list; list = g_list_next (list))
g_object_set (list->data,
"gradient-blend-color-space", blend_color_space,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_gradient_repeat_mode_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gint repeat_mode = 0;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"gradient-repeat", &repeat_mode,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_enum (gimp_value_array_index (return_vals, 1), repeat_mode);
return return_vals;
}
static GimpValueArray *
context_set_gradient_repeat_mode_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint repeat_mode;
repeat_mode = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpContainer *options;
GList *list;
options = gimp_pdb_context_get_paint_options_list (GIMP_PDB_CONTEXT (context));
for (list = GIMP_LIST (options)->queue->head; list; list = g_list_next (list))
g_object_set (list->data,
"gradient-repeat", repeat_mode,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_gradient_reverse_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gboolean reverse = FALSE;
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"gradient-reverse", &reverse,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_boolean (gimp_value_array_index (return_vals, 1), reverse);
return return_vals;
}
static GimpValueArray *
context_set_gradient_reverse_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean reverse;
reverse = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
GimpContainer *options;
GList *list;
options = gimp_pdb_context_get_paint_options_list (GIMP_PDB_CONTEXT (context));
for (list = GIMP_LIST (options)->queue->head; list; list = g_list_next (list))
g_object_set (list->data,
"gradient-reverse", reverse,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_palette_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
GimpPalette *palette = gimp_context_get_palette (context);
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
if (palette)
name = g_strdup (gimp_object_get_name (palette));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_palette_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpPalette *palette = gimp_pdb_get_palette (gimp, name, FALSE, error);
if (palette)
gimp_context_set_palette (context, palette);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_font_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
gchar *name = NULL;
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
GimpFont *font = gimp_context_get_font (context);
if (font)
name = g_strdup (gimp_object_get_name (font));
tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/brushes.pdb 2006-03-15 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/brush.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/drawable_transform.pdb * tools/pdbgen/pdb/gradient.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/transform_tools.pdb: let pdbgen handle *only* variables for arguments and return values and declare all local variables inside the C code. Removed lots of alias => '<expression>' and no_declare => 1 stuff from return values, instead let pdbgen declare the variables and assign them manually in the C code. More cleanup. * tools/pdbgen/app.pl: removed support for proc->vars. * app/pdb/brush_cmds.c * app/pdb/brushes_cmds.c * app/pdb/context_cmds.c * app/pdb/drawable_cmds.c * app/pdb/drawable_transform_cmds.c * app/pdb/gradient_cmds.c * app/pdb/gradients_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/paths_cmds.c * app/pdb/pattern_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/transform_tools_cmds.c * libgimp/gimpbrush_pdb.c * libgimp/gimpbrushes_pdb.c * libgimp/gimpgradient_pdb.c * libgimp/gimpgradients_pdb.c * libgimp/gimppalette_pdb.c * libgimp/gimppalettes_pdb.c * libgimp/gimppatterns_pdb.c: regenerated.
2006-03-15 20:49:25 +08:00
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_take_string (gimp_value_array_index (return_vals, 1), name);
return return_vals;
}
static GimpValueArray *
context_set_font_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
const gchar *name;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpFont *font = gimp_pdb_get_font (gimp, name, error);
if (font)
gimp_context_set_font (context, font);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_antialias_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gboolean antialias = FALSE;
g_object_get (context,
"antialias", &antialias,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_boolean (gimp_value_array_index (return_vals, 1), antialias);
return return_vals;
}
static GimpValueArray *
context_set_antialias_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean antialias;
antialias = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"antialias", antialias,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_feather_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gboolean feather = FALSE;
g_object_get (context,
"feather", &feather,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_boolean (gimp_value_array_index (return_vals, 1), feather);
return return_vals;
}
static GimpValueArray *
context_set_feather_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean feather;
feather = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"feather", feather,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_feather_radius_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble feather_radius_x = 0.0;
gdouble feather_radius_y = 0.0;
g_object_get (context,
"feather-radius-x", &feather_radius_x,
"feather-radius-y", &feather_radius_y,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), feather_radius_x);
g_value_set_double (gimp_value_array_index (return_vals, 2), feather_radius_y);
return return_vals;
}
static GimpValueArray *
context_set_feather_radius_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble feather_radius_x;
gdouble feather_radius_y;
feather_radius_x = g_value_get_double (gimp_value_array_index (args, 0));
feather_radius_y = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
{
g_object_set (context,
"feather-radius-x", feather_radius_x,
"feather-radius-y", feather_radius_y,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_sample_merged_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gboolean sample_merged = FALSE;
g_object_get (context,
"sample-merged", &sample_merged,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_boolean (gimp_value_array_index (return_vals, 1), sample_merged);
return return_vals;
}
static GimpValueArray *
context_set_sample_merged_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean sample_merged;
sample_merged = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"sample-merged", sample_merged,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_sample_criterion_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint sample_criterion = 0;
g_object_get (context,
"sample-criterion", &sample_criterion,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), sample_criterion);
return return_vals;
}
static GimpValueArray *
context_set_sample_criterion_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint sample_criterion;
sample_criterion = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"sample-criterion", sample_criterion,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_sample_threshold_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gdouble sample_threshold = 0.0;
g_object_get (context,
"sample-threshold", &sample_threshold,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_double (gimp_value_array_index (return_vals, 1), sample_threshold);
return return_vals;
}
static GimpValueArray *
context_set_sample_threshold_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble sample_threshold;
sample_threshold = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"sample-threshold", sample_threshold,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_sample_threshold_int_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint sample_threshold = 0;
gdouble threshold;
g_object_get (context,
"sample-threshold", &threshold,
NULL);
sample_threshold = (gint) (threshold * 255.99);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), sample_threshold);
return return_vals;
}
static GimpValueArray *
context_set_sample_threshold_int_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint sample_threshold;
sample_threshold = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"sample-threshold", (gdouble) sample_threshold / 255.0,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_sample_transparent_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gboolean sample_transparent = FALSE;
g_object_get (context,
"sample-transparent", &sample_transparent,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_boolean (gimp_value_array_index (return_vals, 1), sample_transparent);
return return_vals;
}
static GimpValueArray *
context_set_sample_transparent_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean sample_transparent;
sample_transparent = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"sample-transparent", sample_transparent,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_diagonal_neighbors_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gboolean diagonal_neighbors = FALSE;
g_object_get (context,
"diagonal-neighbors", &diagonal_neighbors,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_boolean (gimp_value_array_index (return_vals, 1), diagonal_neighbors);
return return_vals;
}
static GimpValueArray *
context_set_diagonal_neighbors_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gboolean diagonal_neighbors;
diagonal_neighbors = g_value_get_boolean (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"diagonal-neighbors", diagonal_neighbors,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_distance_metric_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint metric = 0;
g_object_get (context,
"distance-metric", &metric,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), metric);
return return_vals;
}
static GimpValueArray *
context_set_distance_metric_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint metric;
metric = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"distance-metric", metric,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_interpolation_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint interpolation = 0;
g_object_get (context,
"interpolation", &interpolation,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), interpolation);
return return_vals;
}
static GimpValueArray *
context_set_interpolation_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint interpolation;
interpolation = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"interpolation", interpolation,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_transform_direction_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint transform_direction = 0;
g_object_get (context,
"transform-direction", &transform_direction,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), transform_direction);
return return_vals;
}
static GimpValueArray *
context_set_transform_direction_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint transform_direction;
transform_direction = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"transform-direction", transform_direction,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_transform_resize_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint transform_resize = 0;
g_object_get (context,
"transform-resize", &transform_resize,
NULL);
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_enum (gimp_value_array_index (return_vals, 1), transform_resize);
return return_vals;
}
static GimpValueArray *
context_set_transform_resize_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint transform_resize;
transform_resize = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
g_object_set (context,
"transform-resize", transform_resize,
NULL);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble size = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"size", &size,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), size);
return return_vals;
}
static GimpValueArray *
context_set_ink_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble size;
size = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"size", size,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble angle = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"tilt-angle", &angle,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
return return_vals;
}
static GimpValueArray *
context_set_ink_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble angle;
angle = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"tilt-angle", angle,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_size_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble size = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"size-sensitivity", &size,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), size);
return return_vals;
}
static GimpValueArray *
context_set_ink_size_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble size;
size = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"size-sensitivity", size,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_tilt_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble tilt = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"tilt-sensitivity", &tilt,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), tilt);
return return_vals;
}
static GimpValueArray *
context_set_ink_tilt_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble tilt;
tilt = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"tilt-sensitivity", tilt,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_speed_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble speed = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"vel-sensitivity", &speed,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), speed);
return return_vals;
}
static GimpValueArray *
context_set_ink_speed_sensitivity_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble speed;
speed = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"vel-sensitivity", speed,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_blob_type_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gint type = 0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"blob-type", &type,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_enum (gimp_value_array_index (return_vals, 1), type);
return return_vals;
}
static GimpValueArray *
context_set_ink_blob_type_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint type;
type = g_value_get_enum (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"blob-type", type,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_blob_aspect_ratio_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble aspect = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_get (options,
"blob-aspect", &aspect,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), aspect);
return return_vals;
}
static GimpValueArray *
context_set_ink_blob_aspect_ratio_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble aspect;
aspect = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"blob-aspect", aspect,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_blob_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gdouble angle = 0.0;
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
{
g_object_get (options,
"blob-angle", &angle,
NULL);
angle *= (180-0 / G_PI);
}
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
return return_vals;
}
static GimpValueArray *
context_set_ink_blob_angle_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gdouble angle;
angle = g_value_get_double (gimp_value_array_index (args, 0));
if (success)
{
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-ink");
if (options)
g_object_set (options,
"blob-angle", (gdouble) angle * G_PI / 180.0,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
void
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
register_context_procs (GimpPDB *pdb)
{
GimpProcedure *procedure;
/*
* gimp-context-push
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_push_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-push");
gimp_procedure_set_static_help (procedure,
"Pushes a context to the top of the plug-in's context stack.",
"This procedure creates a new context by copying the current context. This copy becomes the new current context for the calling plug-in until it is popped again using 'gimp-context-pop'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-pop
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_pop_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-pop");
gimp_procedure_set_static_help (procedure,
"Pops the topmost context from the plug-in's context stack.",
"This procedure removes the topmost context from the plug-in's context stack. The context that was active before the corresponding call to 'gimp-context-push' becomes the new current context of the plug-in.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-defaults
*/
procedure = gimp_procedure_new (context_set_defaults_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-defaults");
gimp_procedure_set_static_help (procedure,
"Reset context settings to their default values.",
"This procedure resets context settings used by various procedures to their default value. This procedure will usually be called after a context push so that a script which calls procedures affected by context settings will not be affected by changes in the global context.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Kevin Cozens <kcozens@svn.gnome.org>",
"Kevin Cozens",
"2011");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-list-paint-methods
*/
procedure = gimp_procedure_new (context_list_paint_methods_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-list-paint-methods");
gimp_procedure_set_static_help (procedure,
"Lists the available paint methods.",
"This procedure lists the names of the available paint methods. Any of the results can be used for 'gimp-context-set-paint-method'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Simon Budig",
"Simon Budig",
"2007");
gimp_procedure_add_return_value (procedure,
g_param_spec_boxed ("paint-methods",
"paint methods",
"The names of the available paint methods",
G_TYPE_STRV,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-paint-method
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_paint_method_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-paint-method");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active paint method.",
"This procedure returns the name of the currently active paint method.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2005");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active paint method",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-paint-method
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_paint_method_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-paint-method");
gimp_procedure_set_static_help (procedure,
"Set the specified paint method as the active paint method.",
"This procedure allows the active paint method to be set by specifying its name. The name is simply a string which corresponds to one of the names of the available paint methods. If there is no matching method found, this procedure will return an error. Otherwise, the specified method becomes active and will be used in all subsequent paint operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2005");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the paint method",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-stroke-method
*/
procedure = gimp_procedure_new (context_get_stroke_method_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-stroke-method");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active stroke method.",
"This procedure returns the currently active stroke method.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("stroke-method",
"stroke method",
"The active stroke method",
GIMP_TYPE_STROKE_METHOD,
GIMP_STROKE_LINE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-stroke-method
*/
procedure = gimp_procedure_new (context_set_stroke_method_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-stroke-method");
gimp_procedure_set_static_help (procedure,
"Set the specified stroke method as the active stroke method.",
"This procedure set the specified stroke method as the active stroke method. The new method will be used in all subsequent stroke operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("stroke-method",
"stroke method",
"The new stroke method",
GIMP_TYPE_STROKE_METHOD,
GIMP_STROKE_LINE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-foreground
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_foreground_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-foreground");
gimp_procedure_set_static_help (procedure,
"Get the current GIMP foreground color.",
"This procedure returns the current GIMP foreground color. The foreground color is used in a variety of tools such as paint tools, blending, and bucket fill.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("foreground",
"foreground",
"The foreground color",
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-foreground
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_foreground_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-foreground");
gimp_procedure_set_static_help (procedure,
"Set the current GIMP foreground color.",
"This procedure sets the current GIMP foreground color. After this is set, operations which use foreground such as paint tools, blending, and bucket fill will use the new value.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("foreground",
"foreground",
"The foreground color",
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-background
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_background_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-background");
gimp_procedure_set_static_help (procedure,
"Get the current GIMP background color.",
"This procedure returns the current GIMP background color. The background color is used in a variety of tools such as blending, erasing (with non-alpha images), and image filling.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("background",
"background",
"The background color",
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-background
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_background_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-background");
gimp_procedure_set_static_help (procedure,
"Set the current GIMP background color.",
"This procedure sets the current GIMP background color. After this is set, operations which use background such as blending, filling images, clearing, and erasing (in non-alpha images) will use the new value.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("background",
"background",
"The background color",
added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct 2006-04-27 Sven Neumann <sven@gimp.org> * libgimpcolor/gimprgb.[ch]: added "has_alpha" to GimpParamSpecRGB. Made the GimpParamSpecRGB struct public. When validating a color, only look at the alpha channel if has_alpha is set. * libgimpconfig/gimpconfig-params.h: added "has_alpha" to GIMP_CONFIG_INSTALL_PROP_RGB macro definition. * libgimpconfig/gimpconfig-serialize.c: serialize color values as "(rgb r g b)" if the param-spec indicates that the alpha channel is meaningless. * app/config/gimpconfig-dump.c: take "has_alpha" into account when documenting color properties. * app/core/gimpcontext.c * app/core/gimpgrid.c * app/display/gimpdisplayoptions.c * app/text/gimptext.c * app/widgets/gimpaction.c * app/widgets/gimpcolorbar.c * libgimpwidgets/gimpcolorarea.c * libgimpwidgets/gimpcolorbutton.c: specify whether color properties have an alpha channel. * tools/pdbgen/app.pl: handle "has_alpha" for color paramaters. * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/context.pdb * tools/pdbgen/pdb/grid.pdb * tools/pdbgen/pdb/image.pdb: set the "has_alpha" flag where appropriate. * app/pdb/gimp-pdb-compat.c (gimp_pdb_compat_param_spec): set "has_alpha" to TRUE for GIMP_PDB_COLOR. * app/pdb/channel_cmds.c * app/pdb/context_cmds.c * app/pdb/gradient_cmds.c * app/pdb/grid_cmds.c * app/pdb/image_cmds.c * app/pdb/palette_cmds.c * app/pdb/palettes_cmds.c * app/pdb/selection_tools_cmds.c: regenerated. * app/config/gimpdisplayconfig.c (gimp_display_config_class_init): removed unused code.
2006-04-27 23:19:59 +08:00
FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-default-colors
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_default_colors_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-default-colors");
gimp_procedure_set_static_help (procedure,
"Set the current GIMP foreground and background colors to black and white.",
"This procedure sets the current GIMP foreground and background colors to their initial default values, black and white.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-swap-colors
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_swap_colors_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-swap-colors");
gimp_procedure_set_static_help (procedure,
"Swap the current GIMP foreground and background colors.",
"This procedure swaps the current GIMP foreground and background colors, so that the new foreground color becomes the old background color and vice versa.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-opacity
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_opacity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-opacity");
gimp_procedure_set_static_help (procedure,
"Get the opacity.",
"This procedure returns the opacity setting. The return value is a floating point number between 0 and 100.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
"The opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-opacity
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_opacity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-opacity");
gimp_procedure_set_static_help (procedure,
"Set the opacity.",
"This procedure modifies the opacity setting. The value should be a floating point number between 0 and 100.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
"opacity",
"The opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-paint-mode
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_paint_mode_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-paint-mode");
gimp_procedure_set_static_help (procedure,
"Get the paint mode.",
"This procedure returns the paint-mode setting. The return value is an integer which corresponds to the values listed in the argument description.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-paint-mode
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_paint_mode_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-paint-mode");
gimp_procedure_set_static_help (procedure,
"Set the paint mode.",
"This procedure modifies the paint_mode setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-width
*/
procedure = gimp_procedure_new (context_get_line_width_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-width");
gimp_procedure_set_static_help (procedure,
"Get the line width setting.",
"This procedure returns the line width setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("line-width",
"line width",
"The line width setting",
0.0, 2000.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-width
*/
procedure = gimp_procedure_new (context_set_line_width_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-width");
gimp_procedure_set_static_help (procedure,
"Set the line width setting.",
"This procedure modifies the line width setting for stroking lines.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("line-width",
"line width",
"The line width setting",
0.0, 2000.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-width-unit
*/
procedure = gimp_procedure_new (context_get_line_width_unit_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-width-unit");
gimp_procedure_set_static_help (procedure,
"Get the line width unit setting.",
"This procedure returns the line width unit setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_unit ("line-width-unit",
"line width unit",
"The line width unit setting",
TRUE,
FALSE,
GIMP_UNIT_PIXEL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-width-unit
*/
procedure = gimp_procedure_new (context_set_line_width_unit_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-width-unit");
gimp_procedure_set_static_help (procedure,
"Set the line width unit setting.",
"This procedure modifies the line width unit setting for stroking lines.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
gimp_param_spec_unit ("line-width-unit",
"line width unit",
"The line width setting unit",
TRUE,
FALSE,
GIMP_UNIT_PIXEL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-cap-style
*/
procedure = gimp_procedure_new (context_get_line_cap_style_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-cap-style");
gimp_procedure_set_static_help (procedure,
"Get the line cap style setting.",
"This procedure returns the line cap style setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("cap-style",
"cap style",
"The line cap style setting",
GIMP_TYPE_CAP_STYLE,
GIMP_CAP_BUTT,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-cap-style
*/
procedure = gimp_procedure_new (context_set_line_cap_style_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-cap-style");
gimp_procedure_set_static_help (procedure,
"Set the line cap style setting.",
"This procedure modifies the line cap style setting for stroking lines.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("cap-style",
"cap style",
"The line cap style setting",
GIMP_TYPE_CAP_STYLE,
GIMP_CAP_BUTT,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-join-style
*/
procedure = gimp_procedure_new (context_get_line_join_style_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-join-style");
gimp_procedure_set_static_help (procedure,
"Get the line join style setting.",
"This procedure returns the line join style setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("join-style",
"join style",
"The line join style setting",
GIMP_TYPE_JOIN_STYLE,
GIMP_JOIN_MITER,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-join-style
*/
procedure = gimp_procedure_new (context_set_line_join_style_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-join-style");
gimp_procedure_set_static_help (procedure,
"Set the line join style setting.",
"This procedure modifies the line join style setting for stroking lines.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("join-style",
"join style",
"The line join style setting",
GIMP_TYPE_JOIN_STYLE,
GIMP_JOIN_MITER,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-miter-limit
*/
procedure = gimp_procedure_new (context_get_line_miter_limit_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-miter-limit");
gimp_procedure_set_static_help (procedure,
"Get the line miter limit setting.",
"This procedure returns the line miter limit setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("miter-limit",
"miter limit",
"The line miter limit setting",
0.0, 100.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-miter-limit
*/
procedure = gimp_procedure_new (context_set_line_miter_limit_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-miter-limit");
gimp_procedure_set_static_help (procedure,
"Set the line miter limit setting.",
"This procedure modifies the line miter limit setting for stroking lines.\n"
"A mitered join is converted to a bevelled join if the miter would extend to a distance of more than (miter-limit * line-width) from the actual join point.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("miter-limit",
"miter limit",
"The line miter limit setting",
0.0, 100.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-dash-offset
*/
procedure = gimp_procedure_new (context_get_line_dash_offset_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-dash-offset");
gimp_procedure_set_static_help (procedure,
"Get the line dash offset setting.",
"This procedure returns the line dash offset setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("dash-offset",
"dash offset",
"The line dash offset setting",
0.0, 2000.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-dash-offset
*/
procedure = gimp_procedure_new (context_set_line_dash_offset_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-dash-offset");
gimp_procedure_set_static_help (procedure,
"Set the line dash offset setting.",
"This procedure modifies the line dash offset setting for stroking lines.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("dash-offset",
"dash offset",
"The line dash offset setting",
0.0, 100.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-line-dash-pattern
*/
procedure = gimp_procedure_new (context_get_line_dash_pattern_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-line-dash-pattern");
gimp_procedure_set_static_help (procedure,
"Get the line dash pattern setting.",
"This procedure returns the line dash pattern setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("num-dashes",
"num dashes",
"The number of dashes in the dash_pattern array",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_float_array ("dashes",
"dashes",
"The line dash pattern setting",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-line-dash-pattern
*/
procedure = gimp_procedure_new (context_set_line_dash_pattern_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-line-dash-pattern");
gimp_procedure_set_static_help (procedure,
"Set the line dash pattern setting.",
"This procedure modifies the line dash pattern setting for stroking lines.\n"
"\n"
"The unit of the dash pattern segments is the actual line width used for the stroke operation, in other words a segment length of 1.0 results in a square segment shape (or gap shape).\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-stroke-selection', 'gimp-drawable-edit-stroke-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2015");
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-dashes",
"num dashes",
"The number of dashes in the dash_pattern array",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_float_array ("dashes",
"dashes",
"The line dash pattern setting",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_brush_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active brush.",
"This procedure returns the name of the currently active brush. All paint operations and stroke operations use this brush to control the application of paint to the image.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active brush",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_brush_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush");
gimp_procedure_set_static_help (procedure,
"Set the specified brush as the active brush.",
"This procedure allows the active brush to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed brushes. If there is no matching brush found, this procedure will return an error. Otherwise, the specified brush becomes active and will be used in all subsequent paint operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the brush",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-size
*/
procedure = gimp_procedure_new (context_get_brush_size_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-size");
gimp_procedure_set_static_help (procedure,
"Get brush size in pixels.",
"Get the brush size in pixels for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("size",
"size",
"Brush size in pixels",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-size
*/
procedure = gimp_procedure_new (context_set_brush_size_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-size");
gimp_procedure_set_static_help (procedure,
"Set brush size in pixels.",
"Set the brush size in pixels for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("size",
"size",
"Brush size in pixels",
1, 10000, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-default-size
*/
procedure = gimp_procedure_new (context_set_brush_default_size_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-default-size");
gimp_procedure_set_static_help (procedure,
"Set brush size to its default.",
"Set the brush size to the default (max of width and height) for paintbrush, airbrush, or pencil tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-aspect-ratio
*/
procedure = gimp_procedure_new (context_get_brush_aspect_ratio_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-aspect-ratio");
gimp_procedure_set_static_help (procedure,
"Get brush aspect ratio.",
"Set the aspect ratio for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("aspect",
"aspect",
"Aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-aspect-ratio
*/
procedure = gimp_procedure_new (context_set_brush_aspect_ratio_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-aspect-ratio");
gimp_procedure_set_static_help (procedure,
"Set brush aspect ratio.",
"Set the aspect ratio for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("aspect",
"aspect",
"Aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-angle
*/
procedure = gimp_procedure_new (context_get_brush_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-angle");
gimp_procedure_set_static_help (procedure,
"Get brush angle in degrees.",
"Set the angle in degrees for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("angle",
"angle",
"Angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-angle
*/
procedure = gimp_procedure_new (context_set_brush_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-angle");
gimp_procedure_set_static_help (procedure,
"Set brush angle in degrees.",
"Set the angle in degrees for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
"Angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-spacing
*/
procedure = gimp_procedure_new (context_get_brush_spacing_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-spacing");
gimp_procedure_set_static_help (procedure,
"Get brush spacing as percent of size.",
"Get the brush spacing as percent of size for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("spacing",
"spacing",
"Brush spacing as fraction of size",
0.01, 50.0, 0.01,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-spacing
*/
procedure = gimp_procedure_new (context_set_brush_spacing_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-spacing");
gimp_procedure_set_static_help (procedure,
"Set brush spacing as percent of size.",
"Set the brush spacing as percent of size for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("spacing",
"spacing",
"Brush spacing as fraction of size",
0.01, 50.0, 0.01,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-default-spacing
*/
procedure = gimp_procedure_new (context_set_brush_default_spacing_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-default-spacing");
gimp_procedure_set_static_help (procedure,
"Set brush spacing to its default.",
"Set the brush spacing to the default for paintbrush, airbrush, or pencil tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-hardness
*/
procedure = gimp_procedure_new (context_get_brush_hardness_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-hardness");
gimp_procedure_set_static_help (procedure,
"Get brush hardness in paint options.",
"Get the brush hardness for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("hardness",
"hardness",
"Brush hardness",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-hardness
*/
procedure = gimp_procedure_new (context_set_brush_hardness_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-hardness");
gimp_procedure_set_static_help (procedure,
"Set brush hardness.",
"Set the brush hardness for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hardness",
"hardness",
"Brush hardness",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-default-hardness
*/
procedure = gimp_procedure_new (context_set_brush_default_hardness_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-default-hardness");
gimp_procedure_set_static_help (procedure,
"Set brush spacing to its default.",
"Set the brush spacing to the default for paintbrush, airbrush, or pencil tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-brush-force
*/
procedure = gimp_procedure_new (context_get_brush_force_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-brush-force");
gimp_procedure_set_static_help (procedure,
"Get brush force in paint options.",
"Get the brush application force for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("force",
"force",
"Brush application force",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-brush-force
*/
procedure = gimp_procedure_new (context_set_brush_force_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-brush-force");
gimp_procedure_set_static_help (procedure,
"Set brush application force.",
"Set the brush application force for brush based paint tools.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Alexia Death",
"Alexia Death",
"2014");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("force",
"force",
"Brush application force",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-dynamics
*/
procedure = gimp_procedure_new (context_get_dynamics_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-dynamics");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active paint dynamics.",
"This procedure returns the name of the currently active paint dynamics. If enabled, all paint operations and stroke operations use this paint dynamics to control the application of paint to the image. If disabled, the dynamics will be ignored during paint actions.\n"
"See 'gimp-context-are-dynamics-enabled' to enquire whether dynamics are used or ignored.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active paint dynamics",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-dynamics
*/
procedure = gimp_procedure_new (context_set_dynamics_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-dynamics");
gimp_procedure_set_static_help (procedure,
"Set the specified paint dynamics as the active paint dynamics.",
"This procedure allows the active paint dynamics to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed paint dynamics. If there is no matching paint dynamics found, this procedure will return an error. Otherwise, the specified paint dynamics becomes active and will be used in all subsequent paint operations as long as dynamics are enabled.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the paint dynamics",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-are-dynamics-enabled
*/
procedure = gimp_procedure_new (context_are_dynamics_enabled_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-are-dynamics-enabled");
gimp_procedure_set_static_help (procedure,
"Inform whether the currently active paint dynamics will be applied to painting.",
"This procedure returns whether the currently active paint dynamics (as returned by 'gimp-context-get-dynamics') is enabled.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2022");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("enabled",
"enabled",
"Whether dynamics enabled or disabled",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-enable-dynamics
*/
procedure = gimp_procedure_new (context_enable_dynamics_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-enable-dynamics");
gimp_procedure_set_static_help (procedure,
"Set the specified paint dynamics as the active paint dynamics.",
"This procedure enables the active paint dynamics to be used in all subsequent paint operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2022");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("enable",
"enable",
"Whether to enable or disable dynamics",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-mypaint-brush
*/
procedure = gimp_procedure_new (context_get_mypaint_brush_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-mypaint-brush");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active MyPaint brush.",
"This procedure returns the name of the currently active MyPaint brush.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2016");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active MyPaint brush",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-mypaint-brush
*/
procedure = gimp_procedure_new (context_set_mypaint_brush_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-mypaint-brush");
gimp_procedure_set_static_help (procedure,
"Set the specified MyPaint brush as the active MyPaint brush.",
"This procedure allows the active MyPaint brush to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed MyPaint brushes. If there is no matching MyPaint brush found, this procedure will return an error. Otherwise, the specified MyPaint brush becomes active and will be used in all subsequent MyPaint paint operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2016");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the MyPaint brush",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-pattern
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_pattern_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-pattern");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active pattern.",
"This procedure returns name of the the currently active pattern. All clone and bucket-fill operations with patterns will use this pattern to control the application of paint to the image.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active pattern",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-pattern
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_pattern_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-pattern");
gimp_procedure_set_static_help (procedure,
"Set the specified pattern as the active pattern.",
"This procedure allows the active pattern to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed patterns. If there is no matching pattern found, this procedure will return an error. Otherwise, the specified pattern becomes active and will be used in all subsequent paint operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the pattern",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-gradient
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_gradient_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-gradient");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active gradient.",
"This procedure returns the name of the currently active gradient.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active gradient",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_gradient_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient");
gimp_procedure_set_static_help (procedure,
"Sets the specified gradient as the active gradient.",
"This procedure lets you set the specified gradient as the active or \"current\" one. The name is simply a string which corresponds to one of the loaded gradients. If no matching gradient is found, this procedure will return an error. Otherwise, the specified gradient will become active and will be used for subsequent custom gradient operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the gradient",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-fg-bg-rgb
*/
procedure = gimp_procedure_new (context_set_gradient_fg_bg_rgb_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-fg-bg-rgb");
gimp_procedure_set_static_help (procedure,
"Sets the built-in FG-BG RGB gradient as the active gradient.",
"This procedure sets the built-in FG-BG RGB gradient as the active gradient. The gradient will be used for subsequent gradient operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-fg-bg-hsv-cw
*/
procedure = gimp_procedure_new (context_set_gradient_fg_bg_hsv_cw_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-fg-bg-hsv-cw");
gimp_procedure_set_static_help (procedure,
"Sets the built-in FG-BG HSV (cw) gradient as the active gradient.",
"This procedure sets the built-in FG-BG HSV (cw) gradient as the active gradient. The gradient will be used for subsequent gradient operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-fg-bg-hsv-ccw
*/
procedure = gimp_procedure_new (context_set_gradient_fg_bg_hsv_ccw_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-fg-bg-hsv-ccw");
gimp_procedure_set_static_help (procedure,
"Sets the built-in FG-BG HSV (ccw) gradient as the active gradient.",
"This procedure sets the built-in FG-BG HSV (ccw) gradient as the active gradient. The gradient will be used for subsequent gradient operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-fg-transparent
*/
procedure = gimp_procedure_new (context_set_gradient_fg_transparent_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-fg-transparent");
gimp_procedure_set_static_help (procedure,
"Sets the built-in FG-Transparent gradient as the active gradient.",
"This procedure sets the built-in FG-Transparent gradient as the active gradient. The gradient will be used for subsequent gradient operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-gradient-blend-color-space
*/
procedure = gimp_procedure_new (context_get_gradient_blend_color_space_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-gradient-blend-color-space");
gimp_procedure_set_static_help (procedure,
"Get the gradient blend color space.",
"Get the gradient blend color space for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("blend-color-space",
"blend color space",
"Color blend space",
GIMP_TYPE_GRADIENT_BLEND_COLOR_SPACE,
GIMP_GRADIENT_BLEND_RGB_PERCEPTUAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-blend-color-space
*/
procedure = gimp_procedure_new (context_set_gradient_blend_color_space_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-blend-color-space");
gimp_procedure_set_static_help (procedure,
"Set the gradient blend color space.",
"Set the gradient blend color space for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("blend-color-space",
"blend color space",
"Blend color space",
GIMP_TYPE_GRADIENT_BLEND_COLOR_SPACE,
GIMP_GRADIENT_BLEND_RGB_PERCEPTUAL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-gradient-repeat-mode
*/
procedure = gimp_procedure_new (context_get_gradient_repeat_mode_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-gradient-repeat-mode");
gimp_procedure_set_static_help (procedure,
"Get the gradient repeat mode.",
"Get the gradient repeat mode for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("repeat-mode",
"repeat mode",
"Repeat mode",
GIMP_TYPE_REPEAT_MODE,
GIMP_REPEAT_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-repeat-mode
*/
procedure = gimp_procedure_new (context_set_gradient_repeat_mode_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-repeat-mode");
gimp_procedure_set_static_help (procedure,
"Set the gradient repeat mode.",
"Set the gradient repeat mode for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("repeat-mode",
"repeat mode",
"Repeat mode",
GIMP_TYPE_REPEAT_MODE,
GIMP_REPEAT_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-gradient-reverse
*/
procedure = gimp_procedure_new (context_get_gradient_reverse_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-gradient-reverse");
gimp_procedure_set_static_help (procedure,
"Get the gradient reverse setting.",
"Get the gradient reverse setting for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("reverse",
"reverse",
"Reverse",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-gradient-reverse
*/
procedure = gimp_procedure_new (context_set_gradient_reverse_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-gradient-reverse");
gimp_procedure_set_static_help (procedure,
"Set the gradient reverse setting.",
"Set the gradient reverse setting for paint tools and the gradient tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2018");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("reverse",
"reverse",
"Reverse",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-palette
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_palette_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-palette");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active palette.",
"This procedure returns the name of the the currently active palette.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active palette",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-palette
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_palette_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-palette");
gimp_procedure_set_static_help (procedure,
"Set the specified palette as the active palette.",
"This procedure allows the active palette to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed palettes. If no matching palette is found, this procedure will return an error. Otherwise, the specified palette becomes active and will be used in all subsequent palette operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the palette",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-font
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_get_font_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-font");
gimp_procedure_set_static_help (procedure,
"Retrieve the currently active font.",
"This procedure returns the name of the currently active font.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the active font",
2007-04-25 22:23:05 +08:00
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-font
*/
app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... 2006-04-06 Michael Natterer <mitch@gimp.org> * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in-proc-def.[ch]: removed... * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized get_progname(). * app/pdb/gimptemporaryprocedure.[ch]: new class derived from GimpPlugInProcedure. * app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union exec_method and all the structs it needed. Procedure execution is properly virtualized now. Removed gimp_procedure_initialize() and grow the args and values arrays dynamically in gimp_procedure_add_argument()/return_value(). Added marshal_func parameter to gimp_procedure_new(). * app/actions/plug-in-actions.c * app/actions/plug-in-commands.c * app/core/gimp-gui.c * app/dialogs/file-save-dialog.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/gui-vtable.c * app/menus/plug-in-menus.c * app/plug-in/plug-in-def.c * app/plug-in/plug-in-message.c * app/plug-in/plug-in-progress.c * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-run.c * app/plug-in/plug-in.c * app/plug-in/plug-ins-query.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimpfileprocview.c * app/widgets/gimppluginaction.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/app.pl: changed accordingly. * app/pdb/*_cmds.c: regenerated. * app/pdb/gimp-pdb.c: added uglyness to make the app link again.
2006-04-06 18:01:30 +08:00
procedure = gimp_procedure_new (context_set_font_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-font");
gimp_procedure_set_static_help (procedure,
"Set the specified font as the active font.",
"This procedure allows the active font to be set by specifying its name. The name is simply a string which corresponds to one of the names of the installed fonts. If no matching font is found, this procedure will return an error. Otherwise, the specified font becomes active and will be used in all subsequent font operations.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org> & Sven Neumann <sven@gimp.org>",
"Michael Natterer & Sven Neumann",
"2004");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The name of the font",
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
app/pdb/Makefile.am app/pdb/pdb-types.h new object GimpPDB which keeps all 2006-04-26 Michael Natterer <mitch@gimp.org> * app/pdb/Makefile.am * app/pdb/pdb-types.h * app/pdb/gimppdb.[ch]: new object GimpPDB which keeps all procedures and functions to register and run them. Renamed all functions and did some cleanups. * app/pdb/gimp-pdb.[ch] * app/core/gimp.[ch]: removed the same stuff here. * app/pdb/gimp-pdb-query.[ch]: removed these files... * app/pdb/gimppdb-query.[ch]: ...added here as members of GimpPDB. * app/pdb/gimp-pdb-compat.h: fix include guard. * app/batch.c * app/actions/vectors-commands.c * app/dialogs/about-dialog.c * app/file/file-open.c * app/file/file-save.c * app/plug-in/plug-in-message.c * app/plug-in/plug-ins.c * app/widgets/gimpfiledialog.c * app/widgets/gimphelp.c * app/xcf/xcf.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed includes and function calls accordingly. * tools/pdbgen/app.pl: pass around GimpPDB instead of Gimp pointers to register the internal procedures with. Changed some newlines in the generated code. * app/pdb/*_cmds.c * app/pdb/internal_procs.[ch]: regenerated. * app/core/gimppdbprogress.[ch] * app/widgets/gimppdbdialog.[ch]: added "pdb" CONSTRUCT_ONLY properties. * app/plug-in/plug-in-progress.c * app/gui/gui-vtable.c: pass gimp->pdb when creating them. * app/widgets/gimpbrushselect.c * app/widgets/gimpfontselect.c * app/widgets/gimpgradientselect.c * app/widgets/gimppaletteselect.c * app/widgets/gimppatternselect.c: use the new local pdb pointers instead of some foo->bar->gimp->pdb overkill.
2006-04-26 17:13:47 +08:00
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-antialias
*/
procedure = gimp_procedure_new (context_get_antialias_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-antialias");
gimp_procedure_set_static_help (procedure,
"Get the antialias setting.",
"This procedure returns the antialias setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("antialias",
"antialias",
"The antialias setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-antialias
*/
procedure = gimp_procedure_new (context_set_antialias_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-antialias");
gimp_procedure_set_static_help (procedure,
"Set the antialias setting.",
"This procedure modifies the antialias setting. If antialiasing is turned on, the edges of selected region will contain intermediate values which give the appearance of a sharper, less pixelized edge. This should be set as TRUE most of the time unless a binary-only selection is wanted.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-image-select-round-rectangle', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-item', 'gimp-drawable-edit-bucket-fill', 'gimp-drawable-edit-stroke-item', 'gimp-drawable-edit-stroke-selection'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("antialias",
"antialias",
"The antialias setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-feather
*/
procedure = gimp_procedure_new (context_get_feather_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-feather");
gimp_procedure_set_static_help (procedure,
"Get the feather setting.",
"This procedure returns the feather setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("feather",
"feather",
"The feather setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-feather
*/
procedure = gimp_procedure_new (context_set_feather_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-feather");
gimp_procedure_set_static_help (procedure,
"Set the feather setting.",
"This procedure modifies the feather setting. If the feather option is enabled, selections will be blurred before combining. The blur is a gaussian blur; its radii can be controlled using 'gimp-context-set-feather-radius'.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-image-select-rectangle', 'gimp-image-select-round-rectangle', 'gimp-image-select-ellipse', 'gimp-image-select-polygon', 'gimp-image-select-item'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("feather",
"feather",
"The feather setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-feather-radius
*/
procedure = gimp_procedure_new (context_get_feather_radius_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-feather-radius");
gimp_procedure_set_static_help (procedure,
"Get the feather radius setting.",
"This procedure returns the feather radius setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("feather-radius-x",
"feather radius x",
"The horizontal feather radius",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("feather-radius-y",
"feather radius y",
"The vertical feather radius",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-feather-radius
*/
procedure = gimp_procedure_new (context_set_feather_radius_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-feather-radius");
gimp_procedure_set_static_help (procedure,
"Set the feather radius setting.",
"This procedure modifies the feather radius setting.\n"
"\n"
"This setting affects all procedures that are affected by 'gimp-context-set-feather'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("feather-radius-x",
"feather radius x",
"The horizontal feather radius",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("feather-radius-y",
"feather radius y",
"The vertical feather radius",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-sample-merged
*/
procedure = gimp_procedure_new (context_get_sample_merged_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-sample-merged");
gimp_procedure_set_static_help (procedure,
"Get the sample merged setting.",
"This procedure returns the sample merged setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("sample-merged",
"sample merged",
"The sample merged setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-sample-merged
*/
procedure = gimp_procedure_new (context_set_sample_merged_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-sample-merged");
gimp_procedure_set_static_help (procedure,
"Set the sample merged setting.",
"This procedure modifies the sample merged setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether the pixel data from the specified drawable is used ('sample-merged' is FALSE), or the pixel data from the composite image ('sample-merged' is TRUE. This is equivalent to sampling for colors after merging all visible layers).\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-drawable-edit-bucket-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("sample-merged",
"sample merged",
"The sample merged setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-sample-criterion
*/
procedure = gimp_procedure_new (context_get_sample_criterion_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-sample-criterion");
gimp_procedure_set_static_help (procedure,
"Get the sample criterion setting.",
"This procedure returns the sample criterion setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("sample-criterion",
"sample criterion",
"The sample criterion setting",
GIMP_TYPE_SELECT_CRITERION,
GIMP_SELECT_CRITERION_COMPOSITE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-sample-criterion
*/
procedure = gimp_procedure_new (context_set_sample_criterion_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-sample-criterion");
gimp_procedure_set_static_help (procedure,
"Set the sample criterion setting.",
"This procedure modifies the sample criterion setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls how color similarity is determined. SELECT_CRITERION_COMPOSITE is the default value.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-drawable-edit-bucket-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("sample-criterion",
"sample criterion",
"The sample criterion setting",
GIMP_TYPE_SELECT_CRITERION,
GIMP_SELECT_CRITERION_COMPOSITE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-sample-threshold
*/
procedure = gimp_procedure_new (context_get_sample_threshold_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-sample-threshold");
gimp_procedure_set_static_help (procedure,
"Get the sample threshold setting.",
"This procedure returns the sample threshold setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("sample-threshold",
"sample threshold",
"The sample threshold setting",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-sample-threshold
*/
procedure = gimp_procedure_new (context_set_sample_threshold_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-sample-threshold");
gimp_procedure_set_static_help (procedure,
"Set the sample threshold setting.",
"This procedure modifies the sample threshold setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls what is \"sufficiently close\" to be considered a similar color. If the sample threshold has not been set explicitly, the default threshold set in gimprc will be used.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-drawable-edit-bucket-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("sample-threshold",
"sample threshold",
"The sample threshold setting",
0.0, 1.0, 0.0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-sample-threshold-int
*/
procedure = gimp_procedure_new (context_get_sample_threshold_int_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-sample-threshold-int");
gimp_procedure_set_static_help (procedure,
"Get the sample threshold setting as an integer value.",
"This procedure returns the sample threshold setting as an integer value. See 'gimp-context-get-sample-threshold'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("sample-threshold",
"sample threshold",
"The sample threshold setting",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-sample-threshold-int
*/
procedure = gimp_procedure_new (context_set_sample_threshold_int_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-sample-threshold-int");
gimp_procedure_set_static_help (procedure,
"Set the sample threshold setting as an integer value.",
"This procedure modifies the sample threshold setting as an integer value. See 'gimp-context-set-sample-threshold'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
g_param_spec_int ("sample-threshold",
"sample threshold",
"The sample threshold setting",
0, 255, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-sample-transparent
*/
procedure = gimp_procedure_new (context_get_sample_transparent_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-sample-transparent");
gimp_procedure_set_static_help (procedure,
"Get the sample transparent setting.",
"This procedure returns the sample transparent setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("sample-transparent",
"sample transparent",
"The sample transparent setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-sample-transparent
*/
procedure = gimp_procedure_new (context_set_sample_transparent_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-sample-transparent");
gimp_procedure_set_static_help (procedure,
"Set the sample transparent setting.",
"This procedure modifies the sample transparent setting. If an operation depends on the colors of the pixels present in a drawable, like when doing a seed fill, this setting controls whether transparency is considered to be a unique selectable color. When this setting is TRUE, transparent areas can be selected or filled.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-color', 'gimp-image-select-contiguous-color', 'gimp-drawable-edit-bucket-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2011");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("sample-transparent",
"sample transparent",
"The sample transparent setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-diagonal-neighbors
*/
procedure = gimp_procedure_new (context_get_diagonal_neighbors_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-diagonal-neighbors");
gimp_procedure_set_static_help (procedure,
"Get the diagonal neighbors setting.",
"This procedure returns the diagonal neighbors setting.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ell",
"Ell",
"2016");
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("diagonal-neighbors",
"diagonal neighbors",
"The diagonal neighbors setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-diagonal-neighbors
*/
procedure = gimp_procedure_new (context_set_diagonal_neighbors_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-diagonal-neighbors");
gimp_procedure_set_static_help (procedure,
"Set the diagonal neighbors setting.",
"This procedure modifies the diagonal neighbors setting. If the affected region of an operation is based on a seed point, like when doing a seed fill, then, when this setting is TRUE, all eight neighbors of each pixel are considered when calculating the affected region; in contrast, when this setting is FALSE, only the four orthogonal neighbors of each pixel are considered.\n"
"\n"
"This setting affects the following procedures: 'gimp-image-select-contiguous-color', 'gimp-drawable-edit-bucket-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ell",
"Ell",
"2016");
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("diagonal-neighbors",
"diagonal neighbors",
"The diagonal neighbors setting",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-distance-metric
*/
procedure = gimp_procedure_new (context_get_distance_metric_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-distance-metric");
gimp_procedure_set_static_help (procedure,
"Get the distance metric used in some computations.",
"This procedure returns the distance metric in the current context. See 'gimp-context-set-distance-metric' to know more about its usage.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2018");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("metric",
"metric",
"The distance metric",
GEGL_TYPE_DISTANCE_METRIC,
GEGL_DISTANCE_METRIC_EUCLIDEAN,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-distance-metric
*/
procedure = gimp_procedure_new (context_set_distance_metric_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-distance-metric");
gimp_procedure_set_static_help (procedure,
"Set the distance metric used in some computations.",
"This procedure modifies the distance metric used in some computations, such as 'gimp-drawable-edit-gradient-fill'. In particular, it does not change the metric used in generic distance computation on canvas, as in the Measure tool.\n"
"\n"
"This setting affects the following procedures: 'gimp-drawable-edit-gradient-fill'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Jehan",
"Jehan",
"2018");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("metric",
"metric",
"The distance metric",
GEGL_TYPE_DISTANCE_METRIC,
GEGL_DISTANCE_METRIC_EUCLIDEAN,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-interpolation
*/
procedure = gimp_procedure_new (context_get_interpolation_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-interpolation");
gimp_procedure_set_static_help (procedure,
"Get the interpolation type.",
"This procedure returns the interpolation setting. The return value is an integer which corresponds to the values listed in the argument description. If the interpolation has not been set explicitly by 'gimp-context-set-interpolation', the default interpolation set in gimprc will be used.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("interpolation",
"interpolation",
"The interpolation type",
GIMP_TYPE_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-interpolation
*/
procedure = gimp_procedure_new (context_set_interpolation_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-interpolation");
gimp_procedure_set_static_help (procedure,
"Set the interpolation type.",
"This procedure modifies the interpolation setting.\n"
"\n"
"This setting affects affects the following procedures: 'gimp-item-transform-flip', 'gimp-item-transform-perspective', 'gimp-item-transform-rotate', 'gimp-item-transform-scale', 'gimp-item-transform-shear', 'gimp-item-transform-2d', 'gimp-item-transform-matrix', 'gimp-image-scale', 'gimp-layer-scale'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("interpolation",
"interpolation",
"The interpolation type",
GIMP_TYPE_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-transform-direction
*/
procedure = gimp_procedure_new (context_get_transform_direction_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-transform-direction");
gimp_procedure_set_static_help (procedure,
"Get the transform direction.",
"This procedure returns the transform direction. The return value is an integer which corresponds to the values listed in the argument description.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("transform-direction",
"transform direction",
"The transform direction",
GIMP_TYPE_TRANSFORM_DIRECTION,
GIMP_TRANSFORM_FORWARD,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-transform-direction
*/
procedure = gimp_procedure_new (context_set_transform_direction_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-transform-direction");
gimp_procedure_set_static_help (procedure,
"Set the transform direction.",
"This procedure modifies the transform direction setting.\n"
"\n"
"This setting affects affects the following procedures: 'gimp-item-transform-flip', 'gimp-item-transform-perspective', 'gimp-item-transform-rotate', 'gimp-item-transform-scale', 'gimp-item-transform-shear', 'gimp-item-transform-2d', 'gimp-item-transform-matrix'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("transform-direction",
"transform direction",
"The transform direction",
GIMP_TYPE_TRANSFORM_DIRECTION,
GIMP_TRANSFORM_FORWARD,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-transform-resize
*/
procedure = gimp_procedure_new (context_get_transform_resize_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-transform-resize");
gimp_procedure_set_static_help (procedure,
"Get the transform resize type.",
"This procedure returns the transform resize setting. The return value is an integer which corresponds to the values listed in the argument description.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("transform-resize",
"transform resize",
"The transform resize type",
GIMP_TYPE_TRANSFORM_RESIZE,
GIMP_TRANSFORM_RESIZE_ADJUST,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-transform-resize
*/
procedure = gimp_procedure_new (context_set_transform_resize_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-transform-resize");
gimp_procedure_set_static_help (procedure,
"Set the transform resize type.",
"This procedure modifies the transform resize setting. When transforming pixels, if the result of a transform operation has a different size than the original area, this setting determines how the resulting area is sized.\n"
"\n"
"This setting affects affects the following procedures: 'gimp-item-transform-flip', 'gimp-item-transform-flip-simple', 'gimp-item-transform-perspective', 'gimp-item-transform-rotate', 'gimp-item-transform-rotate-simple', 'gimp-item-transform-scale', 'gimp-item-transform-shear', 'gimp-item-transform-2d', 'gimp-item-transform-matrix'.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2010");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("transform-resize",
"transform resize",
"The transform resize type",
GIMP_TYPE_TRANSFORM_RESIZE,
GIMP_TRANSFORM_RESIZE_ADJUST,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-size
*/
procedure = gimp_procedure_new (context_get_ink_size_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-size");
gimp_procedure_set_static_help (procedure,
"Get ink blob size in pixels.",
"Get the ink blob size in pixels for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("size",
"size",
"ink blob size in pixels",
0, 200, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-size
*/
procedure = gimp_procedure_new (context_set_ink_size_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-size");
gimp_procedure_set_static_help (procedure,
"Set ink blob size in pixels.",
"Set the ink blob size in pixels for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("size",
"size",
"ink blob size in pixels",
0, 200, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-angle
*/
procedure = gimp_procedure_new (context_get_ink_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-angle");
gimp_procedure_set_static_help (procedure,
"Get ink angle in degrees.",
"Get the ink angle in degrees for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("angle",
"angle",
"ink angle in degrees",
-90, 90, -90,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-angle
*/
procedure = gimp_procedure_new (context_set_ink_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-angle");
gimp_procedure_set_static_help (procedure,
"Set ink angle in degrees.",
"Set the ink angle in degrees for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
"ink angle in degrees",
-90, 90, -90,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-size-sensitivity
*/
procedure = gimp_procedure_new (context_get_ink_size_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-size-sensitivity");
gimp_procedure_set_static_help (procedure,
"Get ink size sensitivity.",
"Get the ink size sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("size",
"size",
"ink size sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-size-sensitivity
*/
procedure = gimp_procedure_new (context_set_ink_size_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-size-sensitivity");
gimp_procedure_set_static_help (procedure,
"Set ink size sensitivity.",
"Set the ink size sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("size",
"size",
"ink size sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-tilt-sensitivity
*/
procedure = gimp_procedure_new (context_get_ink_tilt_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-tilt-sensitivity");
gimp_procedure_set_static_help (procedure,
"Get ink tilt sensitivity.",
"Get the ink tilt sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("tilt",
"tilt",
"ink tilt sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-tilt-sensitivity
*/
procedure = gimp_procedure_new (context_set_ink_tilt_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-tilt-sensitivity");
gimp_procedure_set_static_help (procedure,
"Set ink tilt sensitivity.",
"Set the ink tilt sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("tilt",
"tilt",
"ink tilt sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-speed-sensitivity
*/
procedure = gimp_procedure_new (context_get_ink_speed_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-speed-sensitivity");
gimp_procedure_set_static_help (procedure,
"Get ink speed sensitivity.",
"Get the ink speed sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("speed",
"speed",
"ink speed sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-speed-sensitivity
*/
procedure = gimp_procedure_new (context_set_ink_speed_sensitivity_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-speed-sensitivity");
gimp_procedure_set_static_help (procedure,
"Set ink speed sensitivity.",
"Set the ink speed sensitivity for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("speed",
"speed",
"ink speed sensitivity",
0, 1, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-blob-type
*/
procedure = gimp_procedure_new (context_get_ink_blob_type_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-blob-type");
gimp_procedure_set_static_help (procedure,
"Get ink blob type.",
"Get the ink blob type for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("type",
"type",
"Ink blob type",
GIMP_TYPE_INK_BLOB_TYPE,
GIMP_INK_BLOB_TYPE_CIRCLE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-blob-type
*/
procedure = gimp_procedure_new (context_set_ink_blob_type_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-blob-type");
gimp_procedure_set_static_help (procedure,
"Set ink blob type.",
"Set the ink blob type for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("type",
"type",
"Ink blob type",
GIMP_TYPE_INK_BLOB_TYPE,
GIMP_INK_BLOB_TYPE_CIRCLE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-blob-aspect-ratio
*/
procedure = gimp_procedure_new (context_get_ink_blob_aspect_ratio_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-blob-aspect-ratio");
gimp_procedure_set_static_help (procedure,
"Get ink blob aspect ratio.",
"Get the ink blob aspect ratio for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("aspect",
"aspect",
"ink blob aspect ratio",
1, 10, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-blob-aspect-ratio
*/
procedure = gimp_procedure_new (context_set_ink_blob_aspect_ratio_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-blob-aspect-ratio");
gimp_procedure_set_static_help (procedure,
"Set ink blob aspect ratio.",
"Set the ink blob aspect ratio for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("aspect",
"aspect",
"ink blob aspect ratio",
1, 10, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-blob-angle
*/
procedure = gimp_procedure_new (context_get_ink_blob_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-ink-blob-angle");
gimp_procedure_set_static_help (procedure,
"Get ink blob angle in degrees.",
"Get the ink blob angle in degrees for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("angle",
"angle",
"ink blob angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-ink-blob-angle
*/
procedure = gimp_procedure_new (context_set_ink_blob_angle_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-ink-blob-angle");
gimp_procedure_set_static_help (procedure,
"Set ink blob angle in degrees.",
"Set the ink blob angle in degrees for ink tool.",
NULL);
gimp_procedure_set_static_attribution (procedure,
"Ed Swartz",
"Ed Swartz",
"2012");
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
"ink blob angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}