Gimp/app/text
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
..
gimpfont.c text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
gimpfont.h text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
gimpfontfactory.c app: set font factory as GimpFont class member regardless of fonts being loaded. 2024-04-11 12:15:59 +02:00
gimpfontfactory.h Fix fonts when exporting to pdf 2023-12-08 11:09:22 +00:00
gimptext-compat.c Issue #10813: forgotten GimpRGB used on a GeglColor property. 2024-02-12 19:41:13 +01:00
gimptext-compat.h Issue #9987: text related functions crash using string for font name. 2023-10-02 20:49:53 +02:00
gimptext-parasite.c text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
gimptext-parasite.h text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
gimptext-path.c app: Rename app/core GimpVectors vectors API... 2024-07-13 05:07:57 +00:00
gimptext-path.h app: Rename app/core GimpVectors vectors API... 2024-07-13 05:07:57 +00:00
gimptext-xlfd.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimptext-xlfd.h Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimptext.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimptext.h Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimptextlayer-transform.c
gimptextlayer-transform.h
gimptextlayer-xcf.c text: Fix loading XCFs with XLFD fonts 2024-05-21 17:19:33 +01:00
gimptextlayer-xcf.h
gimptextlayer.c Issue #11021: cairo-ARGB32 uses "associated alpha", so changed the new formats accordingly. 2024-04-03 03:12:12 +05:30
gimptextlayer.h app: new storage format for the text layer parasite implies XCF version bump. 2023-09-12 14:23:40 +00:00
gimptextlayout-render.c
gimptextlayout-render.h
gimptextlayout.c app,libgimpcolor: drop babl if guards that no longer apply 2024-02-24 18:14:36 +01:00
gimptextlayout.h app, libgimp, pdb, plug-ins: GimpText* using GeglColor. 2024-02-11 23:28:02 +01:00
gimptextundo.c
gimptextundo.h
meson.build app: Rename app/core GimpVectors vectors API... 2024-07-13 05:07:57 +00:00
text-enums.c text: Add outline options to text editor 2022-10-12 22:00:40 +00:00
text-enums.h text: Add outline options to text editor 2022-10-12 22:00:40 +00:00
text-types.h