Commit Graph

13 Commits

Author SHA1 Message Date
Jehan b2f633a26c libgimp: all _gimp_procedure_config_begin|end_*() functions made private.
Since now all GimpProcedure and subclasses run these before and after the
relevant run() functions, there is no need to keep these public.
2023-10-15 17:19:30 +02:00
Jehan 317be5f4ce Issue #3912: Object proxy management not happy with bindings.
We cannot be 100% sure generically (i.e. for all possible bindings available
with GObject Introspection) if bindings add their own reference to objects or
not. Clearly we have cases when they always do (Lua, Javascript), cases when
they do only in certain conditions (global Python variables) and cases when they
don't (Vala). What we know for sure is that in these script languages,
developers don't manually manage memory anyway. So the additional reference is
not their fact.

So let's just maintain a list of automatic memory managed binding languages,
among the few we officially support (i.e. the ones for which we have working
test plug-ins) and verify by executable extension if the plug-in is written in
one of these.
Both keeping a manually-updated list and verifying by extension are not so
pretty solution, but for now it will do.
2023-10-15 16:45:15 +02:00
Jehan ed98b990c5 plug-ins, libgimp: GimpRunThumbnailFunc now uses a GimpProcedureConfig rather…
… than a GimpValueArray.

Similar to other GimpProcedure, move to using a config object. A difference is
that thumbnail procedures are always run non-interactively.

Also fixing WMF load thumbnail procedure: the dimension computation was wrong
when the image was wider than tall.
2023-10-01 21:02:32 +02:00
Michael Natterer 5a37be083a libgimp: doc fixes and improvements in procedure subclasses 2019-10-29 22:15:58 +01:00
Michael Natterer aeef726044 libgimp: implement GimpProcedure::create_config() in all subclasses 2019-09-24 00:59:50 +02:00
Michael Natterer 6bca8c4f89 pdb, app, libgimp, plug-ins: replace most PDB filenames/URIs by GFile
and in an attack of madness, changes almost all file plug-in
code to use GFile instead of filenames, which means passing
the GFile down to the bottom and get its filename at the very
end where it's actually needed.
2019-09-11 21:48:34 +02:00
Michael Natterer 4364b78446 libgimp: remove the GIMP_DISABLE_COMPAT_CRUFT define
there is no legacy API left a ported plug-in could accidentially use.
2019-08-30 13:00:00 +02:00
Michael Natterer 8a78203aed Properly prefix the values of enum GimpPDBProcType
to be GIMP_PDB_PROC_TYPE_PLUGIN, _EXTENSION etc.
2019-08-30 12:52:28 +02:00
Michael Natterer 392f00baf5 app, libgimp: get rid of all ID GTypes and ID param specs
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/.
2019-08-29 11:39:34 +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
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
Michael Natterer 6ed2d03c73 libgimp: use the new macros in all non-generated files 2019-08-20 01:21:32 +02:00
Michael Natterer c4a973c30a libgimp: add GimpThumbnailProceudre
which handles the standard thmbnail procedure args and return values.
2019-08-19 14:02:34 +02:00