Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.
Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.
This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).
For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.
Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
No need of is_id_arg() anymore in pdb/lib.pl. Let's reuse the {id}
value. Also I had to add an additional trick for GimpDisplay which we
will now generate as such in libgimp PDB files, but still need to show
as GimpObject on app/pdb/.
As previously, only the new classes and the PDB generation for a first
step.
This means that all functions which were returning or taking as
parameter an image id (as gint32) are now taking a GimpImage object
instead.
The PDB is still passing around an id only over the wire. But we create
an object for plug-ins to work on.
This is quite a huge API break, but is probably the best bet for the
future quality. It will make nicer API instrospection (and nicer API in
binding), will fix the issues with pspec on GimpImageID in Python
bindings (which makes the current Python API unusable as soon as we need
to work on images, which is most of our plug-ins!), etc.
Also it will allow to use signals on images, which will be a great asset
when we will finally have bi-directionnal communications (i.e. plug-ins
would be able to connect to image changes, destructions, and whatnot).
So a value array can now we created like this:
array = gimp_value_array_new_from_types (&error_msg,
G_TYPE_STRING, "foo",
G_TYPE_INT, 23,
G_TYPE_NONE);
Change PDB generation to use this, which makes for much nicer code in
the libgimp wrappers, and only set arrays separately instead of all
values.
This reverts commit 833666d462.
The _pdb files are an implementation detail and we do not want
separate doc sections for them, the conflicts need so be resolved in
another way.
Otherwise we get a few duplicate sections since some of the non-PDB
files are named similarly.
Fix this GObject introspection warning and other similar warnings:
> libgimp/gimp_pdb.c:28: Warning: Gimp: multiple comment blocks
> documenting 'SECTION:gimp:' identifier (already seen at gimp.c:129).
All foo_pdb.c functions in libgimp regenerated. I have reviewed this a
dozen times, but please have a look, there might well be glitches and
our public API is sortof important...
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
The documentation was missing information about GIMP_ADD_CHANNEL_MASK
mask type, also about possible failure cases, and had an unclosed
bracket typo.
Also make nicer output and list formatting with the new pdb paragraph
feature.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-09-24 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/image.pdb: added new scale procedures that
allow to specify the interpolation explicitly. Fixes bug
#486977.
Also pass the progress parameter to the scale and rotate
functions.
* app/pdb/image-cmds.c
* app/pdb/internal-procs.c
* app/pdb/layer-cmds.c
* libgimp/gimpimage_pdb.[ch]
* libgimp/gimplayer_pdb.[ch]: regenerated.
* libgimp/gimp.def: updated.
svn path=/trunk/; revision=27039
2006-09-13 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/paint_tools.pdb
* tools/pdbgen/pdb/selection_tools.pdb: use the canonical form
when
refering to parameters in the procedure description.
2006-06-14 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/[many].pdb: in help texts, refer to other
procedures using_c_syntax(). This way gtk-doc can cross-reference
them correctly in libgimp, and app.pl will transform them
'to-canonical-names' for PDB registering.
* app/pdb/[many]_cmds.c
* libgimp/[many]_pdb.c: regenerated.
2006-04-02 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/lib.pl: use the variable initializer defined with
the PDB type instead of figuring it manually. Removed a line of
code that checked for enums without "Gimp" prefix.
* libgimp/gimpbrush_pdb.c
* libgimp/gimpchannel_pdb.c
* libgimp/gimpcontext_pdb.c
* libgimp/gimpgradient_pdb.c
* libgimp/gimplayer_pdb.c
* libgimp/gimpunit_pdb.c
* libgimp/gimpvectors_pdb.c: all doubles are initialized with 0.0
instead of 0 now.