Commit Graph

44237 Commits

Author SHA1 Message Date
Jehan bbf90b3ba5 plug-ins: port film to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan 3e06295adf plug-ins: port pagecurl to GimpImage/GimpDrawable. 2019-08-22 15:54:37 +02:00
Jehan 00e750776a plug-ins: port print to GimpImage/GimpDrawable/etc. 2019-08-22 15:54:36 +02:00
Jehan 962e8b995e plug-ins: port gfig to GimpImage|Drawable. 2019-08-22 15:54:36 +02:00
Jehan 7838c7f2b2 plug-ins: port fractal-explorer to GimpImage|Drawable. 2019-08-22 15:54:36 +02:00
Jehan 6db115e475 plug-ins: unit-editor does not need GimpImage porting.
It doesn't use any image/drawable, whatever.
2019-08-22 15:54:36 +02:00
Jehan e6b141ffe4 plug-ins: port file-tiff to GimpImage|Drawable|Vectors, etc. 2019-08-22 15:54:36 +02:00
Jehan adc4f8e589 plug-ins: port mail to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 8f34af49b7 plug-ins: port file-png to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 9f0dbb5759 plug-ins: port screenshot to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0b64395fa6 plug-ins: port colormap-remap to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 1b6e6b9b53 plug-ins: port file-exr to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 3d4bf19bae plug-ins: port file-sgi to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 08849a584c libgimp: GimpItem now also belong to libgimp. 2019-08-22 15:54:36 +02:00
Jehan d15388c8c9 libgimp: s/gimp_display_new_by_id/gimp_display_get_by_id/
GimpDisplay objects now also belongs to libgimp!
2019-08-22 15:54:36 +02:00
Jehan cfd30ec62a libgimp: s/gimp_image_new_by_id()/gimp_image_get_by_id()/
This means that images' ownership is not given to caller in particular.
libgimp will now keep a reference of all GimpImage-s it creates and
return this same reference if called again. It also means that you can
now compare images by pointer comparison (as 2 GimpImage objects
representing the same image ID will be equal).
Obviously as a side effect, gimp_image_list() is changed to (transfer
container) as you must only free the container now, not the elements.
Also various other functions creating new images are now (transfer none)
too.

Long-time plug-ins will have to be taken in consideration in a further
step (we currently never free GimpImage for destroyed images in
particular).
2019-08-22 15:54:36 +02:00
Jehan 8559cee053 plug-ins: improve parameter creation on Python 3 goat-exercise.
PyGObject seems to have at least 3 syntaxes to create object properties.
Though the one I used previously was apparently the recommended syntax,
it was clearly a bit messy and not clear. This alternative syntax ends
up much more compact, really look alike the C-style, which is a good
thing and is very visual. From what I can see, we should also override
the get|set_property() methods, but since we are not going to actually
set any value (this is only a workaround to make a GParamSpec), it seems
to work fine without.
2019-08-22 15:54:36 +02:00
Jehan c95e9334d1 plug-ins: port file-raw plug-ins to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan e29cb0329c plug-ins: port file-compressor to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 3e636ba0c6 plug-ins: port file-desktop-link to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0cb995e8a4 plug-ins: port file-gih to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan d6365c778e plug-in: port file-gbr to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan abd4d6fab8 plug-ins: port file-pat to GimpImage/GimpDrawable. 2019-08-22 15:54:36 +02:00
Jehan 0fa09282f2 plug-ins: port file-ico to the new GimpImage/GimpDrawable objects. 2019-08-22 15:54:36 +02:00
Jehan 7f91f6bc25 libgimp: GimpImageProcedure now uses GimpImage/GimpDrawable too. 2019-08-22 15:54:36 +02:00
Jehan ee8b467e9f libgimp: GimpSaveProcedure() now uses GimpImage/GimpDrawable object...
... as parameters.
And GimpLoadProcedure() now expects the run() function to return a
GimpImage object.
2019-08-22 15:54:36 +02:00
Jehan a1eeca490f libgimp: support all GimpItem subclasses as argument and return values. 2019-08-22 15:54:36 +02:00
Jehan 75f8a3804d libgimp: nicer API for functions returning a list.
I.e.: gimp_image_get_(layers|channels|vectors)(), gimp_image_list() and
gimp_item_get_children().
Instead of returning an array of IDs, these will now return a GList with
the right objects ready to use.
2019-08-22 15:54:36 +02:00
Jehan c409829be5 libgimp, pdb: no need to create deprecated versions for private API. 2019-08-22 15:54:36 +02:00
Jehan 5e6d4d8fbd libgimp: fix the non-generated API with the new class types. 2019-08-22 15:54:36 +02:00
Jehan 8c95499e14 pdb, libgimp: now make all ID types classes of their own.
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.
2019-08-22 15:54:36 +02:00
Jehan 292b697f3e plug-ins: use GimpDrawable class in Python goat-exercise.
And re-enable it. Now it works fine!
2019-08-22 15:54:36 +02:00
Jehan 9b8f6089ce plug-ins: port JavaScript goat-exercise to new GimpImage API.
Note how much nicer it is in bindings!
2019-08-22 15:54:36 +02:00
Jehan 52811edcee plug-ins: C goat-exercise now ported to new GimpImage/GimpDrawable.
You'll notice that with the new class when used together with the new
GimpPlugIn API, it is not needed to allocate/destroy anymore the
GimpImage/GimpDrawable. These can be directly the parameters.
2019-08-22 15:54:36 +02:00
Jehan 8249afe2fc libgimp: allow object GParamSpec for GimpItem and child classes. 2019-08-22 15:54:36 +02:00
Jehan 433fcd4334 plug-ins: ported a few plug-ins to new GimpImage/GimpDrawable classes. 2019-08-22 15:54:36 +02:00
Jehan 3f1491e572 libgimp: update non-generated API using GimpItem/GimpDrawable/GimpLayer.
I did the same trick with GIMP_DEPRECATED_REPLACE_NEW_API macro, apart
for some minor widget API to preview drawable, which I will fix right
away in our plug-ins.
2019-08-22 15:54:36 +02:00
Jehan 79b319cf9d libgimp, pdb: add GimpItem > GimpDrawable > GimpLayer classes.
Only class and subclasses creation and PDB generation for this first
step.
I'll later do other types of items.
2019-08-22 15:54:36 +02:00
Jehan 793cba6675 libgimp: allow object GimpImage as procedure parameter.
Though it is still possible to use an image ID as procedure parameter,
it is now possible to pass a GimpImage GParamSpecObject.

Over the wire, this will transform back and forth into a GimpImageID,
totally transparently for the plug-in which will only always get a
GimpImage.
2019-08-22 15:54:36 +02:00
Jehan e0d50aa121 plug-ins: keep building all plug-ins with old API.
Build existing plug-ins with -DGIMP_DEPRECATED_REPLACE_NEW_API.
We will port the plug-ins one at a time to the new GimpImage API.
2019-08-22 15:54:36 +02:00
Jehan 09f0530dab libgimp: update non-generated API to allow old and new API.
Same as previous commit: by default the new API will be used. But if a
plug-in builds with GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same
function names will call the old API with ids.
2019-08-22 15:54:36 +02:00
Jehan fec6034c7a pdb: keep both the old and new API alive.
By default the new API will be used. But if we build with
GIMP_DEPRECATED_REPLACE_NEW_API macro, then the same function names will
call the old API with ids.

This way, we don't have to update all our plug-ins at once (which I
tried and is very tedious work).

Note that bindings won't have access to the deprecated API at all.
2019-08-22 15:54:36 +02:00
Jehan 17a40b049f libgimp: generate functions both for old and new GimpImage APIs.
This way, it would still be possible to use the old API. WIP.
2019-08-22 15:54:36 +02:00
Jehan 688c3230d0 libgimp: create and use gimp_image_new_by_id().
Simpler than using g_object_new() in a bunch of places.
2019-08-22 15:54:36 +02:00
Jehan bb72504ea9 libgimp: change all non-generated API to use GimpImage.
We shouldn't pass as parameter nor return gint32 anymore.
2019-08-22 15:54:36 +02:00
Jehan 4db8cda24e app, pdb, libgimp: add a new GimpImage class for plug-ins.
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).
2019-08-22 15:54:36 +02:00
Félix Piédallu 699b3c5c02 refactoring of the gitlab-ci.yml 2019-08-21 14:18:49 +02:00
Tobias Ellinghaus 583d965773
Fix typo in configure warning re: luajit 2019-08-20 14:02:43 +02:00
Alexandre Prokoudine 115f9fc873 Remove Bugzilla from the desktop file
We don't seem to need it anymore, and all GNOME apps have removed it already.
2019-08-20 12:58:28 +03:00
luz.paz 0340c4a904 libgimp/ documentation typo fixes
Found via `codespell -i 3 -w -S ./ChangeLog*,*.po -I ../gimp-word-whitelist.txt ./libgimp`
2019-08-20 08:40:58 +00:00