gimppdb: Allow more easy bindable API

Plug-ins that work from different bindings probably want to use their
own list-type to specify arguments, rather than working with a more
cumbersome `GimpValueArray`.

This new API should make it less verbose. For example:

```
args = Gimp.ValueArray.new(5)
args.insert(0, GObject.Value(Gimp.RunMode, Gimp.RunMode.NONINTERACTIVE))
args.insert(1, GObject.Value(Gimp.Image, image))
args.insert(2, GObject.Value(Gimp.Drawable, mask))
args.insert(3, GObject.Value(GObject.TYPE_INT, int(time.time())))
args.insert(4, GObject.Value(GObject.TYPE_DOUBLE, turbulence))
Gimp.get_pdb().run_procedure('plug-in-plasma', args)
```

becomes

```
Gimp.get_pdb().run_procedure('plug-in-plasma', [
    GObject.Value(Gimp.RunMode, Gimp.RunMode.NONINTERACTIVE),
    GObject.Value(Gimp.Image, image),
    GObject.Value(Gimp.Drawable, mask),
    GObject.Value(GObject.TYPE_INT, int(time.time())),
    GObject.Value(GObject.TYPE_DOUBLE, turbulence),
])
```
This commit is contained in:
Niels De Graef
2020-05-19 18:43:43 +02:00
committed by Jehan
parent ec26bc44ae
commit 43d0f0fbd2
12 changed files with 138 additions and 82 deletions

View File

@ -530,6 +530,7 @@ GimpValueArray
gimp_value_array_new
gimp_value_array_new_from_types
gimp_value_array_new_from_types_valist
gimp_value_array_new_from_values
gimp_value_array_ref
gimp_value_array_unref
gimp_value_array_length