gimp/app/paint
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
..
gimp-paint.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimp-paint.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpairbrush.c app: Fix extra drawing with airbrush tool on layers with offset 2023-07-24 15:55:30 +00:00
gimpairbrush.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpairbrushoptions.c app: increase the maximal airbrush stamp FPS 2020-02-13 18:47:03 +02:00
gimpairbrushoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpbrushcore-kernels.h app: small fix in gimpbrushcore-kernels.h 2019-02-06 16:51:01 -05:00
gimpbrushcore-loops.cc app, meson.build: fix a bunch of warnings in C++ files 2019-09-12 20:04:50 +03:00
gimpbrushcore-loops.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpbrushcore.c app: Fix layer expansion while painting with symmetry enabled 2023-11-25 16:19:43 +00:00
gimpbrushcore.h app: make painting possibly multi-drawable aware. 2021-09-14 17:59:47 +02:00
gimpclone.c app: make painting possibly multi-drawable aware. 2021-09-14 17:59:47 +02:00
gimpclone.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpcloneoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpcloneoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconvolve.c app: fix broken symmetry on offset layers 2023-07-24 15:55:30 +00:00
gimpconvolve.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpconvolveoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpconvolveoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpdodgeburn.c app: fix broken symmetry on offset layers 2023-07-24 15:55:30 +00:00
gimpdodgeburn.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpdodgeburnoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpdodgeburnoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimperaser.c app: get_paint_params() now uses GeglColor. 2024-02-11 23:28:03 +01:00
gimperaser.h app: derive GimpEraser from GimpPaintbrush 2019-05-26 14:47:44 -04:00
gimperaseroptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimperaseroptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpheal.c app: make painting possibly multi-drawable aware. 2021-09-14 17:59:47 +02:00
gimpheal.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpink-blob.c app: Layer expansion while using ink tool 2023-11-25 16:19:43 +00:00
gimpink-blob.h app: Layer expansion while using ink tool 2023-11-25 16:19:43 +00:00
gimpink.c app, libgimpconfig: color history is now space-invaded. 2024-02-11 23:28:03 +01:00
gimpink.h app: Layer expansion while using ink tool 2023-11-25 16:19:43 +00:00
gimpinkoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpinkoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpinkundo.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpinkundo.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpmybrushcore.c app: no more GimpRGB/GimpHSL/GimpHSV usage in paint code at all anymore. 2024-02-11 23:28:03 +01:00
gimpmybrushcore.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpmybrushoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpmybrushoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpmybrushsurface.c app: no more GimpRGB/GimpHSL/GimpHSV usage in paint code at all anymore. 2024-02-11 23:28:03 +01:00
gimpmybrushsurface.h app: Layer expansion with MyPaintBrush now works. 2023-11-25 16:19:43 +00:00
gimppaintbrush.c app: get_paint_params() now uses GeglColor. 2024-02-11 23:28:03 +01:00
gimppaintbrush.h app: get_paint_params() now uses GeglColor. 2024-02-11 23:28:03 +01:00
gimppaintcore-loops.cc app: fix "Luma Lighten/Darken only" layer modes. 2020-11-10 17:25:34 +01:00
gimppaintcore-loops.h app: use MASK_COMPONENTS algorithm in gimp_paint_core_{paste,replace}() 2019-02-16 09:56:30 -05:00
gimppaintcore-stroke.c app: Rename app/core GimpVectors vectors API... 2024-07-13 05:07:57 +00:00
gimppaintcore-stroke.h app: Rename app/core GimpVectors vectors API... 2024-07-13 05:07:57 +00:00
gimppaintcore.c app: port some of the paint and fill code to GeglColor. 2024-02-11 23:28:03 +01:00
gimppaintcore.h app: Blink lock when layer expansion is prevented by lock 2023-11-25 16:19:43 +00:00
gimppaintcoreundo.c app: big porting of weak pointers to g_set,clear_weak_pointer() 2023-05-22 18:16:09 +02:00
gimppaintcoreundo.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimppaintoptions.c Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimppaintoptions.h Issue #8900 and #9923: reimplementing GimpUnit as a proper class. 2024-08-02 10:46:38 +02:00
gimppencil.c Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimppencil.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimppenciloptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimppenciloptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpperspectiveclone.c app: rework and fix the logic for copy-pasting multiple drawables. 2022-11-12 18:28:58 +01:00
gimpperspectiveclone.h app: make Perspective Clone tool also work with multiple drawables. 2021-09-14 17:59:47 +02:00
gimpperspectivecloneoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpperspectivecloneoptions.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpsmudge.c app: no more GimpRGB/GimpHSL/GimpHSV usage in paint code at all anymore. 2024-02-11 23:28:03 +01:00
gimpsmudge.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
gimpsmudgeoptions.c libgimbase: merge gimpparam.h into gimpparamspecs.h 2019-07-31 10:16:21 +02:00
gimpsmudgeoptions.h Issue #1942 - Smudge Tool with Sample Merged Option 2019-01-20 17:48:04 +01:00
gimpsourcecore.c app: Fix layer expansion while painting with symmetry enabled 2023-11-25 16:19:43 +00:00
gimpsourcecore.h Issue #287: Impossible to stroke a path with the clone tool. 2022-02-04 23:25:38 +01:00
gimpsourceoptions.c app: rework and fix the logic for copy-pasting multiple drawables. 2022-11-12 18:28:58 +01:00
gimpsourceoptions.h Issue #287: Impossible to stroke a path with the clone tool. 2022-02-04 23:25:38 +01:00
meson.build meson: fix warnings of deprecated features. 2022-08-31 01:29:37 +02:00
paint-enums.c app, libgimp*: commit the newly generated *enums.c files. 2022-08-01 20:00:01 +02:00
paint-enums.h app: Blink lock when layer expansion is prevented by lock 2023-11-25 16:19:43 +00:00
paint-types.h Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00