Gimp/libgimpconfig
Jehan d493f0537f Issue #8900 and #9923: reimplementing GimpUnit as a proper class.
This fixes all our GObject Introspection issues with GimpUnit which was
both an enum and an int-derived type of user-defined units *completing*
the enum values. GIR clearly didn't like this!

Now GimpUnit is a proper class and units are unique objects, allowing to
compare them with an identity test (i.e. `unit == gimp_unit_pixel ()`
tells us if unit is the pixel unit or not), which makes it easy to use,
just like with int, yet adding also methods, making for nicer
introspected API.

As an aside, this also fixes #10738, by having all the built-in units
retrievable even if libgimpbase had not been properly initialized with
gimp_base_init().
I haven't checked in details how GIR works to introspect, but it looks
like it loads the library to inspect and runs functions, hence
triggering some CRITICALS because virtual methods (supposed to be
initialized with gimp_base_init() run by libgimp) are not set. This new
code won't trigger any critical because the vtable method are now not
necessary, at least for all built-in units.

Note that GimpUnit is still in libgimpbase. It could have been moved to
libgimp in order to avoid any virtual method table (since we need to
keep core and libgimp side's units in sync, PDB is required), but too
many libgimpwidgets widgets were already using GimpUnit. And technically
most of GimpUnit logic doesn't require PDB (only the creation/sync
part). This is one of the reasons why user-created GimpUnit list is
handled and stored differently from other types of objects.

Globally this simplifies the code a lot too and we don't need separate
implementations of various utils for core and libgimp, which means less
prone to errors.
2024-08-02 10:46:38 +02:00
..
gimpcolorconfig.c app, libgimp*, modules, pdb, plug-ins: new GimpParamColor. 2024-04-19 23:25:13 +02:00
gimpcolorconfig.h app, libgimp*: more GeglColor's space invasion. 2024-02-11 23:28:02 +01:00
gimpconfig-array.c libgimpconfig: support GStrv aka string array 2023-06-15 17:12:44 +00:00
gimpconfig-array.h libgimpconfig: support GStrv aka string array 2023-06-15 17:12:44 +00:00
gimpconfig-deserialize.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimpconfig-deserialize.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconfig-error.c Use "Returns:" to annotate return values 2019-08-03 07:53:47 +00:00
gimpconfig-error.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconfig-iface.c libgimp, libgimpconfig: GimpResource can now be (de)serialized. 2023-07-27 15:34:45 +02:00
gimpconfig-iface.h libgimp, libgimpconfig: GimpResource can now be (de)serialized. 2023-07-27 15:34:45 +02:00
gimpconfig-params.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimpconfig-params.h app, libgimp*, modules, pdb, plug-ins: new GimpParamColor. 2024-04-19 23:25:13 +02:00
gimpconfig-path.c libgimp: new unit testing framework for libgimp. 2024-02-28 22:55:58 +01:00
gimpconfig-path.h libgimp*: lots of doc fixes and new docs for structs and enums 2019-07-24 01:18:30 +02:00
gimpconfig-register.c libgimpconfig: more param spec types to ignore (GeglParamFormat). 2022-10-26 23:29:32 +02:00
gimpconfig-register.h libgimpconfig: add gimp_config_type_register() 2019-09-16 10:48:32 +02:00
gimpconfig-serialize.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimpconfig-serialize.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconfig-utils.c libgimpconfig: special-case GeglColor param comparison if one is NULL. 2024-02-12 19:33:29 +01:00
gimpconfig-utils.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconfig.def libgimpconfig: support GStrv aka string array 2023-06-15 17:12:44 +00:00
gimpconfig.h app, libgimp*: more GeglColor's space invasion. 2024-02-11 23:28:02 +01:00
gimpconfigenums.c app, libgimp*: commit the newly generated *enums.c files. 2022-08-01 20:00:01 +02:00
gimpconfigenums.h libgimpconfig: fix small typo. 2022-03-04 16:09:09 +01:00
gimpconfigtypes.h libgimpconfig: add a GimpScanner typedef and make it a boxed type 2019-08-09 12:42:52 +02:00
gimpconfigwriter.c libgimpconfig: Fix gimpconfigwriter GIR annotation 2024-05-11 14:34:32 +02:00
gimpconfigwriter.h libgimpconfig: get rid of filenames in all config related APIs 2019-09-21 12:55:12 +02:00
gimpscanner.c core, widgets: Convert HSV/A to float 2024-04-21 03:42:27 +00:00
gimpscanner.h app, libgimpconfig: color history is now space-invaded. 2024-02-11 23:28:03 +01:00
meson.build libgimpconfig: support GStrv aka string array 2023-06-15 17:12:44 +00:00