app, libgimp, pdb, plug-ins: new GimpGroupLayer class in libgimp.

Also:

- renaming gimp_layer_group_new() to gimp_group_layer_new() in order to keep the
  same name as in core code (i.e. GimpGroupLayer, not GimpLayerGroup).
- renaming gimp_image_merge_layer_group() to gimp_group_layer_merge()
- new functions: gimp_procedure_add_group_layer_argument(),
  gimp_procedure_add_group_layer_aux_argument() and
  gimp_procedure_add_group_layer_return_value().

This can be tested, e.g. in Python with these calls:

```py
i = Gimp.get_images()[0]
g = Gimp.GroupLayer.new(i, "hello")
i.insert_layer(g, None, 1)
g2 = Gimp.GroupLayer.new(i, "world")
i.insert_layer(g2, g, 1)
g.merge()
```

This was work started long ago, stored in an old stash which I finally
finish now! :-)
This commit is contained in:
Jehan 2024-07-06 17:24:11 +02:00
parent 98d3956fef
commit b1736a6736
43 changed files with 1059 additions and 327 deletions

View file

@ -315,6 +315,18 @@ G_BEGIN_DECLS
g_value_set_object (gimp_value_array_index (args, n), value)
/* group layer */
#define GIMP_VALUES_GET_GROUP_LAYER(args, n) \
g_value_get_object (gimp_value_array_index (args, n))
#define GIMP_VALUES_GET_GROUP_LAYER_ID(args, n) \
gimp_item_get_id (g_value_get_object (gimp_value_array_index (args, n)))
#define GIMP_VALUES_SET_GROUP_LAYER(args, n, value) \
g_value_set_object (gimp_value_array_index (args, n), value)
/* channel */
#define GIMP_VALUES_GET_CHANNEL(args, n) \
@ -868,6 +880,25 @@ void gimp_procedure_add_text_layer_return_value (GimpProcedure *procedure
gboolean none_ok,
GParamFlags flags);
void gimp_procedure_add_group_layer_argument (GimpProcedure *procedure,
const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
void gimp_procedure_add_group_layer_aux_argument (GimpProcedure *procedure,
const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
void gimp_procedure_add_group_layer_return_value (GimpProcedure *procedure,
const gchar *name,
const gchar *nick,
const gchar *blurb,
gboolean none_ok,
GParamFlags flags);
void gimp_procedure_add_channel_argument (GimpProcedure *procedure,
const gchar *name,
const gchar *nick,