Though I am not fond of these macros for our core code (it makes the
code more cumbersome especially for using private data in derivable
types), this definitely makes sense for public API, since it would allow
easier modifications with less chances of messing API/ABI stability.
This commit renames the GimpVectors
object to GimpPath in both app/core and
in libgimp. It also renames the files
to gimppath.[ch] and updates the relevant
build and translation files.
There are still outstanding gimp_vectors_* ()
functions on the app side that need to be renamed
in a subsequent commit.
Also:
- renaming gimp_layer_group_new() to gimp_group_layer_new() in order to keep the
same name as in core code (i.e. GimpGroupLayer, not GimpLayerGroup).
- renaming gimp_image_merge_layer_group() to gimp_group_layer_merge()
- new functions: gimp_procedure_add_group_layer_argument(),
gimp_procedure_add_group_layer_aux_argument() and
gimp_procedure_add_group_layer_return_value().
This can be tested, e.g. in Python with these calls:
```py
i = Gimp.get_images()[0]
g = Gimp.GroupLayer.new(i, "hello")
i.insert_layer(g, None, 1)
g2 = Gimp.GroupLayer.new(i, "world")
i.insert_layer(g2, g, 1)
g.merge()
```
This was work started long ago, stored in an old stash which I finally
finish now! :-)
- Move the property widget functions for GimpResource properties into a new
libgimp/gimppropwidgets.[ch] file. This mirrors the files
libgimpwidgets/gimppropwidgets.[ch] which are for more generic property types.
- Rename the functions gimp_prop_chooser_*_new() to gimp_prop_*_chooser_new().
- gimp_prop_chooser_factory() doesn't need to be public.
- Add a label to GimpResourceSelectButton, make so that the
gimp_prop_chooser_*_new() functions set the property nick to this label and
add this label to the size group in GimpProcedureDialog.
Now text layers are proper types, which means that the binding API will also be
nicer (e.g. `txt_layer.set_text('hello world')` in Python).
This commit also adds the param specs allowing to create plug-in procedures with
text layer parameters.
Finally it fixes the few calls in file-pdf-save (apparently the only plug-in
using specific text layer API right now) with explicit type conversion.
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).
The idea is that we already have a GimpProcedure object in libgimp
which has name, help, blurb, arguments, return values and everything,
so we really don't need a parallel API to query PDB procedures for
their properties.
- make run() a virtual function of GimpProcedure
- move GIMP_PDB_ERROR to GimpPDB
- GimpPDBProcedure is a trivial subblass which populates
GimpProcedure's members by querying the PDB.
- make "plug-in", "procedure-type" and "name" construct-only
properties of GimpProcedure.
This is all work in progress.
The new way of doing plug-ins:
- subclass GimpPlugIn in your plug-in
- implement its query() and run() methods, run() will move to a
new GimpProcedure class soon
- instead of MAIN(), say GIMP_MAIN(YOUR_PLUG_IN_TYPE)
Instead of keeping around a GimpPlugInInfo struct, libgimp will
create an instance of your plug-in class, keep it around during
the plug-in's lifetime, and call its virtual functions.
The GimpDrawable abstraction is completely gone, GimpTile is now a
small struct in gimptilebackendplugin.c.
All tile handling code is now in GimpTileBackendPlugin, the backend
functions are simply calling gimp_tile_get() and gimp_tile_put()
directly.
... and get rid of the dedicated op. This gives us support for all
the blend/composite options for this mode.
Rename COLOR_ERASE to COLOR_ERASE_LEGACY, with perceptual blending/
compositing and immutable everything, and add a new COLOR_ERASE
mode, defaulting to linear blending/compositing, with mutable
everything. Modify affected code.
being exported to libgimp, and having a non-exported value, this is a
horrible mess like with GimpLayerMode, but at least the cruft value
names are deprecated now.
C++ won't allow us to use GimpLayerMode in the API where we used to
have GimpLayerModeEffects.
Move GimpLayerModeEffects to libgimpbase/gimpcompatenums.h so it's
not in the API any longer, and instead typedef and define stuff in
libgimp/gimptypes.h, and adapt the compat enum registering code
accordingly.
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
2001-11-23 Sven Neumann <sven@gimp.org>
* configure.in: bumped version number to 1.3.1.
Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H
and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't
exist any longer.
* RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to
be frozen now.
* HACKING: removed reference to RELEASE-TO-CVS.patch
* app/gui/menus.c
* app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform
to the new GTK+/Pango API.
* app/core/Makefile.am: generate marshallers with gimp_marshal prefix.
* app/core/gimpmarshal.list: added all marshallers we use.
* app/core/gimpmarshal.[ch]: regenerated.
* app/[lots of .c files]: use gimp_marshal_* for all marshallers.
* data/images/
* app/app_procs.c
* app/gui/splash.c:
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimputils.[ch]: removed since they are no longer needed.
* app/gimprc.c
* plug-ins/common/ps.c
* plug-ins/gdyntext/gdyntext.c
* plug-ins/gdyntext/gdyntextcompat.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/script-fu/script-fu-scripts.c: use glib functions instead
of gimp_strescape() and gimpstrcompress().
* cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared
all _get_type function as G_GNUC_CONST.
* tools/pdbgen/enumcode.pl
* tools/pdbgen/lib.pl: make them generate header files using
G_BEGIN_DECLS/G_END_DECLS.
* pixmaps/Makefile.am
* pixmaps/wilber3.xpm: removed ...
* data/images/tips_wilber.png: ... and added here as PNG
* app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf.
* data/images/gimp_splash.ppm: removed ...
* data/images/gimp_splash.png: ... and added as PNG
* app/app_procs.c
* app/gui/splash.[ch]: load the splash image using GdkPixbuf.
* app/gui/about-dialog.c: sink the GtkPreview.
2001-05-21 Michael Natterer <mitch@gimp.org>
* Makefile.am
* configure.in
* gimptool-1.4.in: added new directory libgimpbase/
* app/Makefile.am: link against the new lib.
* app/appenums.h: removed the PDB enums which are in
libgimpbase/gimpbasetypes.h now. They are all "Gimp" prefixed.
* app/apptypes.h: #include "libgimpbase/gimpbasetypes.h"
* app/[lots]
* app/core/[of]
* app/gui/[files]
* app/tools/: changed includes and all PDB types.
* app/pdb/*: regenerated.
* libgimp/Makefile.am: don't build libgimpi.a uglyness any more.
* libgimp/gimpenv.[ch]
* libgimp/gimplimits.[hh]
* libgimp/gimpparasite.[ch]
* libgimp/gimpparasiteio.[ch]
* libgimp/gimpprotocol.[ch]
* libgimp/gimpsignal.[ch]
* libgimp/gimpunit.h
* libgimp/gimputils.[ch]
* libgimp/gimpwire.[ch]: removed...
* libgimpbase/*: ...and added here as new library.
* libgimp/gimp.[ch]
* libgimp/gimpdrawable.[ch]
* libgimp/gimpenums.h
* libgimp/gimpimage.[ch]
* libgimp/gimptile.c
* libgimp/gimptypes.h
* libgimp/gimpunit.c: changed accordingly. Added the
gimp_*_add_new_parasite to gimp.[ch], gimpdrawable.[ch] and
gimpimage.[ch].
* libgimpwidgets/gimppatheditor.c
* libgimpwidgets/gimpquerybox.c
* libgimpwidgets/gimpsizeentry.c
* libgimpwidgets/gimpunitmenu.c
* libgimpwidgets/gimpwidgets.c
* libgimpwidgets/gimpwidgetstypes.h: changed includes accordingly.
* plug-ins/*/Makefile.am
* plug-ins/common/mkgen.pl: link against libgimpbase.
* tools/pdbgen/Makefile.am: scan libgimpbase/gimpbasetypes.h, so
the enums are known to pdbgen...
* tools/pdbgen/enumcode.pl: ...but don't write them out to
libgimp/gimpenums.h
* tools/pdbgen/app.pl: include libgimp/gimpbase.h in all *_cmds.c
files. Added GIMP_ to the type names ganerated in app/.
* tools/pdbgen/enums.pl: regenerated.
* tools/pdbgen/pdb.pl
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/procedural_db.pdb
* tools/pdbgen/pdb/unit.pdb: changed includes.
2001-01-01 Michael Natterer <mitch@gimp.org>
* plug-ins/libgck/gck/gck.h
* plug-ins/libgck/gck/gckcolor.c: removed the GckRGB color type
and all it's functions.
* libgimp/Makefile.am
* libgimp/gimpcolor.[ch]: new files containing the new GimpRGB color
type and assorted functions.
* libgimp/gimpcolorspace.[ch]: colorspace conversion routines for
the new GimpRGB type. Also taken from LibGCK.
* libgimp/gimp.h
* libgimp/gimptypes.h: #include "gimpcolor.h". It's ugly to include
it in both files but unavoidable to follow our new "*.c" file include
policy. This will go away as libgimp will be chopped up into pieces
anyway.
* app/apptypes.h
* app/asupsample.[ch]
* app/blend.c
* app/color_transfer.h
* app/gradient_header.h: removed "color_t" and use GimpRGB instead.
* plug-ins/Lighting/lighting_apply.c
* plug-ins/Lighting/lighting_image.c
* plug-ins/Lighting/lighting_image.h
* plug-ins/Lighting/lighting_main.c
* plug-ins/Lighting/lighting_main.h
* plug-ins/Lighting/lighting_preview.c
* plug-ins/Lighting/lighting_shade.c
* plug-ins/Lighting/lighting_shade.h
* plug-ins/MapObject/mapobject_apply.c
* plug-ins/MapObject/mapobject_image.c
* plug-ins/MapObject/mapobject_image.h
* plug-ins/MapObject/mapobject_main.c
* plug-ins/MapObject/mapobject_main.h
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/MapObject/mapobject_shade.c
* plug-ins/MapObject/mapobject_shade.h
* modules/colorsel_triangle.c: s/GckRGB/GimpRGB/g
* plug-ins/gdyntext/gdyntextcompat.h: check also for GIMP's minor
version when deciding if to add a missing PDB wrapper.
(All this compat cruft including libgimp/gimpcompat.h should go
away ASAP)
2000-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/channel_pvt.h
* app/drawable_pvt.h
* app/gdisplayF.h
* app/gimpdrawableP.h
* app/gimpimageP.h
* app/layer_pvt.h
* app/toolsF.h: removed these files.
* app/apptypes.h
* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/tools.pdb
* app/*: chainsaw #include cleanup:
- Never (never!!) include stuff in header files except where we
need access to structures' contents (like derived objects).
- Added prototypes and proper formating in many files.
- The #include order in *all* *.c files is as follows:
#include "config.h"
#include <system stuff>
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimp stuff"
#include "libgimp stuff"
#include "libgimp/gimpintl.h"
By following this scheme we can easily see a file's dependencies
from it's #include's and can grep for the inclusion to find out
where a file is used.
* tools/pdbgen/app.pl: changed to follow the include scheme above.
* libgimp/Makefile.am
* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
and from app/apptypes.h.
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimpparasite.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpprotocol.c
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpunit.h
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_default_dialog.c
* plug-ins/imagemap/imap_file.c: these files used to include
"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
no longer possible because the libgimpui headers don't inlcude
"libgimp/gimpunit.h" any more.