app, libgimp*, modules, pdb, plug-ins: new GimpParamColor.

This is meant to obsolete GeglParamColor with at least an additional argument
has_alpha which we need in GIMP. It allows to advertize when a parameter wants
an opaque color, which in particular means we know when displaying a GUI to pick
colors with alpha or not.
This commit is contained in:
Jehan 2024-04-19 23:02:29 +02:00
parent cbb333c220
commit 2b27feb2fd
50 changed files with 526 additions and 162 deletions

View file

@ -296,20 +296,38 @@ G_BEGIN_DECLS
*/
#define GIMP_PROC_ARG_COLOR(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_argument (procedure,\
gegl_param_spec_color (name, nick, blurb,\
default, \
gimp_param_spec_color (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_PROC_AUX_ARG_COLOR(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_aux_argument (procedure,\
gegl_param_spec_color (name, nick, blurb,\
default, \
gimp_param_spec_color (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_PROC_VAL_COLOR(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_return_value (procedure,\
gegl_param_spec_color (name, nick, blurb,\
default, \
gimp_param_spec_color (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_PROC_ARG_COLOR_FROM_STRING(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_argument (procedure,\
gimp_param_spec_color_from_string (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_PROC_AUX_ARG_COLOR_FROM_STRING(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_aux_argument (procedure,\
gimp_param_spec_color_from_string (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_PROC_VAL_COLOR_FROM_STRING(procedure, name, nick, blurb, has_alpha, default, flags) \
gimp_procedure_add_return_value (procedure,\
gimp_param_spec_color_from_string (name, nick, blurb,\
has_alpha, default, \
flags))
#define GIMP_VALUES_GET_COLOR(args, n, value) \