[gimp] Use GimpValueArray and GimpParamSpecValueArray



commit 7610e299ae5752fb43938e09930497696159718c
Author: Michael Natterer <mitch gimp org>
Date:   Fri May 4 00:50:23 2012 +0200

    Use GimpValueArray and GimpParamSpecValueArray
    
    instead of the deprecated stuff from GLib.

 app/actions/plug-in-commands.c          |  162 ++--
 app/actions/vectors-commands.c          |   21 +-
 app/batch.c                             |   26 +-
 app/core/gimp-utils.c                   |   13 -
 app/core/gimp-utils.h                   |    3 -
 app/core/gimpcurve.c                    |   64 +-
 app/core/gimpdashpattern.c              |   26 +-
 app/core/gimpdashpattern.h              |   24 +-
 app/core/gimppdbprogress.c              |   15 +-
 app/core/gimpstrokeoptions.c            |   17 +-
 app/file/file-open.c                    |   53 +-
 app/file/file-save.c                    |    8 +-
 app/pdb/brush-cmds.c                    |  426 +++++----
 app/pdb/brush-select-cmds.c             |   62 +-
 app/pdb/brushes-cmds.c                  |  118 ++--
 app/pdb/buffer-cmds.c                   |  128 ++--
 app/pdb/channel-cmds.c                  |  194 ++--
 app/pdb/color-cmds.c                    |  308 +++---
 app/pdb/context-cmds.c                  | 1110 +++++++++++-----------
 app/pdb/convert-cmds.c                  |   92 +-
 app/pdb/display-cmds.c                  |   98 +-
 app/pdb/drawable-cmds.c                 |  492 +++++-----
 app/pdb/drawable-transform-cmds.c       |  544 ++++++------
 app/pdb/dynamics-cmds.c                 |   34 +-
 app/pdb/edit-cmds.c                     |  356 ++++----
 app/pdb/fileops-cmds.c                  |  256 +++---
 app/pdb/floating-sel-cmds.c             |   84 +-
 app/pdb/font-select-cmds.c              |   50 +-
 app/pdb/fonts-cmds.c                    |   34 +-
 app/pdb/gimp-cmds.c                     |  112 ++--
 app/pdb/gimppdb.c                       |   43 +-
 app/pdb/gimppdb.h                       |   64 +-
 app/pdb/gimpprocedure.c                 |  145 ++--
 app/pdb/gimpprocedure.h                 |  152 ++--
 app/pdb/gimprc-cmds.c                   |  134 ++--
 app/pdb/gradient-cmds.c                 |  622 ++++++------
 app/pdb/gradient-select-cmds.c          |   52 +-
 app/pdb/gradients-cmds.c                |  106 ++-
 app/pdb/grid-cmds.c                     |  180 ++--
 app/pdb/guides-cmds.c                   |  118 ++--
 app/pdb/help-cmds.c                     |   18 +-
 app/pdb/image-cmds.c                    | 1588 ++++++++++++++++---------------
 app/pdb/image-select-cmds.c             |  158 ++--
 app/pdb/item-cmds.c                     |  476 +++++-----
 app/pdb/item-transform-cmds.c           |  254 +++---
 app/pdb/layer-cmds.c                    |  564 ++++++------
 app/pdb/message-cmds.c                  |   46 +-
 app/pdb/paint-tools-cmds.c              |  346 ++++----
 app/pdb/palette-cmds.c                  |  276 +++---
 app/pdb/palette-select-cmds.c           |   50 +-
 app/pdb/palettes-cmds.c                 |   76 +-
 app/pdb/paths-cmds.c                    |  298 +++---
 app/pdb/pattern-cmds.c                  |   50 +-
 app/pdb/pattern-select-cmds.c           |   50 +-
 app/pdb/patterns-cmds.c                 |   82 +-
 app/pdb/plug-in-cmds.c                  |  184 ++--
 app/pdb/plug-in-compat-cmds.c           |   90 +-
 app/pdb/procedural-db-cmds.c            |  218 +++---
 app/pdb/progress-cmds.c                 |  128 ++--
 app/pdb/selection-cmds.c                |  290 +++---
 app/pdb/selection-tools-cmds.c          |  250 +++---
 app/pdb/text-layer-cmds.c               |  546 ++++++------
 app/pdb/text-tool-cmds.c                |  126 ++--
 app/pdb/transform-tools-cmds.c          |  166 ++--
 app/pdb/undo-cmds.c                     |  120 ++--
 app/pdb/unit-cmds.c                     |  224 +++---
 app/pdb/vectors-cmds.c                  |  586 ++++++------
 app/plug-in/gimpplugin-message.c        |   10 +-
 app/plug-in/gimpplugin-progress.c       |    6 +-
 app/plug-in/gimppluginmanager-call.c    |   20 +-
 app/plug-in/gimppluginmanager-call.h    |   36 +-
 app/plug-in/gimppluginmanager-restore.c |   12 +-
 app/plug-in/gimppluginprocedure.c       |   73 +-
 app/plug-in/gimppluginprocedure.h       |    2 +-
 app/plug-in/gimppluginprocframe.c       |   24 +-
 app/plug-in/gimppluginprocframe.h       |    4 +-
 app/plug-in/gimptemporaryprocedure.c    |   62 +-
 app/plug-in/plug-in-icc-profile.c       |   46 +-
 app/plug-in/plug-in-params.c            |   35 +-
 app/plug-in/plug-in-params.h            |   16 +-
 app/vectors/gimpstroke.c                |   43 +-
 app/widgets/gimpbrushselect.c           |   51 +-
 app/widgets/gimpdeviceinfo.c            |   64 +-
 app/widgets/gimpfontselect.c            |   13 +-
 app/widgets/gimpgradientselect.c        |   23 +-
 app/widgets/gimphelp.c                  |   63 +-
 app/widgets/gimppaletteselect.c         |   13 +-
 app/widgets/gimppatternselect.c         |   19 +-
 app/widgets/gimppdbdialog.c             |   10 +-
 app/widgets/gimppdbdialog.h             |    8 +-
 app/xcf/xcf-load.c                      |   14 +-
 app/xcf/xcf.c                           |   82 +-
 libgimpconfig/gimpconfig-deserialize.c  |   20 +-
 libgimpconfig/gimpconfig-serialize.c    |   13 +-
 tools/pdbgen/app.pl                     |   19 +-
 tools/pdbgen/pdb/fileops.pdb            |   38 +-
 96 files changed, 7410 insertions(+), 7235 deletions(-)
---
diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c
index eb97f1d..668b4b1 100644
--- a/app/actions/plug-in-commands.c
+++ b/app/actions/plug-in-commands.c
@@ -22,6 +22,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "actions-types.h"
@@ -65,33 +66,33 @@
 static void  plug_in_procedure_execute     (GimpPlugInProcedure *procedure,
                                             Gimp                *gimp,
                                             GimpDisplay         *display,
-                                            GValueArray         *args,
+                                            GimpValueArray      *args,
                                             gint                 n_args);
 
-static gint  plug_in_collect_data_args     (GtkAction    *action,
-                                            GimpObject   *object,
-                                            GParamSpec  **pspecs,
-                                            GValueArray  *args,
-                                            gint          n_args);
-static gint  plug_in_collect_image_args    (GtkAction    *action,
-                                            GimpImage    *image,
-                                            GParamSpec  **pspecs,
-                                            GValueArray  *args,
-                                            gint          n_args);
-static gint  plug_in_collect_item_args     (GtkAction    *action,
-                                            GimpImage    *image,
-                                            GimpItem     *item,
-                                            GParamSpec  **pspecs,
-                                            GValueArray  *args,
-                                            gint          n_args);
-static gint  plug_in_collect_display_args  (GtkAction    *action,
-                                            GimpDisplay  *display,
-                                            GParamSpec  **pspecs,
-                                            GValueArray  *args,
-                                            gint          n_args);
-static void  plug_in_reset_all_response    (GtkWidget    *dialog,
-                                            gint          response_id,
-                                            Gimp         *gimp);
+static gint  plug_in_collect_data_args     (GtkAction       *action,
+                                            GimpObject      *object,
+                                            GParamSpec     **pspecs,
+                                            GimpValueArray  *args,
+                                            gint             n_args);
+static gint  plug_in_collect_image_args    (GtkAction       *action,
+                                            GimpImage       *image,
+                                            GParamSpec     **pspecs,
+                                            GimpValueArray  *args,
+                                            gint             n_args);
+static gint  plug_in_collect_item_args     (GtkAction       *action,
+                                            GimpImage       *image,
+                                            GimpItem        *item,
+                                            GParamSpec     **pspecs,
+                                            GimpValueArray  *args,
+                                            gint             n_args);
+static gint  plug_in_collect_display_args  (GtkAction       *action,
+                                            GimpDisplay     *display,
+                                            GParamSpec     **pspecs,
+                                            GimpValueArray  *args,
+                                            gint             n_args);
+static void  plug_in_reset_all_response    (GtkWidget       *dialog,
+                                            gint             response_id,
+                                            Gimp            *gimp);
 
 
 /*  public functions  */
@@ -101,17 +102,18 @@ plug_in_run_cmd_callback (GtkAction           *action,
                           GimpPlugInProcedure *proc,
                           gpointer             data)
 {
-  GimpProcedure *procedure = GIMP_PROCEDURE (proc);
-  Gimp          *gimp;
-  GValueArray   *args;
-  gint           n_args    = 0;
-  GimpDisplay   *display   = NULL;
+  GimpProcedure  *procedure = GIMP_PROCEDURE (proc);
+  Gimp           *gimp;
+  GimpValueArray *args;
+  gint            n_args    = 0;
+  GimpDisplay    *display   = NULL;
   return_if_no_gimp (gimp, data);
 
   args = gimp_procedure_get_arguments (procedure);
 
   /* initialize the first argument  */
-  g_value_set_int (&args->values[n_args], GIMP_RUN_INTERACTIVE);
+  g_value_set_int (gimp_value_array_index (args, n_args),
+                   GIMP_RUN_INTERACTIVE);
   n_args++;
 
   switch (procedure->proc_type)
@@ -188,7 +190,7 @@ plug_in_run_cmd_callback (GtkAction           *action,
   if (n_args >= 1)
     plug_in_procedure_execute (proc, gimp, display, args, n_args);
 
-  g_value_array_free (args);
+  gimp_value_array_unref (args);
 }
 
 void
@@ -209,12 +211,12 @@ plug_in_repeat_cmd_callback (GtkAction *action,
 
   if (procedure)
     {
-      GValueArray *args;
-      gint         n_args;
+      GimpValueArray *args;
+      gint            n_args;
 
       args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
 
-      g_value_set_int (&args->values[0], run_mode);
+      g_value_set_int (gimp_value_array_index (args, 0), run_mode);
 
       n_args = plug_in_collect_display_args (action, display,
                                              GIMP_PROCEDURE (procedure)->args,
@@ -222,7 +224,7 @@ plug_in_repeat_cmd_callback (GtkAction *action,
 
       plug_in_procedure_execute (procedure, gimp, display, args, n_args);
 
-      g_value_array_free (args);
+      gimp_value_array_unref (args);
     }
 }
 
@@ -231,16 +233,16 @@ plug_in_history_cmd_callback (GtkAction           *action,
                               GimpPlugInProcedure *procedure,
                               gpointer             data)
 {
-  Gimp        *gimp;
-  GimpDisplay *display;
-  GValueArray *args;
-  gint         n_args;
+  Gimp           *gimp;
+  GimpDisplay    *display;
+  GimpValueArray *args;
+  gint            n_args;
   return_if_no_gimp (gimp, data);
   return_if_no_display (display, data);
 
   args = gimp_procedure_get_arguments (GIMP_PROCEDURE (procedure));
 
-  g_value_set_int (&args->values[0], GIMP_RUN_INTERACTIVE);
+  g_value_set_int (gimp_value_array_index (args, 0), GIMP_RUN_INTERACTIVE);
 
   n_args = plug_in_collect_display_args (action, display,
                                          GIMP_PROCEDURE (procedure)->args,
@@ -248,7 +250,7 @@ plug_in_history_cmd_callback (GtkAction           *action,
 
   plug_in_procedure_execute (procedure, gimp, display, args, n_args);
 
-  g_value_array_free (args);
+  gimp_value_array_unref (args);
 }
 
 void
@@ -291,7 +293,7 @@ static void
 plug_in_procedure_execute (GimpPlugInProcedure *procedure,
                            Gimp                *gimp,
                            GimpDisplay         *display,
-                           GValueArray         *args,
+                           GimpValueArray      *args,
                            gint                 n_args)
 {
   GError *error = NULL;
@@ -323,18 +325,18 @@ plug_in_procedure_execute (GimpPlugInProcedure *procedure,
 }
 
 static gint
-plug_in_collect_data_args (GtkAction    *action,
-                           GimpObject   *object,
-                           GParamSpec  **pspecs,
-                           GValueArray  *args,
-                           gint          n_args)
+plug_in_collect_data_args (GtkAction       *action,
+                           GimpObject      *object,
+                           GParamSpec     **pspecs,
+                           GimpValueArray  *args,
+                           gint             n_args)
 {
-  if (args->n_values > n_args &&
+  if (gimp_value_array_length (args) > n_args &&
       GIMP_IS_PARAM_SPEC_STRING (pspecs[n_args]))
     {
       if (object)
         {
-          g_value_set_string (&args->values[n_args],
+          g_value_set_string (gimp_value_array_index (args, n_args),
                               gimp_object_get_name (object));
           n_args++;
         }
@@ -349,18 +351,18 @@ plug_in_collect_data_args (GtkAction    *action,
 }
 
 static gint
-plug_in_collect_image_args (GtkAction    *action,
-                            GimpImage    *image,
-                            GParamSpec  **pspecs,
-                            GValueArray  *args,
-                            gint          n_args)
+plug_in_collect_image_args (GtkAction       *action,
+                            GimpImage       *image,
+                            GParamSpec     **pspecs,
+                            GimpValueArray  *args,
+                            gint             n_args)
 {
-  if (args->n_values > n_args &&
+  if (gimp_value_array_length (args) > n_args &&
       GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
     {
       if (image)
         {
-          gimp_value_set_image (&args->values[n_args], image);
+          gimp_value_set_image (gimp_value_array_index (args, n_args), image);
           n_args++;
         }
       else
@@ -374,29 +376,30 @@ plug_in_collect_image_args (GtkAction    *action,
 }
 
 static gint
-plug_in_collect_item_args (GtkAction    *action,
-                           GimpImage    *image,
-                           GimpItem     *item,
-                           GParamSpec  **pspecs,
-                           GValueArray  *args,
-                           gint          n_args)
+plug_in_collect_item_args (GtkAction       *action,
+                           GimpImage       *image,
+                           GimpItem        *item,
+                           GParamSpec     **pspecs,
+                           GimpValueArray  *args,
+                           gint             n_args)
 {
-  if (args->n_values > n_args &&
+  if (gimp_value_array_length (args) > n_args &&
       GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
     {
       if (image)
         {
-          gimp_value_set_image (&args->values[n_args], image);
+          gimp_value_set_image (gimp_value_array_index (args, n_args), image);
           n_args++;
 
-          if (args->n_values > n_args &&
+          if (gimp_value_array_length (args) > n_args &&
               GIMP_IS_PARAM_SPEC_ITEM_ID (pspecs[n_args]))
             {
               if (item &&
                   g_type_is_a (G_TYPE_FROM_INSTANCE (item),
                                GIMP_PARAM_SPEC_ITEM_ID (pspecs[n_args])->item_type))
                 {
-                  gimp_value_set_item (&args->values[n_args], item);
+                  gimp_value_set_item (gimp_value_array_index (args, n_args),
+                                       item);
                   n_args++;
                 }
               else
@@ -412,18 +415,19 @@ plug_in_collect_item_args (GtkAction    *action,
 }
 
 static gint
-plug_in_collect_display_args (GtkAction    *action,
-                              GimpDisplay  *display,
-                              GParamSpec  **pspecs,
-                              GValueArray  *args,
-                              gint          n_args)
+plug_in_collect_display_args (GtkAction       *action,
+                              GimpDisplay     *display,
+                              GParamSpec     **pspecs,
+                              GimpValueArray  *args,
+                              gint             n_args)
 {
-  if (args->n_values > n_args &&
+  if (gimp_value_array_length (args) > n_args &&
       GIMP_IS_PARAM_SPEC_DISPLAY_ID (pspecs[n_args]))
     {
       if (display)
         {
-          gimp_value_set_display (&args->values[n_args], GIMP_OBJECT (display));
+          gimp_value_set_display (gimp_value_array_index (args, n_args),
+                                  GIMP_OBJECT (display));
           n_args++;
         }
       else
@@ -433,24 +437,26 @@ plug_in_collect_display_args (GtkAction    *action,
         }
     }
 
-  if (args->n_values > n_args &&
+  if (gimp_value_array_length (args) > n_args &&
       GIMP_IS_PARAM_SPEC_IMAGE_ID (pspecs[n_args]))
     {
       GimpImage *image = display ? gimp_display_get_image (display) : NULL;
 
       if (image)
         {
-          gimp_value_set_image (&args->values[n_args], image);
+          gimp_value_set_image (gimp_value_array_index (args, n_args),
+                                image);
           n_args++;
 
-          if (args->n_values > n_args &&
+          if (gimp_value_array_length (args) > n_args &&
               GIMP_IS_PARAM_SPEC_DRAWABLE_ID (pspecs[n_args]))
             {
               GimpDrawable *drawable = gimp_image_get_active_drawable (image);
 
               if (drawable)
                 {
-                  gimp_value_set_drawable (&args->values[n_args], drawable);
+                  gimp_value_set_drawable (gimp_value_array_index (args, n_args),
+                                           drawable);
                   n_args++;
                 }
               else
diff --git a/app/actions/vectors-commands.c b/app/actions/vectors-commands.c
index 5a6c1b5..81a85ab 100644
--- a/app/actions/vectors-commands.c
+++ b/app/actions/vectors-commands.c
@@ -22,6 +22,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "actions-types.h"
@@ -317,12 +318,12 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
                                            gint       value,
                                            gpointer   data)
 {
-  GimpImage     *image;
-  GtkWidget     *widget;
-  GimpProcedure *procedure;
-  GValueArray   *args;
-  GimpDisplay   *display;
-  GError        *error = NULL;
+  GimpImage      *image;
+  GtkWidget      *widget;
+  GimpProcedure  *procedure;
+  GimpValueArray *args;
+  GimpDisplay    *display;
+  GError         *error = NULL;
   return_if_no_image (image, data);
   return_if_no_widget (widget, data);
 
@@ -346,15 +347,17 @@ vectors_selection_to_vectors_cmd_callback (GtkAction *action,
   args = gimp_procedure_get_arguments (procedure);
   gimp_value_array_truncate (args, 2);
 
-  g_value_set_int      (&args->values[0], GIMP_RUN_INTERACTIVE);
-  gimp_value_set_image (&args->values[1], image);
+  g_value_set_int      (gimp_value_array_index (args, 0),
+                        GIMP_RUN_INTERACTIVE);
+  gimp_value_set_image (gimp_value_array_index (args, 1),
+                        image);
 
   gimp_procedure_execute_async (procedure, image->gimp,
                                 action_data_get_context (data),
                                 GIMP_PROGRESS (display), args,
                                 GIMP_OBJECT (display), &error);
 
-  g_value_array_free (args);
+  gimp_value_array_unref (args);
 
   if (error)
     {
diff --git a/app/batch.c b/app/batch.c
index 3318c37..4fe3e32 100644
--- a/app/batch.c
+++ b/app/batch.c
@@ -22,6 +22,8 @@
 
 #include <gegl.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "core/core-types.h"
 
 #include "base/tile-swap.h"
@@ -144,18 +146,20 @@ batch_run_cmd (Gimp          *gimp,
                GimpRunMode    run_mode,
                const gchar   *cmd)
 {
-  GValueArray *args;
-  GValueArray *return_vals;
-  GError      *error = NULL;
-  gint         i     = 0;
+  GimpValueArray *args;
+  GimpValueArray *return_vals;
+  GError         *error = NULL;
+  gint            i     = 0;
 
   args = gimp_procedure_get_arguments (procedure);
 
-  if (procedure->num_args > i && GIMP_IS_PARAM_SPEC_INT32 (procedure->args[i]))
-    g_value_set_int (&args->values[i++], run_mode);
+  if (procedure->num_args > i &&
+      GIMP_IS_PARAM_SPEC_INT32 (procedure->args[i]))
+    g_value_set_int (gimp_value_array_index (args, i++), run_mode);
 
-  if (procedure->num_args > i && GIMP_IS_PARAM_SPEC_STRING (procedure->args[i]))
-    g_value_set_static_string (&args->values[i++], cmd);
+  if (procedure->num_args > i &&
+      GIMP_IS_PARAM_SPEC_STRING (procedure->args[i]))
+    g_value_set_static_string (gimp_value_array_index (args, i++), cmd);
 
   return_vals =
     gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -163,7 +167,7 @@ batch_run_cmd (Gimp          *gimp,
                                              NULL, &error,
                                              proc_name, args);
 
-  switch (g_value_get_enum (&return_vals->values[0]))
+  switch (g_value_get_enum (gimp_value_array_index (return_vals, 0)))
     {
     case GIMP_PDB_EXECUTION_ERROR:
       if (error)
@@ -194,8 +198,8 @@ batch_run_cmd (Gimp          *gimp,
       break;
     }
 
-  g_value_array_free (return_vals);
-  g_value_array_free (args);
+  gimp_value_array_unref (return_vals);
+  gimp_value_array_unref (args);
 
   if (error)
     g_error_free (error);
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 34801bb..71478ea 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -588,19 +588,6 @@ gimp_parameters_free (GParameter *params,
     }
 }
 
-void
-gimp_value_array_truncate (GValueArray  *args,
-                           gint          n_values)
-{
-  gint i;
-
-  g_return_if_fail (args != NULL);
-  g_return_if_fail (n_values > 0 && n_values <= args->n_values);
-
-  for (i = args->n_values; i > n_values; i--)
-    g_value_array_remove (args, i - 1);
-}
-
 /*  markup unescape code stolen and adapted from gmarkup.c
  */
 static gchar *
diff --git a/app/core/gimp-utils.h b/app/core/gimp-utils.h
index dc8cdc4..ffa19df 100644
--- a/app/core/gimp-utils.h
+++ b/app/core/gimp-utils.h
@@ -76,9 +76,6 @@ GParameter * gimp_parameters_append_valist         (GType            object_type
 void         gimp_parameters_free                  (GParameter      *params,
                                                     gint             n_params);
 
-void         gimp_value_array_truncate             (GValueArray     *args,
-                                                    gint             n_values);
-
 gchar      * gimp_markup_extract_text              (const gchar     *markup);
 
 const gchar* gimp_enum_get_value_name              (GType            enum_type,
diff --git a/app/core/gimpcurve.c b/app/core/gimpcurve.c
index e6df335..692ff50 100644
--- a/app/core/gimpcurve.c
+++ b/app/core/gimpcurve.c
@@ -22,6 +22,7 @@
 
 #include <gegl.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpmath/gimpmath.h"
 #include "libgimpconfig/gimpconfig.h"
 
@@ -30,6 +31,7 @@
 #include "gimpcurve.h"
 #include "gimpcurve-load.h"
 #include "gimpcurve-save.h"
+#include "gimpparamspecs.h"
 
 #include "gimp-intl.h"
 
@@ -159,11 +161,11 @@ gimp_curve_class_init (GimpCurveClass *klass)
   array_spec = g_param_spec_double ("point", NULL, NULL,
                                     -1.0, 1.0, 0.0, GIMP_PARAM_READWRITE);
   g_object_class_install_property (object_class, PROP_POINTS,
-                                   g_param_spec_value_array ("points",
-                                                             NULL, NULL,
-                                                             array_spec,
-                                                             GIMP_PARAM_STATIC_STRINGS |
-                                                             GIMP_CONFIG_PARAM_FLAGS));
+                                   gimp_param_spec_value_array ("points",
+                                                                NULL, NULL,
+                                                                array_spec,
+                                                                GIMP_PARAM_STATIC_STRINGS |
+                                                                GIMP_CONFIG_PARAM_FLAGS));
 
   GIMP_CONFIG_INSTALL_PROP_INT  (object_class, PROP_N_SAMPLES,
                                  "n-samples",
@@ -173,11 +175,11 @@ gimp_curve_class_init (GimpCurveClass *klass)
   array_spec = g_param_spec_double ("sample", NULL, NULL,
                                     0.0, 1.0, 0.0, GIMP_PARAM_READWRITE);
   g_object_class_install_property (object_class, PROP_SAMPLES,
-                                   g_param_spec_value_array ("samples",
-                                                             NULL, NULL,
-                                                             array_spec,
-                                                             GIMP_PARAM_STATIC_STRINGS |
-                                                             GIMP_CONFIG_PARAM_FLAGS));
+                                   gimp_param_spec_value_array ("samples",
+                                                                NULL, NULL,
+                                                                array_spec,
+                                                                GIMP_PARAM_STATIC_STRINGS |
+                                                                GIMP_CONFIG_PARAM_FLAGS));
 }
 
 static void
@@ -240,16 +242,19 @@ gimp_curve_set_property (GObject      *object,
 
     case PROP_POINTS:
       {
-        GValueArray *array = g_value_get_boxed (value);
-        gint         i;
+        GimpValueArray *array = g_value_get_boxed (value);
+        gint            length;
+        gint            i;
 
         if (! array)
           break;
 
-        for (i = 0; i < curve->n_points && i * 2 < array->n_values; i++)
+        length = gimp_value_array_length (array);
+
+        for (i = 0; i < curve->n_points && i * 2 < length; i++)
           {
-            GValue *x = g_value_array_get_nth (array, i * 2);
-            GValue *y = g_value_array_get_nth (array, i * 2 + 1);
+            GValue *x = gimp_value_array_index (array, i * 2);
+            GValue *y = gimp_value_array_index (array, i * 2 + 1);
 
             curve->points[i].x = g_value_get_double (x);
             curve->points[i].y = g_value_get_double (y);
@@ -263,15 +268,18 @@ gimp_curve_set_property (GObject      *object,
 
     case PROP_SAMPLES:
       {
-        GValueArray *array = g_value_get_boxed (value);
-        gint         i;
+        GimpValueArray *array = g_value_get_boxed (value);
+        gint            length;
+        gint            i;
 
         if (! array)
           break;
 
-        for (i = 0; i < curve->n_samples && i < array->n_values; i++)
+        length = gimp_value_array_length (array);
+
+        for (i = 0; i < curve->n_samples && i < length; i++)
           {
-            GValue *v = g_value_array_get_nth (array, i);
+            GValue *v = gimp_value_array_index (array, i);
 
             curve->samples[i] = g_value_get_double (v);
           }
@@ -304,19 +312,19 @@ gimp_curve_get_property (GObject    *object,
 
     case PROP_POINTS:
       {
-        GValueArray *array = g_value_array_new (curve->n_points * 2);
-        GValue       v     = { 0, };
-        gint         i;
+        GimpValueArray *array = gimp_value_array_new (curve->n_points * 2);
+        GValue          v     = { 0, };
+        gint            i;
 
         g_value_init (&v, G_TYPE_DOUBLE);
 
         for (i = 0; i < curve->n_points; i++)
           {
             g_value_set_double (&v, curve->points[i].x);
-            g_value_array_append (array, &v);
+            gimp_value_array_append (array, &v);
 
             g_value_set_double (&v, curve->points[i].y);
-            g_value_array_append (array, &v);
+            gimp_value_array_append (array, &v);
           }
 
         g_value_unset (&v);
@@ -331,16 +339,16 @@ gimp_curve_get_property (GObject    *object,
 
     case PROP_SAMPLES:
       {
-        GValueArray *array = g_value_array_new (curve->n_samples);
-        GValue       v     = { 0, };
-        gint         i;
+        GimpValueArray *array = gimp_value_array_new (curve->n_samples);
+        GValue          v     = { 0, };
+        gint            i;
 
         g_value_init (&v, G_TYPE_DOUBLE);
 
         for (i = 0; i < curve->n_samples; i++)
           {
             g_value_set_double (&v, curve->samples[i]);
-            g_value_array_append (array, &v);
+            gimp_value_array_append (array, &v);
           }
 
         g_value_unset (&v);
diff --git a/app/core/gimpdashpattern.c b/app/core/gimpdashpattern.c
index f925d11..736620f 100644
--- a/app/core/gimpdashpattern.c
+++ b/app/core/gimpdashpattern.c
@@ -23,6 +23,8 @@
 
 #include <glib-object.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "core-types.h"
 
 #include "gimpdashpattern.h"
@@ -214,23 +216,25 @@ gimp_dash_pattern_fill_segments (GArray   *pattern,
 }
 
 GArray *
-gimp_dash_pattern_from_value_array (GValueArray *value_array)
+gimp_dash_pattern_from_value_array (GimpValueArray *value_array)
 {
-  if (value_array == NULL || value_array->n_values == 0)
+  if (value_array == NULL || gimp_value_array_length (value_array) == 0)
     {
       return NULL;
     }
   else
     {
       GArray *pattern;
+      gint    length;
       gint    i;
 
-      pattern = g_array_sized_new (FALSE, FALSE,
-                                   sizeof (gdouble), value_array->n_values);
+      length = gimp_value_array_length (value_array);
+
+      pattern = g_array_sized_new (FALSE, FALSE, sizeof (gdouble), length);
 
-      for (i = 0; i < value_array->n_values; i++)
+      for (i = 0; i < length; i++)
         {
-          GValue *item = g_value_array_get_nth (value_array, i);
+          GValue *item = gimp_value_array_index (value_array, i);
           gdouble val;
 
           g_return_val_if_fail (G_VALUE_HOLDS_DOUBLE (item), NULL);
@@ -244,7 +248,7 @@ gimp_dash_pattern_from_value_array (GValueArray *value_array)
     }
 }
 
-GValueArray *
+GimpValueArray *
 gimp_dash_pattern_to_value_array (GArray *pattern)
 {
   if (pattern == NULL || pattern->len == 0)
@@ -253,16 +257,16 @@ gimp_dash_pattern_to_value_array (GArray *pattern)
     }
   else
     {
-      GValueArray *value_array = g_value_array_new (pattern->len);
-      GValue       item        = { 0, };
-      gint         i;
+      GimpValueArray *value_array = gimp_value_array_new (pattern->len);
+      GValue          item        = { 0, };
+      gint            i;
 
       g_value_init (&item, G_TYPE_DOUBLE);
 
       for (i = 0; i < pattern->len; i++)
         {
           g_value_set_double (&item, g_array_index (pattern, gdouble, i));
-          g_value_array_append (value_array, &item);
+          gimp_value_array_append (value_array, &item);
         }
 
       g_value_unset (&item);
diff --git a/app/core/gimpdashpattern.h b/app/core/gimpdashpattern.h
index 0197069..24821c2 100644
--- a/app/core/gimpdashpattern.h
+++ b/app/core/gimpdashpattern.h
@@ -27,22 +27,22 @@
 #define GIMP_VALUE_HOLDS_DASH_PATTERN(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_DASH_PATTERN))
 
 
-GType         gimp_dash_pattern_get_type          (void) G_GNUC_CONST;
+GType            gimp_dash_pattern_get_type          (void) G_GNUC_CONST;
 
-GArray      * gimp_dash_pattern_new_from_preset   (GimpDashPreset  preset);
-GArray      * gimp_dash_pattern_new_from_segments (const gboolean *segments,
-                                                   gint            n_segments,
-                                                   gdouble         dash_length);
+GArray         * gimp_dash_pattern_new_from_preset   (GimpDashPreset  preset);
+GArray         * gimp_dash_pattern_new_from_segments (const gboolean *segments,
+                                                      gint            n_segments,
+                                                      gdouble         dash_length);
 
-void          gimp_dash_pattern_fill_segments     (GArray         *pattern,
-                                                   gboolean       *segments,
-                                                   gint            n_segments);
+void             gimp_dash_pattern_fill_segments     (GArray         *pattern,
+                                                      gboolean       *segments,
+                                                      gint            n_segments);
 
-GArray      * gimp_dash_pattern_from_value_array  (GValueArray    *value_array);
-GValueArray * gimp_dash_pattern_to_value_array    (GArray         *pattern);
+GArray         * gimp_dash_pattern_from_value_array  (GimpValueArray *value_array);
+GimpValueArray * gimp_dash_pattern_to_value_array    (GArray         *pattern);
 
-GArray      * gimp_dash_pattern_copy              (GArray         *pattern);
-void          gimp_dash_pattern_free              (GArray         *pattern);
+GArray         * gimp_dash_pattern_copy              (GArray         *pattern);
+void             gimp_dash_pattern_free              (GArray         *pattern);
 
 
 #endif  /*  __GIMP_DASH_PATTERN_H__  */
diff --git a/app/core/gimppdbprogress.c b/app/core/gimppdbprogress.c
index 648ea58..8be295c 100644
--- a/app/core/gimppdbprogress.c
+++ b/app/core/gimppdbprogress.c
@@ -24,6 +24,8 @@
 
 #include <gegl.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "core-types.h"
 
 #include "core/gimpcontext.h"
@@ -259,7 +261,7 @@ gimp_pdb_progress_run_callback (GimpPdbProgress     *progress,
 
   if (progress->callback_name && ! progress->callback_busy)
     {
-      GValueArray *return_vals;
+      GimpValueArray *return_vals;
 
       progress->callback_busy = TRUE;
 
@@ -273,20 +275,21 @@ gimp_pdb_progress_run_callback (GimpPdbProgress     *progress,
                                             G_TYPE_DOUBLE,   value,
                                             G_TYPE_NONE);
 
-      if (g_value_get_enum (&return_vals->values[0]) != GIMP_PDB_SUCCESS)
+      if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) !=
+          GIMP_PDB_SUCCESS)
         {
           gimp_message (progress->context->gimp, NULL, GIMP_MESSAGE_ERROR,
                         _("Unable to run %s callback. "
                           "The corresponding plug-in may have crashed."),
                         g_type_name (G_TYPE_FROM_INSTANCE (progress)));
         }
-      else if (return_vals->n_values >= 2 &&
-               G_VALUE_HOLDS_DOUBLE (&return_vals->values[1]))
+      else if (gimp_value_array_length (return_vals) >= 2 &&
+               G_VALUE_HOLDS_DOUBLE (gimp_value_array_index (return_vals, 1)))
         {
-          retval = g_value_get_double (&return_vals->values[1]);
+          retval = g_value_get_double (gimp_value_array_index (return_vals, 1));
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       progress->callback_busy = FALSE;
     }
diff --git a/app/core/gimpstrokeoptions.c b/app/core/gimpstrokeoptions.c
index 2785e80..bf385c4 100644
--- a/app/core/gimpstrokeoptions.c
+++ b/app/core/gimpstrokeoptions.c
@@ -36,6 +36,7 @@
 #include "gimpdashpattern.h"
 #include "gimpmarshal.h"
 #include "gimppaintinfo.h"
+#include "gimpparamspecs.h"
 #include "gimpstrokeoptions.h"
 
 #include "paint/gimppaintoptions.h"
@@ -193,11 +194,11 @@ gimp_stroke_options_class_init (GimpStrokeOptionsClass *klass)
   array_spec = g_param_spec_double ("dash-length", NULL, NULL,
                                     0.0, 2000.0, 1.0, GIMP_PARAM_READWRITE);
   g_object_class_install_property (object_class, PROP_DASH_INFO,
-                                   g_param_spec_value_array ("dash-info",
-                                                             NULL, NULL,
-                                                             array_spec,
-                                                             GIMP_PARAM_STATIC_STRINGS |
-                                                             GIMP_CONFIG_PARAM_FLAGS));
+                                   gimp_param_spec_value_array ("dash-info",
+                                                                NULL, NULL,
+                                                                array_spec,
+                                                                GIMP_PARAM_STATIC_STRINGS |
+                                                                GIMP_CONFIG_PARAM_FLAGS));
 
   GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_PAINT_OPTIONS,
                                    "paint-options", NULL,
@@ -286,8 +287,8 @@ gimp_stroke_options_set_property (GObject      *object,
       break;
     case PROP_DASH_INFO:
       {
-        GValueArray *value_array = g_value_get_boxed (value);
-        GArray      *pattern;
+        GimpValueArray *value_array = g_value_get_boxed (value);
+        GArray         *pattern;
 
         pattern = gimp_dash_pattern_from_value_array (value_array);
         gimp_stroke_options_take_dash_pattern (options, GIMP_DASH_CUSTOM,
@@ -344,7 +345,7 @@ gimp_stroke_options_get_property (GObject    *object,
       break;
     case PROP_DASH_INFO:
       {
-        GValueArray *value_array;
+        GimpValueArray *value_array;
 
         value_array = gimp_dash_pattern_to_value_array (private->dash_info);
         g_value_take_boxed (value, value_array);
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 7688519..a77accf 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -105,9 +105,9 @@ file_open_image (Gimp                *gimp,
                  const gchar        **mime_type,
                  GError             **error)
 {
-  GValueArray *return_vals;
-  gchar       *filename;
-  GimpImage   *image = NULL;
+  GimpValueArray *return_vals;
+  gchar          *filename;
+  GimpImage      *image = NULL;
 
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -164,11 +164,12 @@ file_open_image (Gimp                *gimp,
 
   g_free (filename);
 
-  *status = g_value_get_enum (&return_vals->values[0]);
+  *status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
   if (*status == GIMP_PDB_SUCCESS)
     {
-      image = gimp_value_get_image (&return_vals->values[1], gimp);
+      image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
+                                    gimp);
 
       if (image)
         {
@@ -202,7 +203,7 @@ file_open_image (Gimp                *gimp,
                      gimp_plug_in_procedure_get_label (file_proc));
     }
 
-  g_value_array_free (return_vals);
+  gimp_value_array_unref (return_vals);
 
   if (image)
     {
@@ -282,7 +283,7 @@ file_open_thumbnail (Gimp           *gimp,
   if (procedure && procedure->num_args >= 2 && procedure->num_values >= 1)
     {
       GimpPDBStatusType  status;
-      GValueArray       *return_vals;
+      GimpValueArray    *return_vals;
       gchar             *filename;
       GimpImage         *image = NULL;
 
@@ -301,26 +302,28 @@ file_open_thumbnail (Gimp           *gimp,
 
       g_free (filename);
 
-      status = g_value_get_enum (&return_vals->values[0]);
+      status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
       if (status == GIMP_PDB_SUCCESS &&
-          GIMP_VALUE_HOLDS_IMAGE_ID (&return_vals->values[1]))
+          GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
         {
-          image = gimp_value_get_image (&return_vals->values[1], gimp);
+          image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
+                                        gimp);
 
-          if (return_vals->n_values >= 3 &&
-              G_VALUE_HOLDS_INT (&return_vals->values[2]) &&
-              G_VALUE_HOLDS_INT (&return_vals->values[3]))
+          if (gimp_value_array_length (return_vals) >= 3 &&
+              G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 2)) &&
+              G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 3)))
             {
-              *image_width  = MAX (0,
-                                   g_value_get_int (&return_vals->values[2]));
-              *image_height = MAX (0,
-                                   g_value_get_int (&return_vals->values[3]));
+              *image_width =
+                MAX (0, g_value_get_int (gimp_value_array_index (return_vals, 2)));
 
-              if (return_vals->n_values >= 5 &&
-                  G_VALUE_HOLDS_INT (&return_vals->values[4]))
+              *image_height =
+                MAX (0, g_value_get_int (gimp_value_array_index (return_vals, 3)));
+
+              if (gimp_value_array_length (return_vals) >= 5 &&
+                  G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 4)))
                 {
-                  gint value = g_value_get_int (&return_vals->values[4]);
+                  gint value = g_value_get_int (gimp_value_array_index (return_vals, 4));
 
                   switch (value)
                     {
@@ -365,11 +368,11 @@ file_open_thumbnail (Gimp           *gimp,
                     }
                 }
 
-              if (return_vals->n_values >= 6 &&
-                  G_VALUE_HOLDS_INT (&return_vals->values[5]))
+              if (gimp_value_array_length (return_vals) >= 6 &&
+                  G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 5)))
                 {
-                  *num_layers = MAX (0,
-                                     g_value_get_int (&return_vals->values[5]));
+                  *num_layers =
+                    MAX (0, g_value_get_int (gimp_value_array_index (return_vals, 5)));
                 }
             }
 
@@ -387,7 +390,7 @@ file_open_thumbnail (Gimp           *gimp,
             }
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       return image;
     }
diff --git a/app/file/file-save.c b/app/file/file-save.c
index 3a5b990..cdb2415 100644
--- a/app/file/file-save.c
+++ b/app/file/file-save.c
@@ -40,6 +40,8 @@
 #define W_OK 2
 #endif
 
+#include "libgimpbase/gimpbase.h"
+
 #include "core/core-types.h"
 
 #include "config/gimpcoreconfig.h"
@@ -78,7 +80,7 @@ file_save (Gimp                *gimp,
            GError             **error)
 {
   GimpDrawable      *drawable;
-  GValueArray       *return_vals;
+  GimpValueArray    *return_vals;
   GimpPDBStatusType  status;
   gchar             *filename;
   gint32             image_ID;
@@ -146,9 +148,9 @@ file_save (Gimp                *gimp,
                                         G_TYPE_STRING,         uri,
                                         G_TYPE_NONE);
 
-  status = g_value_get_enum (&return_vals->values[0]);
+  status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
-  g_value_array_free (return_vals);
+  gimp_value_array_unref (return_vals);
 
   if (status == GIMP_PDB_SUCCESS)
     {
diff --git a/app/pdb/brush-cmds.c b/app/pdb/brush-cmds.c
index bd8fd24..373b38b 100644
--- a/app/pdb/brush-cmds.c
+++ b/app/pdb/brush-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -41,20 +43,20 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 brush_new_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -71,25 +73,25 @@ brush_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_duplicate_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *copy_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -114,25 +116,25 @@ brush_duplicate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], copy_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), copy_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_is_generated_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gboolean generated = FALSE;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -148,27 +150,27 @@ brush_is_generated_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], generated);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), generated);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_rename_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   const gchar *new_name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  new_name = g_value_get_string (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  new_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -187,23 +189,23 @@ brush_rename_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_delete_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -221,20 +223,20 @@ brush_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_is_editable_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gboolean editable = FALSE;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -250,28 +252,28 @@ brush_is_editable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], editable);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), editable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_info_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 width = 0;
   gint32 height = 0;
   gint32 mask_bpp = 0;
   gint32 color_bpp = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -293,25 +295,25 @@ brush_get_info_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], mask_bpp);
-      g_value_set_int (&return_vals->values[4], color_bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), mask_bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), color_bpp);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_pixels_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 width = 0;
   gint32 height = 0;
@@ -322,7 +324,7 @@ brush_get_pixels_invoker (GimpProcedure      *procedure,
   gint32 num_color_bytes = 0;
   guint8 *color_bytes = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -357,33 +359,33 @@ brush_get_pixels_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], mask_bpp);
-      g_value_set_int (&return_vals->values[4], num_mask_bytes);
-      gimp_value_take_int8array (&return_vals->values[5], mask_bytes, num_mask_bytes);
-      g_value_set_int (&return_vals->values[6], color_bpp);
-      g_value_set_int (&return_vals->values[7], num_color_bytes);
-      gimp_value_take_int8array (&return_vals->values[8], color_bytes, num_color_bytes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), mask_bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), num_mask_bytes);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 5), mask_bytes, num_mask_bytes);
+      g_value_set_int (gimp_value_array_index (return_vals, 6), color_bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 7), num_color_bytes);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 8), color_bytes, num_color_bytes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_spacing_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 spacing = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -399,25 +401,25 @@ brush_get_spacing_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], spacing);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), spacing);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_spacing_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 spacing;
 
-  name = g_value_get_string (&args->values[0]);
-  spacing = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  spacing = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -433,20 +435,20 @@ brush_set_spacing_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_shape_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 shape = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -462,27 +464,27 @@ brush_get_shape_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], shape);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), shape);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_shape_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 shape_in;
   gint32 shape_out = 0;
 
-  name = g_value_get_string (&args->values[0]);
-  shape_in = g_value_get_enum (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  shape_in = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -502,25 +504,25 @@ brush_set_shape_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], shape_out);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), shape_out);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_radius_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble radius = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -536,27 +538,27 @@ brush_get_radius_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], radius);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), radius);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_radius_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble radius_in;
   gdouble radius_out = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  radius_in = g_value_get_double (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  radius_in = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -576,25 +578,25 @@ brush_set_radius_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], radius_out);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), radius_out);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_spikes_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 spikes = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -610,27 +612,27 @@ brush_get_spikes_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], spikes);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), spikes);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_spikes_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 spikes_in;
   gint32 spikes_out = 0;
 
-  name = g_value_get_string (&args->values[0]);
-  spikes_in = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  spikes_in = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -650,25 +652,25 @@ brush_set_spikes_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], spikes_out);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), spikes_out);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_hardness_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble hardness = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -684,27 +686,27 @@ brush_get_hardness_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], hardness);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), hardness);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_hardness_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble hardness_in;
   gdouble hardness_out = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  hardness_in = g_value_get_double (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  hardness_in = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -724,25 +726,25 @@ brush_set_hardness_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], hardness_out);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), hardness_out);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble aspect_ratio = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -758,27 +760,27 @@ brush_get_aspect_ratio_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], aspect_ratio);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), aspect_ratio);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble aspect_ratio_in;
   gdouble aspect_ratio_out = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  aspect_ratio_in = g_value_get_double (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  aspect_ratio_in = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -798,25 +800,25 @@ brush_set_aspect_ratio_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], aspect_ratio_out);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), aspect_ratio_out);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_get_angle_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble angle = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -832,27 +834,27 @@ brush_get_angle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], angle);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brush_set_angle_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gdouble angle_in;
   gdouble angle_out = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  angle_in = g_value_get_double (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  angle_in = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -872,7 +874,7 @@ brush_set_angle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], angle_out);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), angle_out);
 
   return return_vals;
 }
diff --git a/app/pdb/brush-select-cmds.c b/app/pdb/brush-select-cmds.c
index 73c1d32..1deeffd 100644
--- a/app/pdb/brush-select-cmds.c
+++ b/app/pdb/brush-select-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -34,13 +36,13 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 brushes_popup_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   const gchar *brush_callback;
@@ -50,12 +52,12 @@ brushes_popup_invoker (GimpProcedure      *procedure,
   gint32 spacing;
   gint32 paint_mode;
 
-  brush_callback = g_value_get_string (&args->values[0]);
-  popup_title = g_value_get_string (&args->values[1]);
-  initial_brush = g_value_get_string (&args->values[2]);
-  opacity = g_value_get_double (&args->values[3]);
-  spacing = g_value_get_int (&args->values[4]);
-  paint_mode = g_value_get_enum (&args->values[5]);
+  brush_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  popup_title = g_value_get_string (gimp_value_array_index (args, 1));
+  initial_brush = g_value_get_string (gimp_value_array_index (args, 2));
+  opacity = g_value_get_double (gimp_value_array_index (args, 3));
+  spacing = g_value_get_int (gimp_value_array_index (args, 4));
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -75,18 +77,18 @@ brushes_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_close_popup_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *brush_callback;
 
-  brush_callback = g_value_get_string (&args->values[0]);
+  brush_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -101,13 +103,13 @@ brushes_close_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_set_popup_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   const gchar *brush_callback;
@@ -116,11 +118,11 @@ brushes_set_popup_invoker (GimpProcedure      *procedure,
   gint32 spacing;
   gint32 paint_mode;
 
-  brush_callback = g_value_get_string (&args->values[0]);
-  brush_name = g_value_get_string (&args->values[1]);
-  opacity = g_value_get_double (&args->values[2]);
-  spacing = g_value_get_int (&args->values[3]);
-  paint_mode = g_value_get_enum (&args->values[4]);
+  brush_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  brush_name = g_value_get_string (gimp_value_array_index (args, 1));
+  opacity = g_value_get_double (gimp_value_array_index (args, 2));
+  spacing = g_value_get_int (gimp_value_array_index (args, 3));
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 4));
 
   if (success)
     {
diff --git a/app/pdb/brushes-cmds.c b/app/pdb/brushes-cmds.c
index 168f220..bdb73c0 100644
--- a/app/pdb/brushes-cmds.c
+++ b/app/pdb/brushes-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -41,34 +43,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 brushes_refresh_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gimp_data_factory_data_refresh (gimp->brush_factory, context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_get_list_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_brushes = 0;
   gchar **brush_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -81,23 +83,23 @@ brushes_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_brushes);
-      gimp_value_take_stringarray (&return_vals->values[2], brush_list, num_brushes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_brushes);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), brush_list, num_brushes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_get_brush_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
   gint32 width = 0;
   gint32 height = 0;
@@ -120,25 +122,25 @@ brushes_get_brush_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], name);
-      g_value_set_int (&return_vals->values[2], width);
-      g_value_set_int (&return_vals->values[3], height);
-      g_value_set_int (&return_vals->values[4], spacing);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), spacing);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_get_spacing_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 spacing = 0;
 
   GimpBrush *brush = gimp_context_get_brush (context);
@@ -152,23 +154,23 @@ brushes_get_spacing_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], spacing);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), spacing);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_set_spacing_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   gint32 spacing;
 
-  spacing = g_value_get_int (&args->values[0]);
+  spacing = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -179,16 +181,16 @@ brushes_set_spacing_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 brushes_get_brush_data_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *actual_name = NULL;
   gdouble opacity = 0.0;
@@ -199,7 +201,7 @@ brushes_get_brush_data_invoker (GimpProcedure      *procedure,
   gint32 length = 0;
   guint8 *mask_data = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -230,14 +232,14 @@ brushes_get_brush_data_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], actual_name);
-      g_value_set_double (&return_vals->values[2], opacity);
-      g_value_set_int (&return_vals->values[3], spacing);
-      g_value_set_enum (&return_vals->values[4], paint_mode);
-      g_value_set_int (&return_vals->values[5], width);
-      g_value_set_int (&return_vals->values[6], height);
-      g_value_set_int (&return_vals->values[7], length);
-      gimp_value_take_int8array (&return_vals->values[8], mask_data, length);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), opacity);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), spacing);
+      g_value_set_enum (gimp_value_array_index (return_vals, 4), paint_mode);
+      g_value_set_int (gimp_value_array_index (return_vals, 5), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 6), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 7), length);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 8), mask_data, length);
     }
 
   return return_vals;
diff --git a/app/pdb/buffer-cmds.c b/app/pdb/buffer-cmds.c
index a3d5d8c..ee1ecde 100644
--- a/app/pdb/buffer-cmds.c
+++ b/app/pdb/buffer-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -40,21 +42,21 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 buffers_get_list_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_buffers = 0;
   gchar **buffer_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -67,29 +69,29 @@ buffers_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_buffers);
-      gimp_value_take_stringarray (&return_vals->values[2], buffer_list, num_buffers);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_buffers);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), buffer_list, num_buffers);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_rename_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   const gchar *new_name;
   gchar *real_name = NULL;
 
-  buffer_name = g_value_get_string (&args->values[0]);
-  new_name = g_value_get_string (&args->values[1]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
+  new_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -108,23 +110,23 @@ buffer_rename_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], real_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), real_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_delete_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   const gchar *buffer_name;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -140,20 +142,20 @@ buffer_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_get_width_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   gint32 width = 0;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -169,25 +171,25 @@ buffer_get_width_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], width);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), width);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_get_height_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   gint32 height = 0;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -203,25 +205,25 @@ buffer_get_height_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], height);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), height);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_get_bytes_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   gint32 bytes = 0;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -241,25 +243,25 @@ buffer_get_bytes_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], bytes);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), bytes);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 buffer_get_image_type_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   gint32 image_type = 0;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -275,7 +277,7 @@ buffer_get_image_type_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], image_type);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), image_type);
 
   return return_vals;
 }
diff --git a/app/pdb/channel-cmds.c b/app/pdb/channel-cmds.c
index 087c7bc..23b2825 100644
--- a/app/pdb/channel-cmds.c
+++ b/app/pdb/channel-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpchannel-combine.h"
@@ -42,16 +44,16 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 channel_new_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 width;
   gint32 height;
@@ -60,12 +62,12 @@ channel_new_invoker (GimpProcedure      *procedure,
   GimpRGB color;
   GimpChannel *channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  width = g_value_get_int (&args->values[1]);
-  height = g_value_get_int (&args->values[2]);
-  name = g_value_get_string (&args->values[3]);
-  opacity = g_value_get_double (&args->values[4]);
-  gimp_value_get_rgb (&args->values[5], &color);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  width = g_value_get_int (gimp_value_array_index (args, 1));
+  height = g_value_get_int (gimp_value_array_index (args, 2));
+  name = g_value_get_string (gimp_value_array_index (args, 3));
+  opacity = g_value_get_double (gimp_value_array_index (args, 4));
+  gimp_value_get_rgb (gimp_value_array_index (args, 5), &color);
 
   if (success)
     {
@@ -82,29 +84,29 @@ channel_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_new_from_component_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 component;
   const gchar *name;
   GimpChannel *channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  component = g_value_get_enum (&args->values[1]);
-  name = g_value_get_string (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  component = g_value_get_enum (gimp_value_array_index (args, 1));
+  name = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -122,25 +124,25 @@ channel_new_from_component_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_copy_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpChannel *channel;
   GimpChannel *channel_copy = NULL;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -155,18 +157,18 @@ channel_copy_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel_copy);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel_copy);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_combine_masks_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel1;
@@ -175,11 +177,11 @@ channel_combine_masks_invoker (GimpProcedure      *procedure,
   gint32 offx;
   gint32 offy;
 
-  channel1 = gimp_value_get_channel (&args->values[0], gimp);
-  channel2 = gimp_value_get_channel (&args->values[1], gimp);
-  operation = g_value_get_enum (&args->values[2]);
-  offx = g_value_get_int (&args->values[3]);
-  offy = g_value_get_int (&args->values[4]);
+  channel1 = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+  channel2 = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 2));
+  offx = g_value_get_int (gimp_value_array_index (args, 3));
+  offy = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -191,20 +193,20 @@ channel_combine_masks_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_get_show_masked_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpChannel *channel;
   gboolean show_masked = FALSE;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -215,25 +217,25 @@ channel_get_show_masked_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], show_masked);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), show_masked);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_set_show_masked_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel;
   gboolean show_masked;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
-  show_masked = g_value_get_boolean (&args->values[1]);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+  show_masked = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -244,20 +246,20 @@ channel_set_show_masked_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_get_opacity_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpChannel *channel;
   gdouble opacity = 0.0;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -268,25 +270,25 @@ channel_get_opacity_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], opacity);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), opacity);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_set_opacity_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel;
   gdouble opacity;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
-  opacity = g_value_get_double (&args->values[1]);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+  opacity = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -297,20 +299,20 @@ channel_set_opacity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_get_color_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpChannel *channel;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -322,25 +324,25 @@ channel_get_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &color);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 channel_set_color_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel;
   GimpRGB color;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &color);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
 
   if (success)
     {
diff --git a/app/pdb/color-cmds.c b/app/pdb/color-cmds.c
index b4e0373..186f1a3 100644
--- a/app/pdb/color-cmds.c
+++ b/app/pdb/color-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpdrawable-equalize.h"
@@ -50,22 +52,22 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 brightness_contrast_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 brightness;
   gint32 contrast;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  brightness = g_value_get_int (&args->values[1]);
-  contrast = g_value_get_int (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  brightness = g_value_get_int (gimp_value_array_index (args, 1));
+  contrast = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -91,13 +93,13 @@ brightness_contrast_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 levels_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -108,13 +110,13 @@ levels_invoker (GimpProcedure      *procedure,
   gint32 low_output;
   gint32 high_output;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  channel = g_value_get_enum (&args->values[1]);
-  low_input = g_value_get_int (&args->values[2]);
-  high_input = g_value_get_int (&args->values[3]);
-  gamma = g_value_get_double (&args->values[4]);
-  low_output = g_value_get_int (&args->values[5]);
-  high_output = g_value_get_int (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  channel = g_value_get_enum (gimp_value_array_index (args, 1));
+  low_input = g_value_get_int (gimp_value_array_index (args, 2));
+  high_input = g_value_get_int (gimp_value_array_index (args, 3));
+  gamma = g_value_get_double (gimp_value_array_index (args, 4));
+  low_output = g_value_get_int (gimp_value_array_index (args, 5));
+  high_output = g_value_get_int (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -150,18 +152,18 @@ levels_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 levels_auto_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -178,18 +180,18 @@ levels_auto_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 levels_stretch_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -206,20 +208,20 @@ levels_stretch_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 posterize_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 levels;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  levels = g_value_get_int (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  levels = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -244,18 +246,18 @@ posterize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 desaturate_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -281,20 +283,20 @@ desaturate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 desaturate_full_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 desaturate_mode;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  desaturate_mode = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  desaturate_mode = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -320,20 +322,20 @@ desaturate_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 equalize_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gboolean mask_only;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  mask_only = g_value_get_boolean (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  mask_only = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -349,18 +351,18 @@ equalize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 invert_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -380,13 +382,13 @@ invert_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 curves_spline_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -394,10 +396,10 @@ curves_spline_invoker (GimpProcedure      *procedure,
   gint32 num_points;
   const guint8 *control_pts;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  channel = g_value_get_enum (&args->values[1]);
-  num_points = g_value_get_int (&args->values[2]);
-  control_pts = gimp_value_get_int8array (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  channel = g_value_get_enum (gimp_value_array_index (args, 1));
+  num_points = g_value_get_int (gimp_value_array_index (args, 2));
+  control_pts = gimp_value_get_int8array (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -426,13 +428,13 @@ curves_spline_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 curves_explicit_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -440,10 +442,10 @@ curves_explicit_invoker (GimpProcedure      *procedure,
   gint32 num_bytes;
   const guint8 *curve;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  channel = g_value_get_enum (&args->values[1]);
-  num_bytes = g_value_get_int (&args->values[2]);
-  curve = gimp_value_get_int8array (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  channel = g_value_get_enum (gimp_value_array_index (args, 1));
+  num_bytes = g_value_get_int (gimp_value_array_index (args, 2));
+  curve = gimp_value_get_int8array (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -472,13 +474,13 @@ curves_explicit_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 color_balance_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -488,12 +490,12 @@ color_balance_invoker (GimpProcedure      *procedure,
   gdouble magenta_green;
   gdouble yellow_blue;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  transfer_mode = g_value_get_enum (&args->values[1]);
-  preserve_lum = g_value_get_boolean (&args->values[2]);
-  cyan_red = g_value_get_double (&args->values[3]);
-  magenta_green = g_value_get_double (&args->values[4]);
-  yellow_blue = g_value_get_double (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  transfer_mode = g_value_get_enum (gimp_value_array_index (args, 1));
+  preserve_lum = g_value_get_boolean (gimp_value_array_index (args, 2));
+  cyan_red = g_value_get_double (gimp_value_array_index (args, 3));
+  magenta_green = g_value_get_double (gimp_value_array_index (args, 4));
+  yellow_blue = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -525,13 +527,13 @@ color_balance_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 colorize_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -539,10 +541,10 @@ colorize_invoker (GimpProcedure      *procedure,
   gdouble saturation;
   gdouble lightness;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  hue = g_value_get_double (&args->values[1]);
-  saturation = g_value_get_double (&args->values[2]);
-  lightness = g_value_get_double (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  hue = g_value_get_double (gimp_value_array_index (args, 1));
+  saturation = g_value_get_double (gimp_value_array_index (args, 2));
+  lightness = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -570,16 +572,16 @@ colorize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 histogram_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 channel;
   gint32 start_range;
@@ -591,10 +593,10 @@ histogram_invoker (GimpProcedure      *procedure,
   gdouble count = 0.0;
   gdouble percentile = 0.0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  channel = g_value_get_enum (&args->values[1]);
-  start_range = g_value_get_int (&args->values[2]);
-  end_range = g_value_get_int (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  channel = g_value_get_enum (gimp_value_array_index (args, 1));
+  start_range = g_value_get_int (gimp_value_array_index (args, 2));
+  end_range = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -632,24 +634,24 @@ histogram_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], mean);
-      g_value_set_double (&return_vals->values[2], std_dev);
-      g_value_set_double (&return_vals->values[3], median);
-      g_value_set_double (&return_vals->values[4], pixels);
-      g_value_set_double (&return_vals->values[5], count);
-      g_value_set_double (&return_vals->values[6], percentile);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), mean);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), std_dev);
+      g_value_set_double (gimp_value_array_index (return_vals, 3), median);
+      g_value_set_double (gimp_value_array_index (return_vals, 4), pixels);
+      g_value_set_double (gimp_value_array_index (return_vals, 5), count);
+      g_value_set_double (gimp_value_array_index (return_vals, 6), percentile);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 hue_saturation_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -658,11 +660,11 @@ hue_saturation_invoker (GimpProcedure      *procedure,
   gdouble lightness;
   gdouble saturation;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  hue_range = g_value_get_enum (&args->values[1]);
-  hue_offset = g_value_get_double (&args->values[2]);
-  lightness = g_value_get_double (&args->values[3]);
-  saturation = g_value_get_double (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  hue_range = g_value_get_enum (gimp_value_array_index (args, 1));
+  hue_offset = g_value_get_double (gimp_value_array_index (args, 2));
+  lightness = g_value_get_double (gimp_value_array_index (args, 3));
+  saturation = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -693,22 +695,22 @@ hue_saturation_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 threshold_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 low_threshold;
   gint32 high_threshold;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  low_threshold = g_value_get_int (&args->values[1]);
-  high_threshold = g_value_get_int (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  low_threshold = g_value_get_int (gimp_value_array_index (args, 1));
+  high_threshold = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
diff --git a/app/pdb/context-cmds.c b/app/pdb/context-cmds.c
index f13c424..2a1b74a 100644
--- a/app/pdb/context-cmds.c
+++ b/app/pdb/context-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpcolor/gimpcolor.h"
 #include "libgimpconfig/gimpconfig.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -47,13 +49,13 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 context_push_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -67,13 +69,13 @@ context_push_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_pop_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -87,28 +89,28 @@ context_pop_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_defaults_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
     gimp_config_reset (GIMP_CONFIG (context));
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_list_paint_methods_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_paint_methods = 0;
   gchar **paint_methods = NULL;
 
@@ -117,22 +119,22 @@ context_list_paint_methods_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_int (&return_vals->values[1], num_paint_methods);
-  gimp_value_take_stringarray (&return_vals->values[2], paint_methods, num_paint_methods);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_paint_methods);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), paint_methods, num_paint_methods);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_paint_method_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpPaintInfo *paint_info = gimp_context_get_paint_info (context);
@@ -146,23 +148,23 @@ context_get_paint_method_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_paint_method_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -178,38 +180,38 @@ context_set_paint_method_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_foreground_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpRGB foreground = { 0.0, 0.0, 0.0, 1.0 };
 
   gimp_context_get_foreground (context, &foreground);
   gimp_rgb_set_alpha (&foreground, 1.0);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  gimp_value_set_rgb (&return_vals->values[1], &foreground);
+  gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &foreground);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_foreground_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpRGB foreground;
 
-  gimp_value_get_rgb (&args->values[0], &foreground);
+  gimp_value_get_rgb (gimp_value_array_index (args, 0), &foreground);
 
   if (success)
     {
@@ -221,38 +223,38 @@ context_set_foreground_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_background_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpRGB background = { 0.0, 0.0, 0.0, 1.0 };
 
   gimp_context_get_background (context, &background);
   gimp_rgb_set_alpha (&background, 1.0);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  gimp_value_set_rgb (&return_vals->values[1], &background);
+  gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &background);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_background_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpRGB background;
 
-  gimp_value_get_rgb (&args->values[0], &background);
+  gimp_value_get_rgb (gimp_value_array_index (args, 0), &background);
 
   if (success)
     {
@@ -264,63 +266,63 @@ context_set_background_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_default_colors_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gimp_context_set_default_colors (context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_swap_colors_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gimp_context_swap_colors (context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_opacity_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble opacity = 0.0;
 
   opacity = gimp_context_get_opacity (context) * 100.0;
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_double (&return_vals->values[1], opacity);
+  g_value_set_double (gimp_value_array_index (return_vals, 1), opacity);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_opacity_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   gdouble opacity;
 
-  opacity = g_value_get_double (&args->values[0]);
+  opacity = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -331,37 +333,37 @@ context_set_opacity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_paint_mode_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 paint_mode = 0;
 
   paint_mode = gimp_context_get_paint_mode (context);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], paint_mode);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), paint_mode);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_paint_mode_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   gint32 paint_mode;
 
-  paint_mode = g_value_get_enum (&args->values[0]);
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -372,16 +374,16 @@ context_set_paint_mode_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_brush_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpBrush *brush = gimp_context_get_brush (context);
@@ -395,23 +397,23 @@ context_get_brush_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_brush_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -427,18 +429,18 @@ context_set_brush_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_brush_size_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   gdouble size;
 
-  size = g_value_get_double (&args->values[0]);
+  size = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -459,18 +461,18 @@ context_get_brush_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_brush_size_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   gdouble size;
 
-  size = g_value_get_double (&args->values[0]);
+  size = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -491,13 +493,13 @@ context_set_brush_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_brush_default_size_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
   GimpBrush *brush = gimp_context_get_brush (context);
@@ -527,18 +529,18 @@ context_set_brush_default_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_brush_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
   gdouble aspect;
 
-  aspect = g_value_get_double (&args->values[0]);
+  aspect = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -559,18 +561,18 @@ context_get_brush_aspect_ratio_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_brush_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
   gdouble aspect;
 
-  aspect = g_value_get_double (&args->values[0]);
+  aspect = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -591,18 +593,18 @@ context_set_brush_aspect_ratio_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_brush_angle_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   gdouble angle;
 
-  angle = g_value_get_double (&args->values[0]);
+  angle = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -623,18 +625,18 @@ context_get_brush_angle_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_brush_angle_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   gdouble angle;
 
-  angle = g_value_get_double (&args->values[0]);
+  angle = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -655,16 +657,16 @@ context_set_brush_angle_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_dynamics_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpDynamics *dynamics = gimp_context_get_dynamics (context);
@@ -678,23 +680,23 @@ context_get_dynamics_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_dynamics_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -710,16 +712,16 @@ context_set_dynamics_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_pattern_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpPattern *pattern = gimp_context_get_pattern (context);
@@ -733,23 +735,23 @@ context_get_pattern_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_pattern_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -765,16 +767,16 @@ context_set_pattern_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_gradient_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpGradient *gradient = gimp_context_get_gradient (context);
@@ -788,23 +790,23 @@ context_get_gradient_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_gradient_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -820,16 +822,16 @@ context_set_gradient_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_palette_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpPalette *palette = gimp_context_get_palette (context);
@@ -843,23 +845,23 @@ context_get_palette_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_palette_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -875,16 +877,16 @@ context_set_palette_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_font_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
 
   GimpFont *font = gimp_context_get_font (context);
@@ -898,23 +900,23 @@ context_get_font_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_font_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -930,15 +932,15 @@ context_set_font_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_antialias_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gboolean antialias = FALSE;
 
   g_object_get (context,
@@ -946,23 +948,23 @@ context_get_antialias_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], antialias);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), antialias);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_antialias_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   gboolean antialias;
 
-  antialias = g_value_get_boolean (&args->values[0]);
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -975,15 +977,15 @@ context_set_antialias_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_feather_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gboolean feather = FALSE;
 
   g_object_get (context,
@@ -991,23 +993,23 @@ context_get_feather_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], feather);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), feather);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_feather_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   gboolean feather;
 
-  feather = g_value_get_boolean (&args->values[0]);
+  feather = g_value_get_boolean (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1020,15 +1022,15 @@ context_set_feather_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_feather_radius_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble feather_radius_x = 0.0;
   gdouble feather_radius_y = 0.0;
 
@@ -1039,26 +1041,26 @@ context_get_feather_radius_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_double (&return_vals->values[1], feather_radius_x);
-  g_value_set_double (&return_vals->values[2], feather_radius_y);
+  g_value_set_double (gimp_value_array_index (return_vals, 1), feather_radius_x);
+  g_value_set_double (gimp_value_array_index (return_vals, 2), feather_radius_y);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_feather_radius_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   gdouble feather_radius_x;
   gdouble feather_radius_y;
 
-  feather_radius_x = g_value_get_double (&args->values[0]);
-  feather_radius_y = g_value_get_double (&args->values[1]);
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 0));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -1072,15 +1074,15 @@ context_set_feather_radius_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_sample_merged_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gboolean sample_merged = FALSE;
 
   g_object_get (context,
@@ -1088,23 +1090,23 @@ context_get_sample_merged_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], sample_merged);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), sample_merged);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_sample_merged_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
   gboolean sample_merged;
 
-  sample_merged = g_value_get_boolean (&args->values[0]);
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1117,15 +1119,15 @@ context_set_sample_merged_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_sample_criterion_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 sample_criterion = 0;
 
   g_object_get (context,
@@ -1133,23 +1135,23 @@ context_get_sample_criterion_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], sample_criterion);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), sample_criterion);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_sample_criterion_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   gint32 sample_criterion;
 
-  sample_criterion = g_value_get_enum (&args->values[0]);
+  sample_criterion = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1162,15 +1164,15 @@ context_set_sample_criterion_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_sample_threshold_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble sample_threshold = 0.0;
 
   g_object_get (context,
@@ -1178,23 +1180,23 @@ context_get_sample_threshold_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_double (&return_vals->values[1], sample_threshold);
+  g_value_set_double (gimp_value_array_index (return_vals, 1), sample_threshold);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_sample_threshold_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   gdouble sample_threshold;
 
-  sample_threshold = g_value_get_double (&args->values[0]);
+  sample_threshold = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1207,15 +1209,15 @@ context_set_sample_threshold_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_sample_threshold_int_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 sample_threshold = 0;
 
   gdouble threshold;
@@ -1227,23 +1229,23 @@ context_get_sample_threshold_int_invoker (GimpProcedure      *procedure,
   sample_threshold = (gint) (threshold * 255.99);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], sample_threshold);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), sample_threshold);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_sample_threshold_int_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
   gint32 sample_threshold;
 
-  sample_threshold = g_value_get_int (&args->values[0]);
+  sample_threshold = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1256,15 +1258,15 @@ context_set_sample_threshold_int_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_sample_transparent_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gboolean sample_transparent = FALSE;
 
   g_object_get (context,
@@ -1272,23 +1274,23 @@ context_get_sample_transparent_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], sample_transparent);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), sample_transparent);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_sample_transparent_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
   gboolean sample_transparent;
 
-  sample_transparent = g_value_get_boolean (&args->values[0]);
+  sample_transparent = g_value_get_boolean (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1301,15 +1303,15 @@ context_set_sample_transparent_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_interpolation_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 interpolation = 0;
 
   g_object_get (context,
@@ -1317,23 +1319,23 @@ context_get_interpolation_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], interpolation);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), interpolation);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_interpolation_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
   gint32 interpolation;
 
-  interpolation = g_value_get_enum (&args->values[0]);
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1346,15 +1348,15 @@ context_set_interpolation_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_transform_direction_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 transform_direction = 0;
 
   g_object_get (context,
@@ -1362,23 +1364,23 @@ context_get_transform_direction_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], transform_direction);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), transform_direction);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_transform_direction_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   gint32 transform_direction;
 
-  transform_direction = g_value_get_enum (&args->values[0]);
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1391,15 +1393,15 @@ context_set_transform_direction_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_transform_resize_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 transform_resize = 0;
 
   g_object_get (context,
@@ -1407,23 +1409,23 @@ context_get_transform_resize_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], transform_resize);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), transform_resize);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_transform_resize_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   gint32 transform_resize;
 
-  transform_resize = g_value_get_enum (&args->values[0]);
+  transform_resize = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1436,15 +1438,15 @@ context_set_transform_resize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_transform_recursion_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 transform_recursion = 0;
 
   g_object_get (context,
@@ -1452,23 +1454,23 @@ context_get_transform_recursion_invoker (GimpProcedure      *procedure,
                 NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], transform_recursion);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), transform_recursion);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_transform_recursion_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   gint32 transform_recursion;
 
-  transform_recursion = g_value_get_int (&args->values[0]);
+  transform_recursion = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1481,16 +1483,16 @@ context_set_transform_recursion_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_size_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble size = 0.0;
 
   GimpPaintOptions *options =
@@ -1508,23 +1510,23 @@ context_get_ink_size_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], size);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), size);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_size_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   gdouble size;
 
-  size = g_value_get_double (&args->values[0]);
+  size = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1544,16 +1546,16 @@ context_set_ink_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_angle_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble angle = 0.0;
 
   GimpPaintOptions *options =
@@ -1571,23 +1573,23 @@ context_get_ink_angle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], angle);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_angle_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   gdouble angle;
 
-  angle = g_value_get_double (&args->values[0]);
+  angle = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1607,16 +1609,16 @@ context_set_ink_angle_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_size_sensitivity_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble size = 0.0;
 
   GimpPaintOptions *options =
@@ -1634,23 +1636,23 @@ context_get_ink_size_sensitivity_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], size);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), size);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_size_sensitivity_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
   gdouble size;
 
-  size = g_value_get_double (&args->values[0]);
+  size = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1670,16 +1672,16 @@ context_set_ink_size_sensitivity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_tilt_sensitivity_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble tilt = 0.0;
 
   GimpPaintOptions *options =
@@ -1697,23 +1699,23 @@ context_get_ink_tilt_sensitivity_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], tilt);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), tilt);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_tilt_sensitivity_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
   gdouble tilt;
 
-  tilt = g_value_get_double (&args->values[0]);
+  tilt = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1733,16 +1735,16 @@ context_set_ink_tilt_sensitivity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_speed_sensitivity_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble speed = 0.0;
 
   GimpPaintOptions *options =
@@ -1760,23 +1762,23 @@ context_get_ink_speed_sensitivity_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], speed);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), speed);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_speed_sensitivity_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
   gdouble speed;
 
-  speed = g_value_get_double (&args->values[0]);
+  speed = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1796,16 +1798,16 @@ context_set_ink_speed_sensitivity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_blob_type_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 type = 0;
 
   GimpPaintOptions *options =
@@ -1823,23 +1825,23 @@ context_get_ink_blob_type_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], type);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), type);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_blob_type_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
   gint32 type;
 
-  type = g_value_get_enum (&args->values[0]);
+  type = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1859,16 +1861,16 @@ context_set_ink_blob_type_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_blob_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble aspect = 0.0;
 
   GimpPaintOptions *options =
@@ -1886,23 +1888,23 @@ context_get_ink_blob_aspect_ratio_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], aspect);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), aspect);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_blob_aspect_ratio_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
   gdouble aspect;
 
-  aspect = g_value_get_double (&args->values[0]);
+  aspect = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -1922,16 +1924,16 @@ context_set_ink_blob_aspect_ratio_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 context_get_ink_blob_angle_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble angle = 0.0;
 
   GimpPaintOptions *options =
@@ -1952,23 +1954,23 @@ context_get_ink_blob_angle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], angle);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), angle);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 context_set_ink_blob_angle_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   gdouble angle;
 
-  angle = g_value_get_double (&args->values[0]);
+  angle = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
diff --git a/app/pdb/convert-cmds.c b/app/pdb/convert-cmds.c
index 64440bd..a514ed0 100644
--- a/app/pdb/convert-cmds.c
+++ b/app/pdb/convert-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -44,18 +46,18 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 image_convert_rgb_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -75,18 +77,18 @@ image_convert_rgb_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_convert_grayscale_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -106,13 +108,13 @@ image_convert_grayscale_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_convert_indexed_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -123,13 +125,13 @@ image_convert_indexed_invoker (GimpProcedure      *procedure,
   gboolean remove_unused;
   const gchar *palette;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  dither_type = g_value_get_enum (&args->values[1]);
-  palette_type = g_value_get_enum (&args->values[2]);
-  num_cols = g_value_get_int (&args->values[3]);
-  alpha_dither = g_value_get_boolean (&args->values[4]);
-  remove_unused = g_value_get_boolean (&args->values[5]);
-  palette = g_value_get_string (&args->values[6]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  dither_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  palette_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  num_cols = g_value_get_int (gimp_value_array_index (args, 3));
+  alpha_dither = g_value_get_boolean (gimp_value_array_index (args, 4));
+  remove_unused = g_value_get_boolean (gimp_value_array_index (args, 5));
+  palette = g_value_get_string (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -184,13 +186,13 @@ image_convert_indexed_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_convert_set_dither_matrix_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   gint32 width;
@@ -198,10 +200,10 @@ image_convert_set_dither_matrix_invoker (GimpProcedure      *procedure,
   gint32 matrix_length;
   const guint8 *matrix;
 
-  width = g_value_get_int (&args->values[0]);
-  height = g_value_get_int (&args->values[1]);
-  matrix_length = g_value_get_int (&args->values[2]);
-  matrix = gimp_value_get_int8array (&args->values[3]);
+  width = g_value_get_int (gimp_value_array_index (args, 0));
+  height = g_value_get_int (gimp_value_array_index (args, 1));
+  matrix_length = g_value_get_int (gimp_value_array_index (args, 2));
+  matrix = gimp_value_get_int8array (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -222,20 +224,20 @@ image_convert_set_dither_matrix_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_convert_precision_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 precision;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  precision = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  precision = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/display-cmds.c b/app/pdb/display-cmds.c
index 4ac8028..9365f28 100644
--- a/app/pdb/display-cmds.c
+++ b/app/pdb/display-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -35,42 +37,42 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 display_is_valid_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpObject *display;
   gboolean valid = FALSE;
 
-  display = gimp_value_get_display (&args->values[0], gimp);
+  display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
 
   valid = (display != NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], valid);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 display_new_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpObject *display = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -94,23 +96,23 @@ display_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_display (&return_vals->values[1], display);
+    gimp_value_set_display (gimp_value_array_index (return_vals, 1), display);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 display_delete_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpObject *display;
 
-  display = gimp_value_get_display (&args->values[0], gimp);
+  display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -121,20 +123,20 @@ display_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 display_get_window_handle_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpObject *display;
   gint32 window = 0;
 
-  display = gimp_value_get_display (&args->values[0], gimp);
+  display = gimp_value_get_display (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -145,38 +147,38 @@ display_get_window_handle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], window);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), window);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 displays_flush_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 displays_reconnect_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *old_image;
   GimpImage *new_image;
 
-  old_image = gimp_value_get_image (&args->values[0], gimp);
-  new_image = gimp_value_get_image (&args->values[1], gimp);
+  old_image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  new_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index b39a436..cf9ddf6 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "config/gimpcoreconfig.h"
@@ -49,20 +51,20 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 drawable_get_format_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gchar *format = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -76,25 +78,25 @@ drawable_get_format_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], format);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), format);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_type_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 type = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -105,25 +107,25 @@ drawable_type_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], type);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), type);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_type_with_alpha_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 type_with_alpha = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -136,25 +138,25 @@ drawable_type_with_alpha_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], type_with_alpha);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), type_with_alpha);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_has_alpha_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean has_alpha = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -165,25 +167,25 @@ drawable_has_alpha_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], has_alpha);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), has_alpha);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_is_rgb_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean is_rgb = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -194,25 +196,25 @@ drawable_is_rgb_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], is_rgb);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), is_rgb);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_is_gray_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean is_gray = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -223,25 +225,25 @@ drawable_is_gray_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], is_gray);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), is_gray);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_is_indexed_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean is_indexed = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -252,25 +254,25 @@ drawable_is_indexed_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], is_indexed);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), is_indexed);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_bpp_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 bpp = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -289,25 +291,25 @@ drawable_bpp_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], bpp);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), bpp);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_width_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 width = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -318,25 +320,25 @@ drawable_width_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], width);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), width);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_height_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 height = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -347,26 +349,26 @@ drawable_height_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], height);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), height);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_offsets_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 offset_x = 0;
   gint32 offset_y = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -378,27 +380,27 @@ drawable_offsets_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], offset_x);
-      g_value_set_int (&return_vals->values[2], offset_y);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), offset_x);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), offset_y);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_set_image_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   GimpImage *image;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  image = gimp_value_get_image (&args->values[1], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -410,16 +412,16 @@ drawable_set_image_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_mask_bounds_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean non_empty = FALSE;
   gint32 x1 = 0;
@@ -427,7 +429,7 @@ drawable_mask_bounds_invoker (GimpProcedure      *procedure,
   gint32 x2 = 0;
   gint32 y2 = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -442,26 +444,26 @@ drawable_mask_bounds_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_boolean (&return_vals->values[1], non_empty);
-      g_value_set_int (&return_vals->values[2], x1);
-      g_value_set_int (&return_vals->values[3], y1);
-      g_value_set_int (&return_vals->values[4], x2);
-      g_value_set_int (&return_vals->values[5], y2);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), x1);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), y1);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), x2);
+      g_value_set_int (gimp_value_array_index (return_vals, 5), y2);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_mask_intersect_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean non_empty = FALSE;
   gint32 x = 0;
@@ -469,7 +471,7 @@ drawable_mask_intersect_invoker (GimpProcedure      *procedure,
   gint32 width = 0;
   gint32 height = 0;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -485,30 +487,30 @@ drawable_mask_intersect_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_boolean (&return_vals->values[1], non_empty);
-      g_value_set_int (&return_vals->values[2], x);
-      g_value_set_int (&return_vals->values[3], y);
-      g_value_set_int (&return_vals->values[4], width);
-      g_value_set_int (&return_vals->values[5], height);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), x);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), y);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 5), height);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_merge_shadow_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gboolean undo;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  undo = g_value_get_boolean (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  undo = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -530,18 +532,18 @@ drawable_merge_shadow_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_free_shadow_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -556,13 +558,13 @@ drawable_free_shadow_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_update_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -571,11 +573,11 @@ drawable_update_invoker (GimpProcedure      *procedure,
   gint32 width;
   gint32 height;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x = g_value_get_int (&args->values[1]);
-  y = g_value_get_int (&args->values[2]);
-  width = g_value_get_int (&args->values[3]);
-  height = g_value_get_int (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_int (gimp_value_array_index (args, 1));
+  y = g_value_get_int (gimp_value_array_index (args, 2));
+  width = g_value_get_int (gimp_value_array_index (args, 3));
+  height = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -586,25 +588,25 @@ drawable_update_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_get_pixel_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 x_coord;
   gint32 y_coord;
   gint32 num_channels = 0;
   guint8 *pixel = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x_coord = g_value_get_int (&args->values[1]);
-  y_coord = g_value_get_int (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x_coord = g_value_get_int (gimp_value_array_index (args, 1));
+  y_coord = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -632,20 +634,20 @@ drawable_get_pixel_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_channels);
-      gimp_value_take_int8array (&return_vals->values[2], pixel, num_channels);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_channels);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 2), pixel, num_channels);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_set_pixel_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -654,11 +656,11 @@ drawable_set_pixel_invoker (GimpProcedure      *procedure,
   gint32 num_channels;
   const guint8 *pixel;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x_coord = g_value_get_int (&args->values[1]);
-  y_coord = g_value_get_int (&args->values[2]);
-  num_channels = g_value_get_int (&args->values[3]);
-  pixel = gimp_value_get_int8array (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x_coord = g_value_get_int (gimp_value_array_index (args, 1));
+  y_coord = g_value_get_int (gimp_value_array_index (args, 2));
+  num_channels = g_value_get_int (gimp_value_array_index (args, 3));
+  pixel = gimp_value_get_int8array (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -688,20 +690,20 @@ drawable_set_pixel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_fill_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 fill_type;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  fill_type = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  fill_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -716,13 +718,13 @@ drawable_fill_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_offset_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -731,11 +733,11 @@ drawable_offset_invoker (GimpProcedure      *procedure,
   gint32 offset_x;
   gint32 offset_y;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  wrap_around = g_value_get_boolean (&args->values[1]);
-  fill_type = g_value_get_enum (&args->values[2]);
-  offset_x = g_value_get_int (&args->values[3]);
-  offset_y = g_value_get_int (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  wrap_around = g_value_get_boolean (gimp_value_array_index (args, 1));
+  fill_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  offset_x = g_value_get_int (gimp_value_array_index (args, 3));
+  offset_y = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -751,16 +753,16 @@ drawable_offset_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_thumbnail_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 width;
   gint32 height;
@@ -770,9 +772,9 @@ drawable_thumbnail_invoker (GimpProcedure      *procedure,
   gint32 thumbnail_data_count = 0;
   guint8 *thumbnail_data = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  width = g_value_get_int (&args->values[1]);
-  height = g_value_get_int (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  width = g_value_get_int (gimp_value_array_index (args, 1));
+  height = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -819,26 +821,26 @@ drawable_thumbnail_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], actual_width);
-      g_value_set_int (&return_vals->values[2], actual_height);
-      g_value_set_int (&return_vals->values[3], bpp);
-      g_value_set_int (&return_vals->values[4], thumbnail_data_count);
-      gimp_value_take_int8array (&return_vals->values[5], thumbnail_data, thumbnail_data_count);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), actual_width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), actual_height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), thumbnail_data_count);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 5), thumbnail_data, thumbnail_data_count);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_sub_thumbnail_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 src_x;
   gint32 src_y;
@@ -852,13 +854,13 @@ drawable_sub_thumbnail_invoker (GimpProcedure      *procedure,
   gint32 thumbnail_data_count = 0;
   guint8 *thumbnail_data = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  src_x = g_value_get_int (&args->values[1]);
-  src_y = g_value_get_int (&args->values[2]);
-  src_width = g_value_get_int (&args->values[3]);
-  src_height = g_value_get_int (&args->values[4]);
-  dest_width = g_value_get_int (&args->values[5]);
-  dest_height = g_value_get_int (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  src_x = g_value_get_int (gimp_value_array_index (args, 1));
+  src_y = g_value_get_int (gimp_value_array_index (args, 2));
+  src_width = g_value_get_int (gimp_value_array_index (args, 3));
+  src_height = g_value_get_int (gimp_value_array_index (args, 4));
+  dest_width = g_value_get_int (gimp_value_array_index (args, 5));
+  dest_height = g_value_get_int (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -901,32 +903,32 @@ drawable_sub_thumbnail_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], bpp);
-      g_value_set_int (&return_vals->values[4], thumbnail_data_count);
-      gimp_value_take_int8array (&return_vals->values[5], thumbnail_data, thumbnail_data_count);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), thumbnail_data_count);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 5), thumbnail_data, thumbnail_data_count);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_foreground_extract_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 mode;
   GimpDrawable *mask;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  mode = g_value_get_enum (&args->values[1]);
-  mask = gimp_value_get_drawable (&args->values[2], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  mode = g_value_get_enum (gimp_value_array_index (args, 1));
+  mask = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
 
   if (success)
     {
diff --git a/app/pdb/drawable-transform-cmds.c b/app/pdb/drawable-transform-cmds.c
index 3c50b33..34605bb 100644
--- a/app/pdb/drawable-transform-cmds.c
+++ b/app/pdb/drawable-transform-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "config/gimpcoreconfig.h"
@@ -45,27 +47,27 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_flip_simple_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 flip_type;
   gboolean auto_center;
   gdouble axis;
   gboolean clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  flip_type = g_value_get_enum (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  axis = g_value_get_double (&args->values[3]);
-  clip_result = g_value_get_boolean (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  axis = g_value_get_double (gimp_value_array_index (args, 3));
+  clip_result = g_value_get_boolean (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -100,21 +102,21 @@ drawable_transform_flip_simple_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_flip_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -125,15 +127,15 @@ drawable_transform_flip_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gboolean clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  transform_direction = g_value_get_enum (&args->values[5]);
-  interpolation = g_value_get_enum (&args->values[6]);
-  recursion_level = g_value_get_int (&args->values[8]);
-  clip_result = g_value_get_boolean (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 5));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 6));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 8));
+  clip_result = g_value_get_boolean (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -188,21 +190,21 @@ drawable_transform_flip_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_flip_default_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -211,13 +213,13 @@ drawable_transform_flip_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gboolean clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  interpolate = g_value_get_boolean (&args->values[5]);
-  clip_result = g_value_get_boolean (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 5));
+  clip_result = g_value_get_boolean (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -276,21 +278,21 @@ drawable_transform_flip_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_perspective_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -305,19 +307,19 @@ drawable_transform_perspective_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  x2 = g_value_get_double (&args->values[5]);
-  y2 = g_value_get_double (&args->values[6]);
-  x3 = g_value_get_double (&args->values[7]);
-  y3 = g_value_get_double (&args->values[8]);
-  transform_direction = g_value_get_enum (&args->values[9]);
-  interpolation = g_value_get_enum (&args->values[10]);
-  recursion_level = g_value_get_int (&args->values[12]);
-  clip_result = g_value_get_enum (&args->values[13]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  x2 = g_value_get_double (gimp_value_array_index (args, 5));
+  y2 = g_value_get_double (gimp_value_array_index (args, 6));
+  x3 = g_value_get_double (gimp_value_array_index (args, 7));
+  y3 = g_value_get_double (gimp_value_array_index (args, 8));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 9));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 10));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 12));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 13));
 
   if (success)
     {
@@ -374,21 +376,21 @@ drawable_transform_perspective_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_perspective_default_invoker (GimpProcedure      *procedure,
-                                                Gimp               *gimp,
-                                                GimpContext        *context,
-                                                GimpProgress       *progress,
-                                                const GValueArray  *args,
-                                                GError            **error)
+                                                Gimp                  *gimp,
+                                                GimpContext           *context,
+                                                GimpProgress          *progress,
+                                                const GimpValueArray  *args,
+                                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -401,17 +403,17 @@ drawable_transform_perspective_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  x2 = g_value_get_double (&args->values[5]);
-  y2 = g_value_get_double (&args->values[6]);
-  x3 = g_value_get_double (&args->values[7]);
-  y3 = g_value_get_double (&args->values[8]);
-  interpolate = g_value_get_boolean (&args->values[9]);
-  clip_result = g_value_get_enum (&args->values[10]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  x2 = g_value_get_double (gimp_value_array_index (args, 5));
+  y2 = g_value_get_double (gimp_value_array_index (args, 6));
+  x3 = g_value_get_double (gimp_value_array_index (args, 7));
+  y3 = g_value_get_double (gimp_value_array_index (args, 8));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 9));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 10));
 
   if (success)
     {
@@ -472,21 +474,21 @@ drawable_transform_perspective_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_rotate_simple_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 rotate_type;
   gboolean auto_center;
@@ -494,12 +496,12 @@ drawable_transform_rotate_simple_invoker (GimpProcedure      *procedure,
   gint32 center_y;
   gboolean clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  rotate_type = g_value_get_enum (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  center_x = g_value_get_int (&args->values[3]);
-  center_y = g_value_get_int (&args->values[4]);
-  clip_result = g_value_get_boolean (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  rotate_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  center_x = g_value_get_int (gimp_value_array_index (args, 3));
+  center_y = g_value_get_int (gimp_value_array_index (args, 4));
+  clip_result = g_value_get_boolean (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -539,21 +541,21 @@ drawable_transform_rotate_simple_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_rotate_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble angle;
   gboolean auto_center;
@@ -564,15 +566,15 @@ drawable_transform_rotate_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  angle = g_value_get_double (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  center_x = g_value_get_int (&args->values[3]);
-  center_y = g_value_get_int (&args->values[4]);
-  transform_direction = g_value_get_enum (&args->values[5]);
-  interpolation = g_value_get_enum (&args->values[6]);
-  recursion_level = g_value_get_int (&args->values[8]);
-  clip_result = g_value_get_enum (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  angle = g_value_get_double (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  center_x = g_value_get_int (gimp_value_array_index (args, 3));
+  center_y = g_value_get_int (gimp_value_array_index (args, 4));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 5));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 6));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 8));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -631,21 +633,21 @@ drawable_transform_rotate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_rotate_default_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble angle;
   gboolean auto_center;
@@ -654,13 +656,13 @@ drawable_transform_rotate_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  angle = g_value_get_double (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  center_x = g_value_get_int (&args->values[3]);
-  center_y = g_value_get_int (&args->values[4]);
-  interpolate = g_value_get_boolean (&args->values[5]);
-  clip_result = g_value_get_enum (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  angle = g_value_get_double (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  center_x = g_value_get_int (gimp_value_array_index (args, 3));
+  center_y = g_value_get_int (gimp_value_array_index (args, 4));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 5));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -723,21 +725,21 @@ drawable_transform_rotate_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_scale_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -748,15 +750,15 @@ drawable_transform_scale_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  transform_direction = g_value_get_enum (&args->values[5]);
-  interpolation = g_value_get_enum (&args->values[6]);
-  recursion_level = g_value_get_int (&args->values[8]);
-  clip_result = g_value_get_enum (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 5));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 6));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 8));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -812,21 +814,21 @@ drawable_transform_scale_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_scale_default_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble x0;
   gdouble y0;
@@ -835,13 +837,13 @@ drawable_transform_scale_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  interpolate = g_value_get_boolean (&args->values[5]);
-  clip_result = g_value_get_enum (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 5));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -901,21 +903,21 @@ drawable_transform_scale_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_shear_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 shear_type;
   gdouble magnitude;
@@ -924,13 +926,13 @@ drawable_transform_shear_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  shear_type = g_value_get_enum (&args->values[1]);
-  magnitude = g_value_get_double (&args->values[2]);
-  transform_direction = g_value_get_enum (&args->values[3]);
-  interpolation = g_value_get_enum (&args->values[4]);
-  recursion_level = g_value_get_int (&args->values[6]);
-  clip_result = g_value_get_enum (&args->values[7]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  shear_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  magnitude = g_value_get_double (gimp_value_array_index (args, 2));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 3));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 4));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 6));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -986,32 +988,32 @@ drawable_transform_shear_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_shear_default_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 shear_type;
   gdouble magnitude;
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  shear_type = g_value_get_enum (&args->values[1]);
-  magnitude = g_value_get_double (&args->values[2]);
-  interpolate = g_value_get_boolean (&args->values[3]);
-  clip_result = g_value_get_enum (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  shear_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  magnitude = g_value_get_double (gimp_value_array_index (args, 2));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 3));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -1071,21 +1073,21 @@ drawable_transform_shear_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_2d_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble source_x;
   gdouble source_y;
@@ -1099,18 +1101,18 @@ drawable_transform_2d_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  source_x = g_value_get_double (&args->values[1]);
-  source_y = g_value_get_double (&args->values[2]);
-  scale_x = g_value_get_double (&args->values[3]);
-  scale_y = g_value_get_double (&args->values[4]);
-  angle = g_value_get_double (&args->values[5]);
-  dest_x = g_value_get_double (&args->values[6]);
-  dest_y = g_value_get_double (&args->values[7]);
-  transform_direction = g_value_get_enum (&args->values[8]);
-  interpolation = g_value_get_enum (&args->values[9]);
-  recursion_level = g_value_get_int (&args->values[11]);
-  clip_result = g_value_get_enum (&args->values[12]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  source_x = g_value_get_double (gimp_value_array_index (args, 1));
+  source_y = g_value_get_double (gimp_value_array_index (args, 2));
+  scale_x = g_value_get_double (gimp_value_array_index (args, 3));
+  scale_y = g_value_get_double (gimp_value_array_index (args, 4));
+  angle = g_value_get_double (gimp_value_array_index (args, 5));
+  dest_x = g_value_get_double (gimp_value_array_index (args, 6));
+  dest_y = g_value_get_double (gimp_value_array_index (args, 7));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 8));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 9));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 11));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 12));
 
   if (success)
     {
@@ -1167,21 +1169,21 @@ drawable_transform_2d_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_2d_default_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble source_x;
   gdouble source_y;
@@ -1193,16 +1195,16 @@ drawable_transform_2d_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  source_x = g_value_get_double (&args->values[1]);
-  source_y = g_value_get_double (&args->values[2]);
-  scale_x = g_value_get_double (&args->values[3]);
-  scale_y = g_value_get_double (&args->values[4]);
-  angle = g_value_get_double (&args->values[5]);
-  dest_x = g_value_get_double (&args->values[6]);
-  dest_y = g_value_get_double (&args->values[7]);
-  interpolate = g_value_get_boolean (&args->values[8]);
-  clip_result = g_value_get_enum (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  source_x = g_value_get_double (gimp_value_array_index (args, 1));
+  source_y = g_value_get_double (gimp_value_array_index (args, 2));
+  scale_x = g_value_get_double (gimp_value_array_index (args, 3));
+  scale_y = g_value_get_double (gimp_value_array_index (args, 4));
+  angle = g_value_get_double (gimp_value_array_index (args, 5));
+  dest_x = g_value_get_double (gimp_value_array_index (args, 6));
+  dest_y = g_value_get_double (gimp_value_array_index (args, 7));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 8));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -1263,21 +1265,21 @@ drawable_transform_2d_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_matrix_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble coeff_0_0;
   gdouble coeff_0_1;
@@ -1293,20 +1295,20 @@ drawable_transform_matrix_invoker (GimpProcedure      *procedure,
   gint32 recursion_level;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  coeff_0_0 = g_value_get_double (&args->values[1]);
-  coeff_0_1 = g_value_get_double (&args->values[2]);
-  coeff_0_2 = g_value_get_double (&args->values[3]);
-  coeff_1_0 = g_value_get_double (&args->values[4]);
-  coeff_1_1 = g_value_get_double (&args->values[5]);
-  coeff_1_2 = g_value_get_double (&args->values[6]);
-  coeff_2_0 = g_value_get_double (&args->values[7]);
-  coeff_2_1 = g_value_get_double (&args->values[8]);
-  coeff_2_2 = g_value_get_double (&args->values[9]);
-  transform_direction = g_value_get_enum (&args->values[10]);
-  interpolation = g_value_get_enum (&args->values[11]);
-  recursion_level = g_value_get_int (&args->values[13]);
-  clip_result = g_value_get_enum (&args->values[14]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  coeff_0_0 = g_value_get_double (gimp_value_array_index (args, 1));
+  coeff_0_1 = g_value_get_double (gimp_value_array_index (args, 2));
+  coeff_0_2 = g_value_get_double (gimp_value_array_index (args, 3));
+  coeff_1_0 = g_value_get_double (gimp_value_array_index (args, 4));
+  coeff_1_1 = g_value_get_double (gimp_value_array_index (args, 5));
+  coeff_1_2 = g_value_get_double (gimp_value_array_index (args, 6));
+  coeff_2_0 = g_value_get_double (gimp_value_array_index (args, 7));
+  coeff_2_1 = g_value_get_double (gimp_value_array_index (args, 8));
+  coeff_2_2 = g_value_get_double (gimp_value_array_index (args, 9));
+  transform_direction = g_value_get_enum (gimp_value_array_index (args, 10));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 11));
+  recursion_level = g_value_get_int (gimp_value_array_index (args, 13));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 14));
 
   if (success)
     {
@@ -1367,21 +1369,21 @@ drawable_transform_matrix_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 drawable_transform_matrix_default_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gdouble coeff_0_0;
   gdouble coeff_0_1;
@@ -1395,18 +1397,18 @@ drawable_transform_matrix_default_invoker (GimpProcedure      *procedure,
   gboolean interpolate;
   gint32 clip_result;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  coeff_0_0 = g_value_get_double (&args->values[1]);
-  coeff_0_1 = g_value_get_double (&args->values[2]);
-  coeff_0_2 = g_value_get_double (&args->values[3]);
-  coeff_1_0 = g_value_get_double (&args->values[4]);
-  coeff_1_1 = g_value_get_double (&args->values[5]);
-  coeff_1_2 = g_value_get_double (&args->values[6]);
-  coeff_2_0 = g_value_get_double (&args->values[7]);
-  coeff_2_1 = g_value_get_double (&args->values[8]);
-  coeff_2_2 = g_value_get_double (&args->values[9]);
-  interpolate = g_value_get_boolean (&args->values[10]);
-  clip_result = g_value_get_enum (&args->values[11]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  coeff_0_0 = g_value_get_double (gimp_value_array_index (args, 1));
+  coeff_0_1 = g_value_get_double (gimp_value_array_index (args, 2));
+  coeff_0_2 = g_value_get_double (gimp_value_array_index (args, 3));
+  coeff_1_0 = g_value_get_double (gimp_value_array_index (args, 4));
+  coeff_1_1 = g_value_get_double (gimp_value_array_index (args, 5));
+  coeff_1_2 = g_value_get_double (gimp_value_array_index (args, 6));
+  coeff_2_0 = g_value_get_double (gimp_value_array_index (args, 7));
+  coeff_2_1 = g_value_get_double (gimp_value_array_index (args, 8));
+  coeff_2_2 = g_value_get_double (gimp_value_array_index (args, 9));
+  interpolate = g_value_get_boolean (gimp_value_array_index (args, 10));
+  clip_result = g_value_get_enum (gimp_value_array_index (args, 11));
 
   if (success)
     {
@@ -1471,7 +1473,7 @@ drawable_transform_matrix_default_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
diff --git a/app/pdb/dynamics-cmds.c b/app/pdb/dynamics-cmds.c
index fa85203..53a682a 100644
--- a/app/pdb/dynamics-cmds.c
+++ b/app/pdb/dynamics-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -36,34 +38,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 dynamics_refresh_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gimp_data_factory_data_refresh (gimp->dynamics_factory, context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 dynamics_get_list_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_dynamics = 0;
   gchar **dynamics_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -76,8 +78,8 @@ dynamics_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_dynamics);
-      gimp_value_take_stringarray (&return_vals->values[2], dynamics_list, num_dynamics);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_dynamics);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), dynamics_list, num_dynamics);
     }
 
   return return_vals;
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index 998fc48..5f785c2 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp-edit.h"
@@ -49,20 +51,20 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 edit_cut_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean non_empty = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -90,25 +92,25 @@ edit_cut_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], non_empty);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_copy_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean non_empty = FALSE;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -135,25 +137,25 @@ edit_copy_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], non_empty);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_copy_visible_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean non_empty = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -174,27 +176,27 @@ edit_copy_visible_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], non_empty);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_paste_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean paste_into;
   GimpLayer *floating_sel = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  paste_into = g_value_get_boolean (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  paste_into = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -217,21 +219,21 @@ edit_paste_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], floating_sel);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_paste_as_new_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image = NULL;
 
   if (gimp->global_buffer)
@@ -250,27 +252,27 @@ edit_paste_as_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_named_cut_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   const gchar *buffer_name;
   gchar *real_name = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  buffer_name = g_value_get_string (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -303,27 +305,27 @@ edit_named_cut_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], real_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), real_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_named_copy_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   const gchar *buffer_name;
   gchar *real_name = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  buffer_name = g_value_get_string (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -355,27 +357,27 @@ edit_named_copy_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], real_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), real_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_named_copy_visible_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *buffer_name;
   gchar *real_name = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  buffer_name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -401,29 +403,29 @@ edit_named_copy_visible_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], real_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), real_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_named_paste_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   const gchar *buffer_name;
   gboolean paste_into;
   GimpLayer *floating_sel = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  buffer_name = g_value_get_string (&args->values[1]);
-  paste_into = g_value_get_boolean (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 1));
+  paste_into = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -447,25 +449,25 @@ edit_named_paste_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], floating_sel);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_named_paste_as_new_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *buffer_name;
   GimpImage *image = NULL;
 
-  buffer_name = g_value_get_string (&args->values[0]);
+  buffer_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -486,23 +488,23 @@ edit_named_paste_as_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_clear_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -521,20 +523,20 @@ edit_clear_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_fill_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 fill_type;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  fill_type = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  fill_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -555,13 +557,13 @@ edit_fill_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_bucket_fill_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -573,14 +575,14 @@ edit_bucket_fill_invoker (GimpProcedure      *procedure,
   gdouble x;
   gdouble y;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  fill_mode = g_value_get_enum (&args->values[1]);
-  paint_mode = g_value_get_enum (&args->values[2]);
-  opacity = g_value_get_double (&args->values[3]);
-  threshold = g_value_get_double (&args->values[4]);
-  sample_merged = g_value_get_boolean (&args->values[5]);
-  x = g_value_get_double (&args->values[6]);
-  y = g_value_get_double (&args->values[7]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  fill_mode = g_value_get_enum (gimp_value_array_index (args, 1));
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 2));
+  opacity = g_value_get_double (gimp_value_array_index (args, 3));
+  threshold = g_value_get_double (gimp_value_array_index (args, 4));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 5));
+  x = g_value_get_double (gimp_value_array_index (args, 6));
+  y = g_value_get_double (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -622,13 +624,13 @@ edit_bucket_fill_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_bucket_fill_full_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -642,16 +644,16 @@ edit_bucket_fill_full_invoker (GimpProcedure      *procedure,
   gdouble x;
   gdouble y;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  fill_mode = g_value_get_enum (&args->values[1]);
-  paint_mode = g_value_get_enum (&args->values[2]);
-  opacity = g_value_get_double (&args->values[3]);
-  threshold = g_value_get_double (&args->values[4]);
-  sample_merged = g_value_get_boolean (&args->values[5]);
-  fill_transparent = g_value_get_boolean (&args->values[6]);
-  select_criterion = g_value_get_enum (&args->values[7]);
-  x = g_value_get_double (&args->values[8]);
-  y = g_value_get_double (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  fill_mode = g_value_get_enum (gimp_value_array_index (args, 1));
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 2));
+  opacity = g_value_get_double (gimp_value_array_index (args, 3));
+  threshold = g_value_get_double (gimp_value_array_index (args, 4));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 5));
+  fill_transparent = g_value_get_boolean (gimp_value_array_index (args, 6));
+  select_criterion = g_value_get_enum (gimp_value_array_index (args, 7));
+  x = g_value_get_double (gimp_value_array_index (args, 8));
+  y = g_value_get_double (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -693,13 +695,13 @@ edit_bucket_fill_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_blend_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -719,22 +721,22 @@ edit_blend_invoker (GimpProcedure      *procedure,
   gdouble x2;
   gdouble y2;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  blend_mode = g_value_get_enum (&args->values[1]);
-  paint_mode = g_value_get_enum (&args->values[2]);
-  gradient_type = g_value_get_enum (&args->values[3]);
-  opacity = g_value_get_double (&args->values[4]);
-  offset = g_value_get_double (&args->values[5]);
-  repeat = g_value_get_enum (&args->values[6]);
-  reverse = g_value_get_boolean (&args->values[7]);
-  supersample = g_value_get_boolean (&args->values[8]);
-  max_depth = g_value_get_int (&args->values[9]);
-  threshold = g_value_get_double (&args->values[10]);
-  dither = g_value_get_boolean (&args->values[11]);
-  x1 = g_value_get_double (&args->values[12]);
-  y1 = g_value_get_double (&args->values[13]);
-  x2 = g_value_get_double (&args->values[14]);
-  y2 = g_value_get_double (&args->values[15]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  blend_mode = g_value_get_enum (gimp_value_array_index (args, 1));
+  paint_mode = g_value_get_enum (gimp_value_array_index (args, 2));
+  gradient_type = g_value_get_enum (gimp_value_array_index (args, 3));
+  opacity = g_value_get_double (gimp_value_array_index (args, 4));
+  offset = g_value_get_double (gimp_value_array_index (args, 5));
+  repeat = g_value_get_enum (gimp_value_array_index (args, 6));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 7));
+  supersample = g_value_get_boolean (gimp_value_array_index (args, 8));
+  max_depth = g_value_get_int (gimp_value_array_index (args, 9));
+  threshold = g_value_get_double (gimp_value_array_index (args, 10));
+  dither = g_value_get_boolean (gimp_value_array_index (args, 11));
+  x1 = g_value_get_double (gimp_value_array_index (args, 12));
+  y1 = g_value_get_double (gimp_value_array_index (args, 13));
+  x2 = g_value_get_double (gimp_value_array_index (args, 14));
+  y2 = g_value_get_double (gimp_value_array_index (args, 15));
 
   if (success)
     {
@@ -776,18 +778,18 @@ edit_blend_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_stroke_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -815,20 +817,20 @@ edit_stroke_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 edit_stroke_vectors_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   GimpVectors *vectors;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  vectors = gimp_value_get_vectors (&args->values[1], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
diff --git a/app/pdb/fileops-cmds.c b/app/pdb/fileops-cmds.c
index c80add1..0491595 100644
--- a/app/pdb/fileops-cmds.c
+++ b/app/pdb/fileops-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpconfig/gimpconfig.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp-utils.h"
@@ -47,23 +49,23 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 file_load_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
-  GValueArray         *new_args;
-  GValueArray         *return_vals;
+  GimpValueArray      *new_args;
+  GimpValueArray      *return_vals;
   GimpPlugInProcedure *file_proc;
   GimpProcedure       *proc;
   gchar               *uri;
   gint                 i;
 
   uri = file_utils_filename_to_uri (gimp,
-                                    g_value_get_string (&args->values[1]),
+                                    g_value_get_string (gimp_value_array_index (args, 1)),
                                     error);
 
   if (! uri)
@@ -84,11 +86,12 @@ file_load_invoker (GimpProcedure      *procedure,
   new_args = gimp_procedure_get_arguments (proc);
 
   for (i = 0; i < 3; i++)
-    g_value_transform (&args->values[i], &new_args->values[i]);
+    g_value_transform (gimp_value_array_index (args, i),
+                       gimp_value_array_index (new_args, i));
 
   for (i = 3; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
-      g_value_set_static_string (&new_args->values[i], "");
+      g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
   return_vals =
     gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -96,15 +99,17 @@ file_load_invoker (GimpProcedure      *procedure,
                                              gimp_object_get_name (proc),
                                              new_args);
 
-  g_value_array_free (new_args);
+  gimp_value_array_unref (new_args);
 
-  if (g_value_get_enum (return_vals->values) == GIMP_PDB_SUCCESS)
+  if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) ==
+      GIMP_PDB_SUCCESS)
     {
-      if (return_vals->n_values > 1 &&
-          GIMP_VALUE_HOLDS_IMAGE_ID (return_vals->values + 1))
+      if (gimp_value_array_length (return_vals) > 1 &&
+          GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
         {
-          GimpImage *image = gimp_value_get_image (return_vals->values + 1,
-                                                   gimp);
+          GimpImage *image =
+            gimp_value_get_image (gimp_value_array_index (return_vals, 1),
+                                  gimp);
           gimp_image_set_load_proc (image, file_proc);
         }
     }
@@ -112,24 +117,24 @@ file_load_invoker (GimpProcedure      *procedure,
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 file_load_layer_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 run_mode;
   GimpImage *image;
   const gchar *filename;
   GimpLayer *layer = NULL;
 
-  run_mode = g_value_get_enum (&args->values[0]);
-  image = gimp_value_get_image (&args->values[1], gimp);
-  filename = g_value_get_string (&args->values[2]);
+  run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
+  image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -160,30 +165,30 @@ file_load_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 file_load_layers_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 run_mode;
   GimpImage *image;
   const gchar *filename;
   gint32 num_layers = 0;
   gint32 *layer_ids = NULL;
 
-  run_mode = g_value_get_enum (&args->values[0]);
-  image = gimp_value_get_image (&args->values[1], gimp);
-  filename = g_value_get_string (&args->values[2]);
+  run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
+  image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -226,30 +231,30 @@ file_load_layers_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_layers);
-      gimp_value_take_int32array (&return_vals->values[2], layer_ids, num_layers);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_layers);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), layer_ids, num_layers);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 file_save_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
-  GValueArray         *new_args;
-  GValueArray         *return_vals;
+  GimpValueArray      *new_args;
+  GimpValueArray      *return_vals;
   GimpPlugInProcedure *file_proc;
   GimpProcedure       *proc;
   gchar               *uri;
   gint                 i;
 
   uri = file_utils_filename_to_uri (gimp,
-                                    g_value_get_string (&args->values[3]),
+                                    g_value_get_string (gimp_value_array_index (args, 3)),
                                     error);
 
   if (! uri)
@@ -273,11 +278,12 @@ file_save_invoker (GimpProcedure      *procedure,
   new_args = gimp_procedure_get_arguments (proc);
 
   for (i = 0; i < 5; i++)
-    g_value_transform (&args->values[i], &new_args->values[i]);
+    g_value_transform (gimp_value_array_index (args, i),
+                       gimp_value_array_index (new_args, i));
 
   for (i = 5; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
-      g_value_set_static_string (&new_args->values[i], "");
+      g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
   return_vals =
     gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -285,28 +291,28 @@ file_save_invoker (GimpProcedure      *procedure,
                                              gimp_object_get_name (proc),
                                              new_args);
 
-  g_value_array_free (new_args);
+  gimp_value_array_unref (new_args);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 file_load_thumbnail_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filename;
   gint32 width = 0;
   gint32 height = 0;
   gint32 thumb_data_count = 0;
   guint8 *thumb_data = NULL;
 
-  filename = g_value_get_string (&args->values[0]);
+  filename = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -331,29 +337,29 @@ file_load_thumbnail_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], thumb_data_count);
-      gimp_value_take_int8array (&return_vals->values[4], thumb_data, thumb_data_count);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), thumb_data_count);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 4), thumb_data, thumb_data_count);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 file_save_thumbnail_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *filename;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  filename = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -364,20 +370,20 @@ file_save_thumbnail_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 temp_name_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *extension;
   gchar *name = NULL;
 
-  extension = g_value_get_string (&args->values[0]);
+  extension = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -388,18 +394,18 @@ temp_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 register_magic_load_handler_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
@@ -407,10 +413,10 @@ register_magic_load_handler_invoker (GimpProcedure      *procedure,
   const gchar *prefixes;
   const gchar *magics;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  extensions = g_value_get_string (&args->values[1]);
-  prefixes = g_value_get_string (&args->values[2]);
-  magics = g_value_get_string (&args->values[3]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  extensions = g_value_get_string (gimp_value_array_index (args, 1));
+  prefixes = g_value_get_string (gimp_value_array_index (args, 2));
+  magics = g_value_get_string (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -427,22 +433,22 @@ register_magic_load_handler_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 register_load_handler_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
   const gchar *extensions;
   const gchar *prefixes;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  extensions = g_value_get_string (&args->values[1]);
-  prefixes = g_value_get_string (&args->values[2]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  extensions = g_value_get_string (gimp_value_array_index (args, 1));
+  prefixes = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -459,22 +465,22 @@ register_load_handler_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 register_save_handler_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
   const gchar *extensions;
   const gchar *prefixes;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  extensions = g_value_get_string (&args->values[1]);
-  prefixes = g_value_get_string (&args->values[2]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  extensions = g_value_get_string (gimp_value_array_index (args, 1));
+  prefixes = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -491,20 +497,20 @@ register_save_handler_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 register_file_handler_mime_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
   const gchar *mime_type;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  mime_type = g_value_get_string (&args->values[1]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  mime_type = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -520,20 +526,20 @@ register_file_handler_mime_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 register_thumbnail_loader_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
   const gchar *load_proc;
   const gchar *thumb_proc;
 
-  load_proc = g_value_get_string (&args->values[0]);
-  thumb_proc = g_value_get_string (&args->values[1]);
+  load_proc = g_value_get_string (gimp_value_array_index (args, 0));
+  thumb_proc = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/floating-sel-cmds.c b/app/pdb/floating-sel-cmds.c
index 620b70b..f31ad93 100644
--- a/app/pdb/floating-sel-cmds.c
+++ b/app/pdb/floating-sel-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpdrawable.h"
@@ -40,18 +42,18 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_remove_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *floating_sel;
 
-  floating_sel = gimp_value_get_layer (&args->values[0], gimp);
+  floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -74,18 +76,18 @@ floating_sel_remove_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_anchor_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *floating_sel;
 
-  floating_sel = gimp_value_get_layer (&args->values[0], gimp);
+  floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -107,18 +109,18 @@ floating_sel_anchor_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_to_layer_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *floating_sel;
 
-  floating_sel = gimp_value_get_layer (&args->values[0], gimp);
+  floating_sel = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -140,20 +142,20 @@ floating_sel_to_layer_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_attach_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   GimpDrawable *drawable;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -168,13 +170,13 @@ floating_sel_attach_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_rigor_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   if (success)
@@ -184,13 +186,13 @@ floating_sel_rigor_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 floating_sel_relax_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   if (success)
diff --git a/app/pdb/font-select-cmds.c b/app/pdb/font-select-cmds.c
index 61f973b..26a67ab 100644
--- a/app/pdb/font-select-cmds.c
+++ b/app/pdb/font-select-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -33,22 +35,22 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 fonts_popup_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   const gchar *font_callback;
   const gchar *popup_title;
   const gchar *initial_font;
 
-  font_callback = g_value_get_string (&args->values[0]);
-  popup_title = g_value_get_string (&args->values[1]);
-  initial_font = g_value_get_string (&args->values[2]);
+  font_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  popup_title = g_value_get_string (gimp_value_array_index (args, 1));
+  initial_font = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -64,18 +66,18 @@ fonts_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 fonts_close_popup_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   const gchar *font_callback;
 
-  font_callback = g_value_get_string (&args->values[0]);
+  font_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -89,20 +91,20 @@ fonts_close_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 fonts_set_popup_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *font_callback;
   const gchar *font_name;
 
-  font_callback = g_value_get_string (&args->values[0]);
-  font_name = g_value_get_string (&args->values[1]);
+  font_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  font_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/fonts-cmds.c b/app/pdb/fonts-cmds.c
index 86b92e8..399448f 100644
--- a/app/pdb/fonts-cmds.c
+++ b/app/pdb/fonts-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -36,34 +38,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 fonts_refresh_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gimp_fonts_load (gimp);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 fonts_get_list_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_fonts = 0;
   gchar **font_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -76,8 +78,8 @@ fonts_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_fonts);
-      gimp_value_take_stringarray (&return_vals->values[2], font_list, num_fonts);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_fonts);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), font_list, num_fonts);
     }
 
   return return_vals;
diff --git a/app/pdb/gimp-cmds.c b/app/pdb/gimp-cmds.c
index 43e691d..5d571aa 100644
--- a/app/pdb/gimp-cmds.c
+++ b/app/pdb/gimp-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp-parasites.h"
@@ -37,56 +39,56 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 version_invoker (GimpProcedure      *procedure,
-                 Gimp               *gimp,
-                 GimpContext        *context,
-                 GimpProgress       *progress,
-                 const GValueArray  *args,
-                 GError            **error)
+                 Gimp                  *gimp,
+                 GimpContext           *context,
+                 GimpProgress          *progress,
+                 const GimpValueArray  *args,
+                 GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *version = NULL;
 
   version = g_strdup (GIMP_VERSION);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], version);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), version);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 getpid_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 pid = 0;
 
   pid = gimp_get_pid ();
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], pid);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), pid);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 quit_invoker (GimpProcedure      *procedure,
-              Gimp               *gimp,
-              GimpContext        *context,
-              GimpProgress       *progress,
-              const GValueArray  *args,
-              GError            **error)
+              Gimp                  *gimp,
+              GimpContext           *context,
+              GimpProgress          *progress,
+              const GimpValueArray  *args,
+              GError               **error)
 {
   gboolean success = TRUE;
   gboolean force;
 
-  force = g_value_get_boolean (&args->values[0]);
+  force = g_value_get_boolean (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -97,18 +99,18 @@ quit_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 attach_parasite_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const GimpParasite *parasite;
 
-  parasite = g_value_get_boxed (&args->values[0]);
+  parasite = g_value_get_boxed (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -119,18 +121,18 @@ attach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 detach_parasite_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -141,20 +143,20 @@ detach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 get_parasite_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   GimpParasite *parasite = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -168,20 +170,20 @@ get_parasite_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_boxed (&return_vals->values[1], parasite);
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasite);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_parasite_list_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_parasites = 0;
   gchar **parasites = NULL;
 
@@ -189,8 +191,8 @@ get_parasite_list_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_int (&return_vals->values[1], num_parasites);
-  gimp_value_take_stringarray (&return_vals->values[2], parasites, num_parasites);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
 
   return return_vals;
 }
diff --git a/app/pdb/gimppdb.c b/app/pdb/gimppdb.c
index c236298..cd648f0 100644
--- a/app/pdb/gimppdb.c
+++ b/app/pdb/gimppdb.c
@@ -279,16 +279,16 @@ gimp_pdb_lookup_compat_proc_name (GimpPDB     *pdb,
   return g_hash_table_lookup (pdb->compat_proc_names, old_name);
 }
 
-GValueArray *
-gimp_pdb_execute_procedure_by_name_args (GimpPDB       *pdb,
-                                         GimpContext   *context,
-                                         GimpProgress  *progress,
-                                         GError       **error,
-                                         const gchar   *name,
-                                         GValueArray   *args)
+GimpValueArray *
+gimp_pdb_execute_procedure_by_name_args (GimpPDB         *pdb,
+                                         GimpContext     *context,
+                                         GimpProgress    *progress,
+                                         GError         **error,
+                                         const gchar     *name,
+                                         GimpValueArray  *args)
 {
-  GValueArray *return_vals = NULL;
-  GList       *list;
+  GimpValueArray *return_vals = NULL;
+  GList          *list;
 
   g_return_val_if_fail (GIMP_IS_PDB (pdb), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -322,7 +322,8 @@ gimp_pdb_execute_procedure_by_name_args (GimpPDB       *pdb,
                                             pdb->gimp, context, progress,
                                             args, error);
 
-      if (g_value_get_enum (&return_vals->values[0]) == GIMP_PDB_PASS_THROUGH)
+      if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) ==
+          GIMP_PDB_PASS_THROUGH)
         {
           /*  If the return value is GIMP_PDB_PASS_THROUGH and there is
            *  a next procedure in the list, destroy the return values
@@ -330,7 +331,7 @@ gimp_pdb_execute_procedure_by_name_args (GimpPDB       *pdb,
            */
           if (g_list_next (list))
             {
-              g_value_array_free (return_vals);
+              gimp_value_array_unref (return_vals);
               g_clear_error (error);
             }
         }
@@ -346,7 +347,7 @@ gimp_pdb_execute_procedure_by_name_args (GimpPDB       *pdb,
   return return_vals;
 }
 
-GValueArray *
+GimpValueArray *
 gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
                                     GimpContext   *context,
                                     GimpProgress  *progress,
@@ -354,11 +355,11 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
                                     const gchar   *name,
                                     ...)
 {
-  GimpProcedure *procedure;
-  GValueArray   *args;
-  GValueArray   *return_vals;
-  va_list        va_args;
-  gint           i;
+  GimpProcedure  *procedure;
+  GimpValueArray *args;
+  GimpValueArray *return_vals;
+  va_list         va_args;
+  gint            i;
 
   g_return_val_if_fail (GIMP_IS_PDB (pdb), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -395,7 +396,7 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
       if (arg_type == G_TYPE_NONE)
         break;
 
-      value = &args->values[i];
+      value = gimp_value_array_index (args, i);
 
       if (arg_type != G_VALUE_TYPE (value))
         {
@@ -403,7 +404,7 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
           const gchar *expected = g_type_name (G_VALUE_TYPE (value));
           const gchar *got      = g_type_name (arg_type);
 
-          g_value_array_free (args);
+          gimp_value_array_unref (args);
 
           pdb_error = g_error_new (GIMP_PDB_ERROR,
                                    GIMP_PDB_ERROR_INVALID_ARGUMENT,
@@ -432,7 +433,7 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
           g_warning ("%s: %s", G_STRFUNC, error_msg);
           g_free (error_msg);
 
-          g_value_array_free (args);
+          gimp_value_array_unref (args);
 
           return_vals = gimp_procedure_get_return_values (procedure,
                                                           FALSE, pdb_error);
@@ -450,7 +451,7 @@ gimp_pdb_execute_procedure_by_name (GimpPDB       *pdb,
                                                          progress, error,
                                                          name, args);
 
-  g_value_array_free (args);
+  gimp_value_array_unref (args);
 
   return return_vals;
 }
diff --git a/app/pdb/gimppdb.h b/app/pdb/gimppdb.h
index 203181d..2bb2cdc 100644
--- a/app/pdb/gimppdb.h
+++ b/app/pdb/gimppdb.h
@@ -53,38 +53,38 @@ struct _GimpPDBClass
 };
 
 
-GType           gimp_pdb_get_type                       (void) G_GNUC_CONST;
-
-GimpPDB       * gimp_pdb_new                            (Gimp          *gimp);
-
-void            gimp_pdb_register_procedure             (GimpPDB       *pdb,
-                                                         GimpProcedure *procedure);
-void            gimp_pdb_unregister_procedure           (GimpPDB       *pdb,
-                                                         GimpProcedure *procedure);
-
-GimpProcedure * gimp_pdb_lookup_procedure               (GimpPDB       *pdb,
-                                                         const gchar   *name);
-
-void            gimp_pdb_register_compat_proc_name      (GimpPDB       *pdb,
-                                                         const gchar   *old_name,
-                                                         const gchar   *new_name);
-const gchar   * gimp_pdb_lookup_compat_proc_name        (GimpPDB       *pdb,
-                                                         const gchar   *old_name);
-
-GValueArray   * gimp_pdb_execute_procedure_by_name_args (GimpPDB       *pdb,
-                                                         GimpContext   *context,
-                                                         GimpProgress  *progress,
-                                                         GError       **error,
-                                                         const gchar   *name,
-                                                         GValueArray   *args);
-GValueArray   * gimp_pdb_execute_procedure_by_name      (GimpPDB       *pdb,
-                                                         GimpContext   *context,
-                                                         GimpProgress  *progress,
-                                                         GError       **error,
-                                                         const gchar   *name,
-                                                         ...);
-
-GList         * gimp_pdb_get_deprecated_procedures      (GimpPDB       *pdb);
+GType            gimp_pdb_get_type                       (void) G_GNUC_CONST;
+
+GimpPDB        * gimp_pdb_new                            (Gimp           *gimp);
+
+void             gimp_pdb_register_procedure             (GimpPDB        *pdb,
+                                                          GimpProcedure  *procedure);
+void             gimp_pdb_unregister_procedure           (GimpPDB        *pdb,
+                                                          GimpProcedure  *procedure);
+
+GimpProcedure  * gimp_pdb_lookup_procedure               (GimpPDB        *pdb,
+                                                          const gchar    *name);
+
+void             gimp_pdb_register_compat_proc_name      (GimpPDB        *pdb,
+                                                          const gchar    *old_name,
+                                                          const gchar    *new_name);
+const gchar    * gimp_pdb_lookup_compat_proc_name        (GimpPDB        *pdb,
+                                                          const gchar    *old_name);
+
+GimpValueArray * gimp_pdb_execute_procedure_by_name_args (GimpPDB        *pdb,
+                                                          GimpContext    *context,
+                                                          GimpProgress   *progress,
+                                                          GError        **error,
+                                                          const gchar    *name,
+                                                          GimpValueArray *args);
+GimpValueArray * gimp_pdb_execute_procedure_by_name      (GimpPDB        *pdb,
+                                                          GimpContext    *context,
+                                                          GimpProgress   *progress,
+                                                          GError        **error,
+                                                          const gchar    *name,
+                                                          ...);
+
+GList          * gimp_pdb_get_deprecated_procedures      (GimpPDB        *pdb);
 
 
 #endif  /*  __GIMP_PDB_H__  */
diff --git a/app/pdb/gimpprocedure.c b/app/pdb/gimpprocedure.c
index 7c1b726..419e1de 100644
--- a/app/pdb/gimpprocedure.c
+++ b/app/pdb/gimpprocedure.c
@@ -42,31 +42,31 @@
 #include "gimp-intl.h"
 
 
-static void          gimp_procedure_finalize      (GObject        *object);
-
-static gint64        gimp_procedure_get_memsize   (GimpObject     *object,
-                                                   gint64         *gui_size);
-
-static GValueArray * gimp_procedure_real_execute  (GimpProcedure  *procedure,
-                                                   Gimp           *gimp,
-                                                   GimpContext    *context,
-                                                   GimpProgress   *progress,
-                                                   GValueArray    *args,
-                                                   GError        **error);
-static void    gimp_procedure_real_execute_async  (GimpProcedure  *procedure,
-                                                   Gimp           *gimp,
-                                                   GimpContext    *context,
-                                                   GimpProgress   *progress,
-                                                   GValueArray    *args,
-                                                   GimpObject     *display);
-
-static void          gimp_procedure_free_strings  (GimpProcedure  *procedure);
-static gboolean      gimp_procedure_validate_args (GimpProcedure  *procedure,
-                                                   GParamSpec    **param_specs,
-                                                   gint            n_param_specs,
-                                                   GValueArray    *args,
-                                                   gboolean        return_vals,
-                                                   GError        **error);
+static void             gimp_procedure_finalize      (GObject         *object);
+
+static gint64           gimp_procedure_get_memsize   (GimpObject      *object,
+                                                      gint64          *gui_size);
+
+static GimpValueArray * gimp_procedure_real_execute  (GimpProcedure   *procedure,
+                                                      Gimp            *gimp,
+                                                      GimpContext     *context,
+                                                      GimpProgress    *progress,
+                                                      GimpValueArray  *args,
+                                                      GError         **error);
+static void       gimp_procedure_real_execute_async  (GimpProcedure   *procedure,
+                                                      Gimp            *gimp,
+                                                      GimpContext     *context,
+                                                      GimpProgress    *progress,
+                                                      GimpValueArray  *args,
+                                                      GimpObject      *display);
+
+static void             gimp_procedure_free_strings  (GimpProcedure   *procedure);
+static gboolean         gimp_procedure_validate_args (GimpProcedure   *procedure,
+                                                      GParamSpec     **param_specs,
+                                                      gint             n_param_specs,
+                                                      GimpValueArray  *args,
+                                                      gboolean         return_vals,
+                                                      GError         **error);
 
 
 G_DEFINE_TYPE (GimpProcedure, gimp_procedure, GIMP_TYPE_OBJECT)
@@ -156,15 +156,16 @@ gimp_procedure_get_memsize (GimpObject *object,
                                                                   gui_size);
 }
 
-static GValueArray *
-gimp_procedure_real_execute (GimpProcedure  *procedure,
-                             Gimp           *gimp,
-                             GimpContext    *context,
-                             GimpProgress   *progress,
-                             GValueArray    *args,
-                             GError        **error)
+static GimpValueArray *
+gimp_procedure_real_execute (GimpProcedure   *procedure,
+                             Gimp            *gimp,
+                             GimpContext     *context,
+                             GimpProgress    *progress,
+                             GimpValueArray  *args,
+                             GError         **error)
 {
-  g_return_val_if_fail (args->n_values >= procedure->num_args, NULL);
+  g_return_val_if_fail (gimp_value_array_length (args) >=
+                        procedure->num_args, NULL);
 
   return procedure->marshal_func (procedure, gimp,
                                   context, progress,
@@ -176,13 +177,13 @@ gimp_procedure_real_execute_async (GimpProcedure  *procedure,
                                    Gimp           *gimp,
                                    GimpContext    *context,
                                    GimpProgress   *progress,
-                                   GValueArray    *args,
+                                   GimpValueArray *args,
                                    GimpObject     *display)
 {
-  GValueArray *return_vals;
-  GError      *error = NULL;
+  GimpValueArray *return_vals;
+  GError         *error = NULL;
 
-  g_return_if_fail (args->n_values >= procedure->num_args);
+  g_return_if_fail (gimp_value_array_length (args) >= procedure->num_args);
 
   return_vals = GIMP_PROCEDURE_GET_CLASS (procedure)->execute (procedure,
                                                                gimp,
@@ -191,7 +192,7 @@ gimp_procedure_real_execute_async (GimpProcedure  *procedure,
                                                                args,
                                                                &error);
 
-  g_value_array_free (return_vals);
+  gimp_value_array_unref (return_vals);
 
   if (error)
     {
@@ -293,16 +294,16 @@ gimp_procedure_take_strings (GimpProcedure *procedure,
   procedure->static_strings = FALSE;
 }
 
-GValueArray *
-gimp_procedure_execute (GimpProcedure  *procedure,
-                        Gimp           *gimp,
-                        GimpContext    *context,
-                        GimpProgress   *progress,
-                        GValueArray    *args,
-                        GError        **error)
+GimpValueArray *
+gimp_procedure_execute (GimpProcedure   *procedure,
+                        Gimp            *gimp,
+                        GimpContext     *context,
+                        GimpProgress    *progress,
+                        GimpValueArray  *args,
+                        GError         **error)
 {
-  GValueArray *return_vals;
-  GError      *pdb_error = NULL;
+  GimpValueArray *return_vals;
+  GError         *pdb_error = NULL;
 
   g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
@@ -339,7 +340,7 @@ gimp_procedure_execute (GimpProcedure  *procedure,
 
   if (return_vals)
     {
-      switch (g_value_get_enum (&return_vals->values[0]))
+      switch (g_value_get_enum (gimp_value_array_index (return_vals, 0)))
         {
         case GIMP_PDB_CALLING_ERROR:
         case GIMP_PDB_EXECUTION_ERROR:
@@ -349,12 +350,14 @@ gimp_procedure_execute (GimpProcedure  *procedure,
            */
           if (error && *error == NULL)
             {
-              if (return_vals->n_values > 1 &&
-                  G_VALUE_HOLDS_STRING (&return_vals->values[1]))
+              if (gimp_value_array_length (return_vals) > 1 &&
+                  G_VALUE_HOLDS_STRING (gimp_value_array_index (return_vals, 1)))
                 {
+                  GValue *value = gimp_value_array_index (return_vals, 1);
+
                   g_set_error_literal (error, GIMP_PDB_ERROR,
                                        GIMP_PDB_ERROR_FAILED,
-				       g_value_get_string (&return_vals->values[1]));
+				       g_value_get_string (value));
                 }
             }
           break;
@@ -389,7 +392,7 @@ gimp_procedure_execute_async (GimpProcedure  *procedure,
                               Gimp           *gimp,
                               GimpContext    *context,
                               GimpProgress   *progress,
-                              GValueArray    *args,
+                              GimpValueArray *args,
                               GimpObject     *display,
                               GError        **error)
 {
@@ -418,58 +421,58 @@ gimp_procedure_execute_async (GimpProcedure  *procedure,
     }
 }
 
-GValueArray *
+GimpValueArray *
 gimp_procedure_get_arguments (GimpProcedure *procedure)
 {
-  GValueArray *args;
-  GValue       value = { 0, };
-  gint         i;
+  GimpValueArray *args;
+  GValue          value = { 0, };
+  gint            i;
 
   g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
 
-  args = g_value_array_new (procedure->num_args);
+  args = gimp_value_array_new (procedure->num_args);
 
   for (i = 0; i < procedure->num_args; i++)
     {
       g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (procedure->args[i]));
-      g_value_array_append (args, &value);
+      gimp_value_array_append (args, &value);
       g_value_unset (&value);
     }
 
   return args;
 }
 
-GValueArray *
+GimpValueArray *
 gimp_procedure_get_return_values (GimpProcedure *procedure,
                                   gboolean       success,
                                   const GError  *error)
 {
-  GValueArray *args;
-  GValue       value = { 0, };
-  gint         i;
+  GimpValueArray *args;
+  GValue          value = { 0, };
+  gint            i;
 
   g_return_val_if_fail (success == FALSE || GIMP_IS_PROCEDURE (procedure),
                         NULL);
 
   if (success)
     {
-      args = g_value_array_new (procedure->num_values + 1);
+      args = gimp_value_array_new (procedure->num_values + 1);
 
       g_value_init (&value, GIMP_TYPE_PDB_STATUS_TYPE);
       g_value_set_enum (&value, GIMP_PDB_SUCCESS);
-      g_value_array_append (args, &value);
+      gimp_value_array_append (args, &value);
       g_value_unset (&value);
 
       for (i = 0; i < procedure->num_values; i++)
         {
           g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (procedure->values[i]));
-          g_value_array_append (args, &value);
+          gimp_value_array_append (args, &value);
           g_value_unset (&value);
         }
     }
   else
     {
-      args = g_value_array_new ((error && error->message) ? 2 : 1);
+      args = gimp_value_array_new ((error && error->message) ? 2 : 1);
 
       g_value_init (&value, GIMP_TYPE_PDB_STATUS_TYPE);
 
@@ -499,14 +502,14 @@ gimp_procedure_get_return_values (GimpProcedure *procedure,
           g_value_set_enum (&value, GIMP_PDB_EXECUTION_ERROR);
         }
 
-      g_value_array_append (args, &value);
+      gimp_value_array_append (args, &value);
       g_value_unset (&value);
 
       if (error && error->message)
         {
           g_value_init (&value, G_TYPE_STRING);
           g_value_set_string (&value, error->message);
-          g_value_array_append (args, &value);
+          gimp_value_array_append (args, &value);
           g_value_unset (&value);
         }
     }
@@ -620,15 +623,15 @@ static gboolean
 gimp_procedure_validate_args (GimpProcedure  *procedure,
                               GParamSpec    **param_specs,
                               gint            n_param_specs,
-                              GValueArray    *args,
+                              GimpValueArray *args,
                               gboolean        return_vals,
                               GError        **error)
 {
   gint i;
 
-  for (i = 0; i < MIN (args->n_values, n_param_specs); i++)
+  for (i = 0; i < MIN (gimp_value_array_length (args), n_param_specs); i++)
     {
-      GValue     *arg       = &args->values[i];
+      GValue     *arg       = gimp_value_array_index (args, i);
       GParamSpec *pspec     = param_specs[i];
       GType       arg_type  = G_VALUE_TYPE (arg);
       GType       spec_type = G_PARAM_SPEC_VALUE_TYPE (pspec);
diff --git a/app/pdb/gimpprocedure.h b/app/pdb/gimpprocedure.h
index 9b3b476..dd837d4 100644
--- a/app/pdb/gimpprocedure.h
+++ b/app/pdb/gimpprocedure.h
@@ -22,12 +22,12 @@
 #include "core/gimpobject.h"
 
 
-typedef GValueArray * (* GimpMarshalFunc) (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error);
+typedef GimpValueArray * (* GimpMarshalFunc) (GimpProcedure         *procedure,
+                                              Gimp                  *gimp,
+                                              GimpContext           *context,
+                                              GimpProgress          *progress,
+                                              const GimpValueArray  *args,
+                                              GError               **error);
 
 
 #define GIMP_TYPE_PROCEDURE            (gimp_procedure_get_type ())
@@ -69,79 +69,79 @@ struct _GimpProcedureClass
 {
   GimpObjectClass parent_class;
 
-  GValueArray * (* execute)       (GimpProcedure  *procedure,
-                                   Gimp           *gimp,
-                                   GimpContext    *context,
-                                   GimpProgress   *progress,
-                                   GValueArray    *args,
-                                   GError        **error);
-  void          (* execute_async) (GimpProcedure  *procedure,
-                                   Gimp           *gimp,
-                                   GimpContext    *context,
-                                   GimpProgress   *progress,
-                                   GValueArray    *args,
-                                   GimpObject     *display);
+  GimpValueArray * (* execute)       (GimpProcedure   *procedure,
+                                      Gimp            *gimp,
+                                      GimpContext     *context,
+                                      GimpProgress    *progress,
+                                      GimpValueArray  *args,
+                                      GError         **error);
+  void             (* execute_async) (GimpProcedure   *procedure,
+                                      Gimp            *gimp,
+                                      GimpContext     *context,
+                                      GimpProgress    *progress,
+                                      GimpValueArray  *args,
+                                      GimpObject      *display);
 };
 
 
-GType           gimp_procedure_get_type           (void) G_GNUC_CONST;
-
-GimpProcedure * gimp_procedure_new                (GimpMarshalFunc   marshal_func);
-
-void            gimp_procedure_set_strings        (GimpProcedure    *procedure,
-                                                   const gchar      *original_name,
-                                                   const gchar      *blurb,
-                                                   const gchar      *help,
-                                                   const gchar      *author,
-                                                   const gchar      *copyright,
-                                                   const gchar      *date,
-                                                   const gchar      *deprecated);
-void            gimp_procedure_set_static_strings (GimpProcedure    *procedure,
-                                                   const gchar      *original_name,
-                                                   const gchar      *blurb,
-                                                   const gchar      *help,
-                                                   const gchar      *author,
-                                                   const gchar      *copyright,
-                                                   const gchar      *date,
-                                                   const gchar      *deprecated);
-void            gimp_procedure_take_strings       (GimpProcedure    *procedure,
-                                                   gchar            *original_name,
-                                                   gchar            *blurb,
-                                                   gchar            *help,
-                                                   gchar            *author,
-                                                   gchar            *copyright,
-                                                   gchar            *date,
-                                                   gchar            *deprecated);
-
-void            gimp_procedure_add_argument       (GimpProcedure    *procedure,
-                                                   GParamSpec       *pspec);
-void            gimp_procedure_add_return_value   (GimpProcedure    *procedure,
-                                                   GParamSpec       *pspec);
-
-GValueArray   * gimp_procedure_get_arguments      (GimpProcedure    *procedure);
-GValueArray   * gimp_procedure_get_return_values  (GimpProcedure    *procedure,
-                                                   gboolean          success,
-                                                   const GError     *error);
-
-GimpProcedure * gimp_procedure_create_override    (GimpProcedure    *procedure,
-                                                   GimpMarshalFunc   new_marshal_func);
-
-GValueArray   * gimp_procedure_execute            (GimpProcedure    *procedure,
-                                                   Gimp             *gimp,
-                                                   GimpContext      *context,
-                                                   GimpProgress     *progress,
-                                                   GValueArray      *args,
-                                                   GError          **error);
-void            gimp_procedure_execute_async      (GimpProcedure    *procedure,
-                                                   Gimp             *gimp,
-                                                   GimpContext      *context,
-                                                   GimpProgress     *progress,
-                                                   GValueArray      *args,
-                                                   GimpObject       *display,
-                                                   GError          **error);
-
-gint            gimp_procedure_name_compare       (GimpProcedure    *proc1,
-                                                   GimpProcedure    *proc2);
+GType            gimp_procedure_get_type           (void) G_GNUC_CONST;
+
+GimpProcedure  * gimp_procedure_new                (GimpMarshalFunc   marshal_func);
+
+void             gimp_procedure_set_strings        (GimpProcedure    *procedure,
+                                                    const gchar      *original_name,
+                                                    const gchar      *blurb,
+                                                    const gchar      *help,
+                                                    const gchar      *author,
+                                                    const gchar      *copyright,
+                                                    const gchar      *date,
+                                                    const gchar      *deprecated);
+void             gimp_procedure_set_static_strings (GimpProcedure    *procedure,
+                                                    const gchar      *original_name,
+                                                    const gchar      *blurb,
+                                                    const gchar      *help,
+                                                    const gchar      *author,
+                                                    const gchar      *copyright,
+                                                    const gchar      *date,
+                                                    const gchar      *deprecated);
+void             gimp_procedure_take_strings       (GimpProcedure    *procedure,
+                                                    gchar            *original_name,
+                                                    gchar            *blurb,
+                                                    gchar            *help,
+                                                    gchar            *author,
+                                                    gchar            *copyright,
+                                                    gchar            *date,
+                                                    gchar            *deprecated);
+
+void             gimp_procedure_add_argument       (GimpProcedure    *procedure,
+                                                    GParamSpec       *pspec);
+void             gimp_procedure_add_return_value   (GimpProcedure    *procedure,
+                                                    GParamSpec       *pspec);
+
+GimpValueArray * gimp_procedure_get_arguments      (GimpProcedure    *procedure);
+GimpValueArray * gimp_procedure_get_return_values  (GimpProcedure    *procedure,
+                                                    gboolean          success,
+                                                    const GError     *error);
+
+GimpProcedure  * gimp_procedure_create_override    (GimpProcedure    *procedure,
+                                                    GimpMarshalFunc   new_marshal_func);
+
+GimpValueArray * gimp_procedure_execute            (GimpProcedure    *procedure,
+                                                    Gimp             *gimp,
+                                                    GimpContext      *context,
+                                                    GimpProgress     *progress,
+                                                    GimpValueArray   *args,
+                                                    GError          **error);
+void             gimp_procedure_execute_async      (GimpProcedure    *procedure,
+                                                    Gimp             *gimp,
+                                                    GimpContext      *context,
+                                                    GimpProgress     *progress,
+                                                    GimpValueArray   *args,
+                                                    GimpObject       *display,
+                                                    GError          **error);
+
+gint             gimp_procedure_name_compare       (GimpProcedure    *proc1,
+                                                    GimpProcedure    *proc2);
 
 
 
diff --git a/app/pdb/gimprc-cmds.c b/app/pdb/gimprc-cmds.c
index 09f875c..5d64d8c 100644
--- a/app/pdb/gimprc-cmds.c
+++ b/app/pdb/gimprc-cmds.c
@@ -29,6 +29,8 @@
 #include "libgimpconfig/gimpconfig.h"
 #include "libgimpmodule/gimpmodule.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "config/gimprc.h"
@@ -42,20 +44,20 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 gimprc_query_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *token;
   gchar *value = NULL;
 
-  token = g_value_get_string (&args->values[0]);
+  token = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -75,25 +77,25 @@ gimprc_query_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], value);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), value);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gimprc_set_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   const gchar *token;
   const gchar *value;
 
-  token = g_value_get_string (&args->values[0]);
-  value = g_value_get_string (&args->values[1]);
+  token = g_value_get_string (gimp_value_array_index (args, 0));
+  value = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -110,53 +112,53 @@ gimprc_set_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 get_default_comment_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *comment = NULL;
 
   comment = g_strdup (gimp_template_get_comment (gimp->config->default_image));
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], comment);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), comment);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_default_unit_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id = 0;
 
   unit_id = gimp_get_default_unit ();
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], unit_id);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), unit_id);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_monitor_resolution_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gdouble xres = 0.0;
   gdouble yres = 0.0;
 
@@ -165,65 +167,65 @@ get_monitor_resolution_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_double (&return_vals->values[1], xres);
-  g_value_set_double (&return_vals->values[2], yres);
+  g_value_set_double (gimp_value_array_index (return_vals, 1), xres);
+  g_value_set_double (gimp_value_array_index (return_vals, 2), yres);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_theme_dir_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *theme_dir = NULL;
 
   theme_dir = g_strdup (gimp_get_theme_dir (gimp));
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], theme_dir);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), theme_dir);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_color_configuration_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *config = NULL;
 
   config = gimp_config_serialize_to_string (GIMP_CONFIG (gimp->config->color_management), NULL);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], config);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), config);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 get_module_load_inhibit_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *load_inhibit = NULL;
 
   load_inhibit = g_strdup (gimp_module_db_get_load_inhibit (gimp->module_db));
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], load_inhibit);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), load_inhibit);
 
   return return_vals;
 }
diff --git a/app/pdb/gradient-cmds.c b/app/pdb/gradient-cmds.c
index 4c4a4e2..adbf1d5 100644
--- a/app/pdb/gradient-cmds.c
+++ b/app/pdb/gradient-cmds.c
@@ -28,6 +28,8 @@
 
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -91,20 +93,20 @@ gradient_get_range (Gimp                 *gimp,
   return gradient;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_new_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -121,25 +123,25 @@ gradient_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_duplicate_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *copy_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -164,25 +166,25 @@ gradient_duplicate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], copy_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), copy_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_is_editable_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gboolean editable = FALSE;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -198,27 +200,27 @@ gradient_is_editable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], editable);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), editable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_rename_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   const gchar *new_name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  new_name = g_value_get_string (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  new_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -237,23 +239,23 @@ gradient_rename_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_delete_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -271,20 +273,20 @@ gradient_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_get_number_of_segments_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_segments = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -306,30 +308,30 @@ gradient_get_number_of_segments_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], num_segments);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), num_segments);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_get_uniform_samples_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_samples;
   gboolean reverse;
   gint32 num_color_samples = 0;
   gdouble *color_samples = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  num_samples = g_value_get_int (&args->values[1]);
-  reverse = g_value_get_boolean (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  num_samples = g_value_get_int (gimp_value_array_index (args, 1));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -370,23 +372,23 @@ gradient_get_uniform_samples_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_color_samples);
-      gimp_value_take_floatarray (&return_vals->values[2], color_samples, num_color_samples);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_color_samples);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 2), color_samples, num_color_samples);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_get_custom_samples_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_samples;
   const gdouble *positions;
@@ -394,10 +396,10 @@ gradient_get_custom_samples_invoker (GimpProcedure      *procedure,
   gint32 num_color_samples = 0;
   gdouble *color_samples = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  num_samples = g_value_get_int (&args->values[1]);
-  positions = gimp_value_get_floatarray (&args->values[2]);
-  reverse = g_value_get_boolean (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  num_samples = g_value_get_int (gimp_value_array_index (args, 1));
+  positions = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -437,30 +439,30 @@ gradient_get_custom_samples_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_color_samples);
-      gimp_value_take_floatarray (&return_vals->values[2], color_samples, num_color_samples);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_color_samples);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 2), color_samples, num_color_samples);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_left_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
   gdouble opacity = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -483,20 +485,20 @@ gradient_segment_get_left_color_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      gimp_value_set_rgb (&return_vals->values[1], &color);
-      g_value_set_double (&return_vals->values[2], opacity);
+      gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), opacity);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_set_left_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -504,10 +506,10 @@ gradient_segment_set_left_color_invoker (GimpProcedure      *procedure,
   GimpRGB color;
   gdouble opacity;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
-  gimp_value_get_rgb (&args->values[2], &color);
-  opacity = g_value_get_double (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
+  gimp_value_get_rgb (gimp_value_array_index (args, 2), &color);
+  opacity = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -529,23 +531,23 @@ gradient_segment_set_left_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_right_color_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
   gdouble opacity = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -568,20 +570,20 @@ gradient_segment_get_right_color_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      gimp_value_set_rgb (&return_vals->values[1], &color);
-      g_value_set_double (&return_vals->values[2], opacity);
+      gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), opacity);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_set_right_color_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -589,10 +591,10 @@ gradient_segment_set_right_color_invoker (GimpProcedure      *procedure,
   GimpRGB color;
   gdouble opacity;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
-  gimp_value_get_rgb (&args->values[2], &color);
-  opacity = g_value_get_double (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
+  gimp_value_get_rgb (gimp_value_array_index (args, 2), &color);
+  opacity = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -614,22 +616,22 @@ gradient_segment_set_right_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_left_pos_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -650,29 +652,29 @@ gradient_segment_get_left_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_set_left_pos_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos;
   gdouble final_pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
-  pos = g_value_get_double (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
+  pos = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -693,27 +695,27 @@ gradient_segment_set_left_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], final_pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), final_pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_middle_pos_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -734,29 +736,29 @@ gradient_segment_get_middle_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_set_middle_pos_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos;
   gdouble final_pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
-  pos = g_value_get_double (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
+  pos = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -778,27 +780,27 @@ gradient_segment_set_middle_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], final_pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), final_pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_right_pos_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -819,29 +821,29 @@ gradient_segment_get_right_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_set_right_pos_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gdouble pos;
   gdouble final_pos = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
-  pos = g_value_get_double (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
+  pos = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -863,27 +865,27 @@ gradient_segment_set_right_pos_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], final_pos);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), final_pos);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_blending_function_invoker (GimpProcedure      *procedure,
-                                                Gimp               *gimp,
-                                                GimpContext        *context,
-                                                GimpProgress       *progress,
-                                                const GValueArray  *args,
-                                                GError            **error)
+                                                Gimp                  *gimp,
+                                                GimpContext           *context,
+                                                GimpProgress          *progress,
+                                                const GimpValueArray  *args,
+                                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gint32 blend_func = 0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -904,27 +906,27 @@ gradient_segment_get_blending_function_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], blend_func);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), blend_func);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_get_coloring_type_invoker (GimpProcedure      *procedure,
-                                            Gimp               *gimp,
-                                            GimpContext        *context,
-                                            GimpProgress       *progress,
-                                            const GValueArray  *args,
-                                            GError            **error)
+                                            Gimp                  *gimp,
+                                            GimpContext           *context,
+                                            GimpProgress          *progress,
+                                            const GimpValueArray  *args,
+                                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 segment;
   gint32 coloring_type = 0;
 
-  name = g_value_get_string (&args->values[0]);
-  segment = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  segment = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -945,18 +947,18 @@ gradient_segment_get_coloring_type_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], coloring_type);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), coloring_type);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_set_blending_function_invoker (GimpProcedure      *procedure,
-                                                      Gimp               *gimp,
-                                                      GimpContext        *context,
-                                                      GimpProgress       *progress,
-                                                      const GValueArray  *args,
-                                                      GError            **error)
+                                                      Gimp                  *gimp,
+                                                      GimpContext           *context,
+                                                      GimpProgress          *progress,
+                                                      const GimpValueArray  *args,
+                                                      GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -964,10 +966,10 @@ gradient_segment_range_set_blending_function_invoker (GimpProcedure      *proced
   gint32 end_segment;
   gint32 blending_function;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
-  blending_function = g_value_get_enum (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
+  blending_function = g_value_get_enum (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -992,13 +994,13 @@ gradient_segment_range_set_blending_function_invoker (GimpProcedure      *proced
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_set_coloring_type_invoker (GimpProcedure      *procedure,
-                                                  Gimp               *gimp,
-                                                  GimpContext        *context,
-                                                  GimpProgress       *progress,
-                                                  const GValueArray  *args,
-                                                  GError            **error)
+                                                  Gimp                  *gimp,
+                                                  GimpContext           *context,
+                                                  GimpProgress          *progress,
+                                                  const GimpValueArray  *args,
+                                                  GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -1006,10 +1008,10 @@ gradient_segment_range_set_coloring_type_invoker (GimpProcedure      *procedure,
   gint32 end_segment;
   gint32 coloring_type;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
-  coloring_type = g_value_get_enum (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
+  coloring_type = g_value_get_enum (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1034,22 +1036,22 @@ gradient_segment_range_set_coloring_type_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_flip_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1074,13 +1076,13 @@ gradient_segment_range_flip_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_replicate_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -1088,10 +1090,10 @@ gradient_segment_range_replicate_invoker (GimpProcedure      *procedure,
   gint32 end_segment;
   gint32 replicate_times;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
-  replicate_times = g_value_get_int (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
+  replicate_times = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1117,22 +1119,22 @@ gradient_segment_range_replicate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_split_midpoint_invoker (GimpProcedure      *procedure,
-                                               Gimp               *gimp,
-                                               GimpContext        *context,
-                                               GimpProgress       *progress,
-                                               const GValueArray  *args,
-                                               GError            **error)
+                                               Gimp                  *gimp,
+                                               GimpContext           *context,
+                                               GimpProgress          *progress,
+                                               const GimpValueArray  *args,
+                                               GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1157,13 +1159,13 @@ gradient_segment_range_split_midpoint_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_split_uniform_invoker (GimpProcedure      *procedure,
-                                              Gimp               *gimp,
-                                              GimpContext        *context,
-                                              GimpProgress       *progress,
-                                              const GValueArray  *args,
-                                              GError            **error)
+                                              Gimp                  *gimp,
+                                              GimpContext           *context,
+                                              GimpProgress          *progress,
+                                              const GimpValueArray  *args,
+                                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
@@ -1171,10 +1173,10 @@ gradient_segment_range_split_uniform_invoker (GimpProcedure      *procedure,
   gint32 end_segment;
   gint32 split_parts;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
-  split_parts = g_value_get_int (&args->values[3]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
+  split_parts = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1200,22 +1202,22 @@ gradient_segment_range_split_uniform_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_delete_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1240,22 +1242,22 @@ gradient_segment_range_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_redistribute_handles_invoker (GimpProcedure      *procedure,
-                                                     Gimp               *gimp,
-                                                     GimpContext        *context,
-                                                     GimpProgress       *progress,
-                                                     const GValueArray  *args,
-                                                     GError            **error)
+                                                     Gimp                  *gimp,
+                                                     GimpContext           *context,
+                                                     GimpProgress          *progress,
+                                                     const GimpValueArray  *args,
+                                                     GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1279,22 +1281,22 @@ gradient_segment_range_redistribute_handles_invoker (GimpProcedure      *procedu
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_blend_colors_invoker (GimpProcedure      *procedure,
-                                             Gimp               *gimp,
-                                             GimpContext        *context,
-                                             GimpProgress       *progress,
-                                             const GValueArray  *args,
-                                             GError            **error)
+                                             Gimp                  *gimp,
+                                             GimpContext           *context,
+                                             GimpProgress          *progress,
+                                             const GimpValueArray  *args,
+                                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1324,22 +1326,22 @@ gradient_segment_range_blend_colors_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_blend_opacity_invoker (GimpProcedure      *procedure,
-                                              Gimp               *gimp,
-                                              GimpContext        *context,
-                                              GimpProgress       *progress,
-                                              const GValueArray  *args,
-                                              GError            **error)
+                                              Gimp                  *gimp,
+                                              GimpContext           *context,
+                                              GimpProgress          *progress,
+                                              const GimpValueArray  *args,
+                                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1369,16 +1371,16 @@ gradient_segment_range_blend_opacity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradient_segment_range_move_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 start_segment;
   gint32 end_segment;
@@ -1386,11 +1388,11 @@ gradient_segment_range_move_invoker (GimpProcedure      *procedure,
   gboolean control_compress;
   gdouble final_delta = 0.0;
 
-  name = g_value_get_string (&args->values[0]);
-  start_segment = g_value_get_int (&args->values[1]);
-  end_segment = g_value_get_int (&args->values[2]);
-  delta = g_value_get_double (&args->values[3]);
-  control_compress = g_value_get_boolean (&args->values[4]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  start_segment = g_value_get_int (gimp_value_array_index (args, 1));
+  end_segment = g_value_get_int (gimp_value_array_index (args, 2));
+  delta = g_value_get_double (gimp_value_array_index (args, 3));
+  control_compress = g_value_get_boolean (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -1416,7 +1418,7 @@ gradient_segment_range_move_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], final_delta);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), final_delta);
 
   return return_vals;
 }
diff --git a/app/pdb/gradient-select-cmds.c b/app/pdb/gradient-select-cmds.c
index f9097c2..a731635 100644
--- a/app/pdb/gradient-select-cmds.c
+++ b/app/pdb/gradient-select-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -35,13 +37,13 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 gradients_popup_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *gradient_callback;
@@ -49,10 +51,10 @@ gradients_popup_invoker (GimpProcedure      *procedure,
   const gchar *initial_gradient;
   gint32 sample_size;
 
-  gradient_callback = g_value_get_string (&args->values[0]);
-  popup_title = g_value_get_string (&args->values[1]);
-  initial_gradient = g_value_get_string (&args->values[2]);
-  sample_size = g_value_get_int (&args->values[3]);
+  gradient_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  popup_title = g_value_get_string (gimp_value_array_index (args, 1));
+  initial_gradient = g_value_get_string (gimp_value_array_index (args, 2));
+  sample_size = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -73,18 +75,18 @@ gradients_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_close_popup_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   const gchar *gradient_callback;
 
-  gradient_callback = g_value_get_string (&args->values[0]);
+  gradient_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -99,20 +101,20 @@ gradients_close_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_set_popup_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *gradient_callback;
   const gchar *gradient_name;
 
-  gradient_callback = g_value_get_string (&args->values[0]);
-  gradient_name = g_value_get_string (&args->values[1]);
+  gradient_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  gradient_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/gradients-cmds.c b/app/pdb/gradients-cmds.c
index 8d028ab..32cb650 100644
--- a/app/pdb/gradients-cmds.c
+++ b/app/pdb/gradients-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -40,34 +42,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 gradients_refresh_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gimp_data_factory_data_refresh (gimp->gradient_factory, context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_get_list_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_gradients = 0;
   gchar **gradient_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -80,30 +82,30 @@ gradients_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_gradients);
-      gimp_value_take_stringarray (&return_vals->values[2], gradient_list, num_gradients);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_gradients);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), gradient_list, num_gradients);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_sample_uniform_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_samples;
   gboolean reverse;
   gint32 array_length = 0;
   gdouble *color_samples = NULL;
 
-  num_samples = g_value_get_int (&args->values[0]);
-  reverse = g_value_get_boolean (&args->values[1]);
+  num_samples = g_value_get_int (gimp_value_array_index (args, 0));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -141,32 +143,32 @@ gradients_sample_uniform_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], array_length);
-      gimp_value_take_floatarray (&return_vals->values[2], color_samples, array_length);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), array_length);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 2), color_samples, array_length);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_sample_custom_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_samples;
   const gdouble *positions;
   gboolean reverse;
   gint32 array_length = 0;
   gdouble *color_samples = NULL;
 
-  num_samples = g_value_get_int (&args->values[0]);
-  positions = gimp_value_get_floatarray (&args->values[1]);
-  reverse = g_value_get_boolean (&args->values[2]);
+  num_samples = g_value_get_int (gimp_value_array_index (args, 0));
+  positions = gimp_value_get_floatarray (gimp_value_array_index (args, 1));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -200,23 +202,23 @@ gradients_sample_custom_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], array_length);
-      gimp_value_take_floatarray (&return_vals->values[2], color_samples, array_length);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), array_length);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 2), color_samples, array_length);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 gradients_get_gradient_data_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 sample_size;
   gboolean reverse;
@@ -224,9 +226,9 @@ gradients_get_gradient_data_invoker (GimpProcedure      *procedure,
   gint32 width = 0;
   gdouble *grad_data = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  sample_size = g_value_get_int (&args->values[1]);
-  reverse = g_value_get_boolean (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  sample_size = g_value_get_int (gimp_value_array_index (args, 1));
+  reverse = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -278,9 +280,9 @@ gradients_get_gradient_data_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], actual_name);
-      g_value_set_int (&return_vals->values[2], width);
-      gimp_value_take_floatarray (&return_vals->values[3], grad_data, width);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), width);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 3), grad_data, width);
     }
 
   return return_vals;
diff --git a/app/pdb/grid-cmds.c b/app/pdb/grid-cmds.c
index ec5d0d7..f00791d 100644
--- a/app/pdb/grid-cmds.c
+++ b/app/pdb/grid-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbaseenums.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpgrid.h"
@@ -40,21 +42,21 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 image_grid_get_spacing_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gdouble xspacing = 0.0;
   gdouble yspacing = 0.0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -74,29 +76,29 @@ image_grid_get_spacing_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], xspacing);
-      g_value_set_double (&return_vals->values[2], yspacing);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), xspacing);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), yspacing);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_set_spacing_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gdouble xspacing;
   gdouble yspacing;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  xspacing = g_value_get_double (&args->values[1]);
-  yspacing = g_value_get_double (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  xspacing = g_value_get_double (gimp_value_array_index (args, 1));
+  yspacing = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -115,21 +117,21 @@ image_grid_set_spacing_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_get_offset_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gdouble xoffset = 0.0;
   gdouble yoffset = 0.0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -149,29 +151,29 @@ image_grid_get_offset_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], xoffset);
-      g_value_set_double (&return_vals->values[2], yoffset);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), xoffset);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), yoffset);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_set_offset_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gdouble xoffset;
   gdouble yoffset;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  xoffset = g_value_get_double (&args->values[1]);
-  yoffset = g_value_get_double (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  xoffset = g_value_get_double (gimp_value_array_index (args, 1));
+  yoffset = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -190,20 +192,20 @@ image_grid_set_offset_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_get_foreground_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpRGB fgcolor = { 0.0, 0.0, 0.0, 1.0 };
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -219,25 +221,25 @@ image_grid_get_foreground_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &fgcolor);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &fgcolor);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_set_foreground_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpRGB fgcolor;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &fgcolor);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &fgcolor);
 
   if (success)
     {
@@ -253,20 +255,20 @@ image_grid_set_foreground_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_get_background_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpRGB bgcolor = { 0.0, 0.0, 0.0, 1.0 };
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -282,25 +284,25 @@ image_grid_get_background_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &bgcolor);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &bgcolor);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_set_background_color_invoker (GimpProcedure      *procedure,
-                                         Gimp               *gimp,
-                                         GimpContext        *context,
-                                         GimpProgress       *progress,
-                                         const GValueArray  *args,
-                                         GError            **error)
+                                         Gimp                  *gimp,
+                                         GimpContext           *context,
+                                         GimpProgress          *progress,
+                                         const GimpValueArray  *args,
+                                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpRGB bgcolor;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &bgcolor);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &bgcolor);
 
   if (success)
     {
@@ -316,20 +318,20 @@ image_grid_set_background_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_get_style_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 style = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -345,25 +347,25 @@ image_grid_get_style_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], style);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), style);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_grid_set_style_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 style;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  style = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  style = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/guides-cmds.c b/app/pdb/guides-cmds.c
index f468c4c..a435762 100644
--- a/app/pdb/guides-cmds.c
+++ b/app/pdb/guides-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpguide.h"
@@ -36,22 +38,22 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 image_add_hguide_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 yposition;
   gint32 guide = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  yposition = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  yposition = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -70,27 +72,27 @@ image_add_hguide_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_uint (&return_vals->values[1], guide);
+    g_value_set_uint (gimp_value_array_index (return_vals, 1), guide);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_add_vguide_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 xposition;
   gint32 guide = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  xposition = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  xposition = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -109,25 +111,25 @@ image_add_vguide_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_uint (&return_vals->values[1], guide);
+    g_value_set_uint (gimp_value_array_index (return_vals, 1), guide);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_delete_guide_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 guide;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  guide = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  guide = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -143,22 +145,22 @@ image_delete_guide_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_find_next_guide_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 guide;
   gint32 next_guide = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  guide = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  guide = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -172,27 +174,27 @@ image_find_next_guide_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_uint (&return_vals->values[1], next_guide);
+    g_value_set_uint (gimp_value_array_index (return_vals, 1), next_guide);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_guide_orientation_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 guide;
   gint32 orientation = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  guide = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  guide = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -208,27 +210,27 @@ image_get_guide_orientation_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], orientation);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), orientation);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_guide_position_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 guide;
   gint32 position = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  guide = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  guide = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -244,7 +246,7 @@ image_get_guide_position_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], position);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), position);
 
   return return_vals;
 }
diff --git a/app/pdb/help-cmds.c b/app/pdb/help-cmds.c
index 6eb1236..468bf90 100644
--- a/app/pdb/help-cmds.c
+++ b/app/pdb/help-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -36,20 +38,20 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 help_invoker (GimpProcedure      *procedure,
-              Gimp               *gimp,
-              GimpContext        *context,
-              GimpProgress       *progress,
-              const GValueArray  *args,
-              GError            **error)
+              Gimp                  *gimp,
+              GimpContext           *context,
+              GimpProgress          *progress,
+              const GimpValueArray  *args,
+              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *help_domain;
   const gchar *help_id;
 
-  help_domain = g_value_get_string (&args->values[0]);
-  help_id = g_value_get_string (&args->values[1]);
+  help_domain = g_value_get_string (gimp_value_array_index (args, 0));
+  help_id = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index 2796b3f..d04b28e 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -29,6 +29,8 @@
 #include "libgimpcolor/gimpcolor.h"
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -79,37 +81,37 @@
 #error "no FINITE() implementation available?!"
 #endif
 
-static GValueArray *
+static GimpValueArray *
 image_is_valid_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean valid = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   valid = GIMP_IS_IMAGE (image);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], valid);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_list_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_images = 0;
   gint32 *image_ids = NULL;
 
@@ -129,30 +131,30 @@ image_list_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_int (&return_vals->values[1], num_images);
-  gimp_value_take_int32array (&return_vals->values[2], image_ids, num_images);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_images);
+  gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), image_ids, num_images);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_new_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 width;
   gint32 height;
   gint32 type;
   GimpImage *image = NULL;
 
-  width = g_value_get_int (&args->values[0]);
-  height = g_value_get_int (&args->values[1]);
-  type = g_value_get_enum (&args->values[2]);
+  width = g_value_get_int (gimp_value_array_index (args, 0));
+  height = g_value_get_int (gimp_value_array_index (args, 1));
+  type = g_value_get_enum (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -167,31 +169,31 @@ image_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_new_with_precision_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 width;
   gint32 height;
   gint32 type;
   gint32 precision;
   GimpImage *image = NULL;
 
-  width = g_value_get_int (&args->values[0]);
-  height = g_value_get_int (&args->values[1]);
-  type = g_value_get_enum (&args->values[2]);
-  precision = g_value_get_enum (&args->values[3]);
+  width = g_value_get_int (gimp_value_array_index (args, 0));
+  height = g_value_get_int (gimp_value_array_index (args, 1));
+  type = g_value_get_enum (gimp_value_array_index (args, 2));
+  precision = g_value_get_enum (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -213,25 +215,25 @@ image_new_with_precision_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_duplicate_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpImage *new_image = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -245,23 +247,23 @@ image_duplicate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], new_image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), new_image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_delete_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -275,20 +277,20 @@ image_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_base_type_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 base_type = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -299,25 +301,25 @@ image_base_type_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], base_type);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), base_type);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_precision_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 precision = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -331,25 +333,25 @@ image_get_precision_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], precision);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), precision);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_width_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 width = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -360,25 +362,25 @@ image_width_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], width);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), width);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_height_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 height = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -389,18 +391,18 @@ image_height_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], height);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), height);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_free_shadow_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   if (success)
@@ -410,13 +412,13 @@ image_free_shadow_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_resize_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -425,11 +427,11 @@ image_resize_invoker (GimpProcedure      *procedure,
   gint32 offx;
   gint32 offy;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  offx = g_value_get_int (&args->values[3]);
-  offy = g_value_get_int (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  offx = g_value_get_int (gimp_value_array_index (args, 3));
+  offy = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -441,18 +443,18 @@ image_resize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_resize_to_layers_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -463,22 +465,22 @@ image_resize_to_layers_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_scale_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 new_width;
   gint32 new_height;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -499,13 +501,13 @@ image_scale_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_scale_full_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -513,10 +515,10 @@ image_scale_full_invoker (GimpProcedure      *procedure,
   gint32 new_height;
   gint32 interpolation;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  interpolation = g_value_get_enum (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -533,13 +535,13 @@ image_scale_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_crop_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -548,11 +550,11 @@ image_crop_invoker (GimpProcedure      *procedure,
   gint32 offx;
   gint32 offy;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  offx = g_value_get_int (&args->values[3]);
-  offy = g_value_get_int (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  offx = g_value_get_int (gimp_value_array_index (args, 3));
+  offy = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -571,20 +573,20 @@ image_crop_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_flip_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 flip_type;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  flip_type = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -595,20 +597,20 @@ image_flip_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_rotate_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 rotate_type;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  rotate_type = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  rotate_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -625,21 +627,21 @@ image_rotate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_layers_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_layers = 0;
   gint32 *layer_ids = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -663,28 +665,28 @@ image_get_layers_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_layers);
-      gimp_value_take_int32array (&return_vals->values[2], layer_ids, num_layers);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_layers);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), layer_ids, num_layers);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_channels_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_channels = 0;
   gint32 *channel_ids = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -708,28 +710,28 @@ image_get_channels_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_channels);
-      gimp_value_take_int32array (&return_vals->values[2], channel_ids, num_channels);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_channels);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), channel_ids, num_channels);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_vectors_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_vectors = 0;
   gint32 *vector_ids = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -753,27 +755,27 @@ image_get_vectors_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_vectors);
-      gimp_value_take_int32array (&return_vals->values[2], vector_ids, num_vectors);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), vector_ids, num_vectors);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_active_drawable_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpDrawable *drawable = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -784,23 +786,23 @@ image_get_active_drawable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_unset_active_channel_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -811,20 +813,20 @@ image_unset_active_channel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_floating_sel_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *floating_sel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -835,25 +837,25 @@ image_get_floating_sel_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], floating_sel);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), floating_sel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_floating_sel_attached_to_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpDrawable *drawable = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -869,21 +871,21 @@ image_floating_sel_attached_to_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_pick_color_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpDrawable *drawable;
   gdouble x;
@@ -893,13 +895,13 @@ image_pick_color_invoker (GimpProcedure      *procedure,
   gdouble average_radius;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  sample_merged = g_value_get_boolean (&args->values[4]);
-  sample_average = g_value_get_boolean (&args->values[5]);
-  average_radius = g_value_get_double (&args->values[6]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 4));
+  sample_average = g_value_get_boolean (gimp_value_array_index (args, 5));
+  average_radius = g_value_get_double (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -936,29 +938,29 @@ image_pick_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &color);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_pick_correlate_layer_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 x;
   gint32 y;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_int (&args->values[1]);
-  y = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_int (gimp_value_array_index (args, 1));
+  y = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -969,27 +971,27 @@ image_pick_correlate_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_add_layer_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpLayer *layer;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
-  position = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1011,13 +1013,13 @@ image_add_layer_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_insert_layer_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -1025,10 +1027,10 @@ image_insert_layer_invoker (GimpProcedure      *procedure,
   GimpLayer *parent;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
-  parent = gimp_value_get_layer (&args->values[2], gimp);
-  position = g_value_get_int (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+  parent = gimp_value_get_layer (gimp_value_array_index (args, 2), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1056,20 +1058,20 @@ image_insert_layer_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_remove_layer_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpLayer *layer;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1083,22 +1085,22 @@ image_remove_layer_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_add_channel_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpChannel *channel;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  channel = gimp_value_get_channel (&args->values[1], gimp);
-  position = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1117,13 +1119,13 @@ image_add_channel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_insert_channel_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -1131,10 +1133,10 @@ image_insert_channel_invoker (GimpProcedure      *procedure,
   GimpChannel *parent;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  channel = gimp_value_get_channel (&args->values[1], gimp);
-  parent = gimp_value_get_channel (&args->values[2], gimp);
-  position = g_value_get_int (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
+  parent = gimp_value_get_channel (gimp_value_array_index (args, 2), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1159,20 +1161,20 @@ image_insert_channel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_remove_channel_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpChannel *channel;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  channel = gimp_value_get_channel (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1186,22 +1188,22 @@ image_remove_channel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_add_vectors_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpVectors *vectors;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  vectors = gimp_value_get_vectors (&args->values[1], gimp);
-  position = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1220,13 +1222,13 @@ image_add_vectors_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_insert_vectors_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -1234,10 +1236,10 @@ image_insert_vectors_invoker (GimpProcedure      *procedure,
   GimpVectors *parent;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  vectors = gimp_value_get_vectors (&args->values[1], gimp);
-  parent = gimp_value_get_vectors (&args->values[2], gimp);
-  position = g_value_get_int (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
+  parent = gimp_value_get_vectors (gimp_value_array_index (args, 2), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1262,20 +1264,20 @@ image_insert_vectors_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_remove_vectors_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpVectors *vectors;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  vectors = gimp_value_get_vectors (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1289,22 +1291,22 @@ image_remove_vectors_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_item_position_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpItem *item;
   gint32 position = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1318,25 +1320,25 @@ image_get_item_position_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], position);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), position);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_raise_item_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpItem *item;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1350,20 +1352,20 @@ image_raise_item_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_lower_item_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpItem *item;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1377,20 +1379,20 @@ image_lower_item_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_raise_item_to_top_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpItem *item;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1404,20 +1406,20 @@ image_raise_item_to_top_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_lower_item_to_bottom_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpItem *item;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1431,13 +1433,13 @@ image_lower_item_to_bottom_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_reorder_item_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -1445,10 +1447,10 @@ image_reorder_item_invoker (GimpProcedure      *procedure,
   GimpItem *parent;
   gint32 position;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  item = gimp_value_get_item (&args->values[1], gimp);
-  parent = gimp_value_get_item (&args->values[2], gimp);
-  position = g_value_get_int (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 1), gimp);
+  parent = gimp_value_get_item (gimp_value_array_index (args, 2), gimp);
+  position = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1469,20 +1471,20 @@ image_reorder_item_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_flatten_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1496,27 +1498,27 @@ image_flatten_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_merge_visible_layers_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 merge_type;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  merge_type = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  merge_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -1531,29 +1533,29 @@ image_merge_visible_layers_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_merge_down_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *merge_layer;
   gint32 merge_type;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  merge_layer = gimp_value_get_layer (&args->values[1], gimp);
-  merge_type = g_value_get_enum (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  merge_layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+  merge_type = g_value_get_enum (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1573,27 +1575,27 @@ image_merge_down_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_add_layer_mask_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpLayer *layer;
   GimpLayerMask *mask;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
-  mask = gimp_value_get_layer_mask (&args->values[2], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+  mask = gimp_value_get_layer_mask (gimp_value_array_index (args, 2), gimp);
 
   if (success)
     {
@@ -1608,22 +1610,22 @@ image_add_layer_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_remove_layer_mask_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpLayer *layer;
   gint32 mode;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
-  mode = g_value_get_enum (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
+  mode = g_value_get_enum (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1638,21 +1640,21 @@ image_remove_layer_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_colormap_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_bytes = 0;
   guint8 *colormap = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1665,29 +1667,29 @@ image_get_colormap_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_bytes);
-      gimp_value_take_int8array (&return_vals->values[2], colormap, num_bytes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_bytes);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 2), colormap, num_bytes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_colormap_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 num_bytes;
   const guint8 *colormap;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  num_bytes = g_value_get_int (&args->values[1]);
-  colormap = gimp_value_get_int8array (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  num_bytes = g_value_get_int (gimp_value_array_index (args, 1));
+  colormap = gimp_value_get_int8array (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1698,18 +1700,18 @@ image_set_colormap_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_clean_all_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1720,20 +1722,20 @@ image_clean_all_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_is_dirty_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean dirty = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1744,21 +1746,21 @@ image_is_dirty_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], dirty);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), dirty);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_thumbnail_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 width;
   gint32 height;
@@ -1768,9 +1770,9 @@ image_thumbnail_invoker (GimpProcedure      *procedure,
   gint32 thumbnail_data_count = 0;
   guint8 *thumbnail_data = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  width = g_value_get_int (&args->values[1]);
-  height = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  width = g_value_get_int (gimp_value_array_index (args, 1));
+  height = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1813,30 +1815,30 @@ image_thumbnail_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], actual_width);
-      g_value_set_int (&return_vals->values[2], actual_height);
-      g_value_set_int (&return_vals->values[3], bpp);
-      g_value_set_int (&return_vals->values[4], thumbnail_data_count);
-      gimp_value_take_int8array (&return_vals->values[5], thumbnail_data, thumbnail_data_count);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), actual_width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), actual_height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), thumbnail_data_count);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 5), thumbnail_data, thumbnail_data_count);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_active_layer_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *active_layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1847,25 +1849,25 @@ image_get_active_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], active_layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), active_layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_active_layer_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpLayer *active_layer;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  active_layer = gimp_value_get_layer (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  active_layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1877,20 +1879,20 @@ image_set_active_layer_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_active_channel_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpChannel *active_channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1901,25 +1903,25 @@ image_get_active_channel_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], active_channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), active_channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_active_channel_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpChannel *active_channel;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  active_channel = gimp_value_get_channel (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  active_channel = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1931,20 +1933,20 @@ image_set_active_channel_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_active_vectors_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpVectors *active_vectors = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1955,25 +1957,25 @@ image_get_active_vectors_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], active_vectors);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), active_vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_active_vectors_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpVectors *active_vectors;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  active_vectors = gimp_value_get_vectors (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  active_vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1985,20 +1987,20 @@ image_set_active_vectors_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_selection_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpSelection *selection = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2012,27 +2014,27 @@ image_get_selection_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_selection (&return_vals->values[1], selection);
+    gimp_value_set_selection (gimp_value_array_index (return_vals, 1), selection);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_component_active_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 component;
   gboolean active = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  component = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  component = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2051,27 +2053,27 @@ image_get_component_active_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], active);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), active);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_component_active_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 component;
   gboolean active;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  component = g_value_get_enum (&args->values[1]);
-  active = g_value_get_boolean (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  component = g_value_get_enum (gimp_value_array_index (args, 1));
+  active = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -2090,22 +2092,22 @@ image_set_component_active_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_component_visible_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 component;
   gboolean visible = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  component = g_value_get_enum (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  component = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2124,27 +2126,27 @@ image_get_component_visible_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], visible);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), visible);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_component_visible_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 component;
   gboolean visible;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  component = g_value_get_enum (&args->values[1]);
-  visible = g_value_get_boolean (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  component = g_value_get_enum (gimp_value_array_index (args, 1));
+  visible = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -2163,20 +2165,20 @@ image_set_component_visible_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_filename_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *filename = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2189,25 +2191,25 @@ image_get_filename_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], filename);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), filename);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_filename_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *filename;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  filename = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2236,20 +2238,20 @@ image_set_filename_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_uri_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *uri = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2260,25 +2262,25 @@ image_get_uri_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], uri);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), uri);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_xcf_uri_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *uri = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2289,25 +2291,25 @@ image_get_xcf_uri_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], uri);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), uri);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_imported_uri_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *uri = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2318,25 +2320,25 @@ image_get_imported_uri_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], uri);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), uri);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_exported_uri_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *uri = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2347,25 +2349,25 @@ image_get_exported_uri_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], uri);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), uri);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_name_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *name = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2376,26 +2378,26 @@ image_get_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_resolution_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gdouble xresolution = 0.0;
   gdouble yresolution = 0.0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2407,29 +2409,29 @@ image_get_resolution_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], xresolution);
-      g_value_set_double (&return_vals->values[2], yresolution);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), xresolution);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), yresolution);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_resolution_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gdouble xresolution;
   gdouble yresolution;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  xresolution = g_value_get_double (&args->values[1]);
-  yresolution = g_value_get_double (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  xresolution = g_value_get_double (gimp_value_array_index (args, 1));
+  yresolution = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -2454,20 +2456,20 @@ image_set_resolution_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_unit_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpUnit unit = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2478,25 +2480,25 @@ image_get_unit_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], unit);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), unit);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_unit_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   GimpUnit unit;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  unit = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  unit = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2507,20 +2509,20 @@ image_set_unit_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_tattoo_state_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 tattoo_state = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2531,25 +2533,25 @@ image_get_tattoo_state_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_uint (&return_vals->values[1], tattoo_state);
+    g_value_set_uint (gimp_value_array_index (return_vals, 1), tattoo_state);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_set_tattoo_state_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 tattoo_state;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  tattoo_state = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  tattoo_state = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2560,22 +2562,22 @@ image_set_tattoo_state_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_layer_by_tattoo_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 tattoo;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  tattoo = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2586,27 +2588,27 @@ image_get_layer_by_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_channel_by_tattoo_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 tattoo;
   GimpChannel *channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  tattoo = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2617,27 +2619,27 @@ image_get_channel_by_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_vectors_by_tattoo_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 tattoo;
   GimpVectors *vectors = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  tattoo = g_value_get_uint (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2648,27 +2650,27 @@ image_get_vectors_by_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], vectors);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_layer_by_name_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2679,27 +2681,27 @@ image_get_layer_by_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_channel_by_name_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   GimpChannel *channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2710,27 +2712,27 @@ image_get_channel_by_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_vectors_by_name_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   GimpVectors *vectors = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2741,25 +2743,25 @@ image_get_vectors_by_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], vectors);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_attach_parasite_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const GimpParasite *parasite;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  parasite = g_value_get_boxed (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  parasite = g_value_get_boxed (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2770,20 +2772,20 @@ image_attach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_detach_parasite_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *name;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2794,22 +2796,22 @@ image_detach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_parasite_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   GimpParasite *parasite = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -2823,26 +2825,26 @@ image_get_parasite_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_boxed (&return_vals->values[1], parasite);
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasite);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_get_parasite_list_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_parasites = 0;
   gchar **parasites = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -2854,8 +2856,8 @@ image_get_parasite_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_parasites);
-      gimp_value_take_stringarray (&return_vals->values[2], parasites, num_parasites);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
     }
 
   return return_vals;
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 86871b5..9f8d0f3 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpchannel-select.h"
@@ -45,13 +47,13 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 image_select_color_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -59,10 +61,10 @@ image_select_color_invoker (GimpProcedure      *procedure,
   GimpDrawable *drawable;
   GimpRGB color;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  gimp_value_get_rgb (&args->values[3], &color);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 3), &color);
 
   if (success)
     {
@@ -91,13 +93,13 @@ image_select_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_contiguous_color_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -106,11 +108,11 @@ image_select_contiguous_color_invoker (GimpProcedure      *procedure,
   gdouble x;
   gdouble y;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  x = g_value_get_double (&args->values[3]);
-  y = g_value_get_double (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 3));
+  y = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -141,13 +143,13 @@ image_select_contiguous_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_rectangle_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -157,12 +159,12 @@ image_select_rectangle_invoker (GimpProcedure      *procedure,
   gdouble width;
   gdouble height;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  width = g_value_get_double (&args->values[4]);
-  height = g_value_get_double (&args->values[5]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  width = g_value_get_double (gimp_value_array_index (args, 4));
+  height = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -182,13 +184,13 @@ image_select_rectangle_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_round_rectangle_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -200,14 +202,14 @@ image_select_round_rectangle_invoker (GimpProcedure      *procedure,
   gdouble corner_radius_x;
   gdouble corner_radius_y;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  width = g_value_get_double (&args->values[4]);
-  height = g_value_get_double (&args->values[5]);
-  corner_radius_x = g_value_get_double (&args->values[6]);
-  corner_radius_y = g_value_get_double (&args->values[7]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  width = g_value_get_double (gimp_value_array_index (args, 4));
+  height = g_value_get_double (gimp_value_array_index (args, 5));
+  corner_radius_x = g_value_get_double (gimp_value_array_index (args, 6));
+  corner_radius_y = g_value_get_double (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -230,13 +232,13 @@ image_select_round_rectangle_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_ellipse_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -246,12 +248,12 @@ image_select_ellipse_invoker (GimpProcedure      *procedure,
   gdouble width;
   gdouble height;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  width = g_value_get_double (&args->values[4]);
-  height = g_value_get_double (&args->values[5]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  width = g_value_get_double (gimp_value_array_index (args, 4));
+  height = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -272,13 +274,13 @@ image_select_ellipse_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_polygon_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -286,10 +288,10 @@ image_select_polygon_invoker (GimpProcedure      *procedure,
   gint32 num_segs;
   const gdouble *segs;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  num_segs = g_value_get_int (&args->values[2]);
-  segs = gimp_value_get_floatarray (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  num_segs = g_value_get_int (gimp_value_array_index (args, 2));
+  segs = gimp_value_get_floatarray (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -311,22 +313,22 @@ image_select_polygon_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_select_item_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 operation;
   GimpItem *item;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  item = gimp_value_get_item (&args->values[2], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  item = gimp_value_get_item (gimp_value_array_index (args, 2), gimp);
 
   if (success)
     {
diff --git a/app/pdb/item-cmds.c b/app/pdb/item-cmds.c
index 92d0ab3..661f73e 100644
--- a/app/pdb/item-cmds.c
+++ b/app/pdb/item-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpimage.h"
@@ -45,43 +47,43 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 item_is_valid_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean valid = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   valid = (GIMP_IS_ITEM (item) &&
            ! gimp_item_is_removed (GIMP_ITEM (item)));
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_boolean (&return_vals->values[1], valid);
+  g_value_set_boolean (gimp_value_array_index (return_vals, 1), valid);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_image_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   GimpImage *image = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -92,23 +94,23 @@ item_get_image_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_delete_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -125,20 +127,20 @@ item_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_drawable_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean drawable = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -149,25 +151,25 @@ item_is_drawable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], drawable);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_layer_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean layer = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -178,25 +180,25 @@ item_is_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], layer);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_text_layer_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean text_layer = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -207,25 +209,25 @@ item_is_text_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], text_layer);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), text_layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_channel_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean channel = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -236,25 +238,25 @@ item_is_channel_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], channel);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_layer_mask_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean layer_mask = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -265,25 +267,25 @@ item_is_layer_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], layer_mask);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), layer_mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_selection_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean selection = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -294,25 +296,25 @@ item_is_selection_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], selection);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), selection);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_vectors_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean vectors = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -323,25 +325,25 @@ item_is_vectors_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], vectors);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_is_group_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean group = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -352,25 +354,25 @@ item_is_group_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], group);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), group);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_parent_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   GimpItem *parent = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -381,26 +383,26 @@ item_get_parent_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], parent);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), parent);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_children_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 num_children = 0;
   gint32 *child_ids = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -435,27 +437,27 @@ item_get_children_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_children);
-      gimp_value_take_int32array (&return_vals->values[2], child_ids, num_children);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_children);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), child_ids, num_children);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_name_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gchar *name = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -466,25 +468,25 @@ item_get_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_set_name_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   const gchar *name;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -495,20 +497,20 @@ item_set_name_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_visible_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean visible = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -519,25 +521,25 @@ item_get_visible_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], visible);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), visible);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_set_visible_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   gboolean visible;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  visible = g_value_get_boolean (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  visible = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -548,20 +550,20 @@ item_set_visible_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_linked_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean linked = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -572,25 +574,25 @@ item_get_linked_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], linked);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), linked);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_set_linked_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   gboolean linked;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  linked = g_value_get_boolean (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  linked = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -601,20 +603,20 @@ item_set_linked_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_lock_content_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gboolean lock_content = FALSE;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -625,25 +627,25 @@ item_get_lock_content_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], lock_content);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), lock_content);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_set_lock_content_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   gboolean lock_content;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  lock_content = g_value_get_boolean (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  lock_content = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -657,20 +659,20 @@ item_set_lock_content_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_tattoo_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 tattoo = 0;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -681,25 +683,25 @@ item_get_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_uint (&return_vals->values[1], tattoo);
+    g_value_set_uint (gimp_value_array_index (return_vals, 1), tattoo);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_set_tattoo_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   gint32 tattoo;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  tattoo = g_value_get_uint (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  tattoo = g_value_get_uint (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -710,20 +712,20 @@ item_set_tattoo_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_attach_parasite_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   const GimpParasite *parasite;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  parasite = g_value_get_boxed (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  parasite = g_value_get_boxed (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -734,20 +736,20 @@ item_attach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_detach_parasite_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpItem *item;
   const gchar *name;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -758,22 +760,22 @@ item_detach_parasite_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_parasite_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   const gchar *name;
   GimpParasite *parasite = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -787,26 +789,26 @@ item_get_parasite_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_boxed (&return_vals->values[1], parasite);
+    g_value_take_boxed (gimp_value_array_index (return_vals, 1), parasite);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_get_parasite_list_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 num_parasites = 0;
   gchar **parasites = NULL;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -818,8 +820,8 @@ item_get_parasite_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_parasites);
-      gimp_value_take_stringarray (&return_vals->values[2], parasites, num_parasites);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_parasites);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), parasites, num_parasites);
     }
 
   return return_vals;
diff --git a/app/pdb/item-transform-cmds.c b/app/pdb/item-transform-cmds.c
index d35261e..8cbd33b 100644
--- a/app/pdb/item-transform-cmds.c
+++ b/app/pdb/item-transform-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp-transform-utils.h"
@@ -45,25 +47,25 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 item_transform_flip_simple_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 flip_type;
   gboolean auto_center;
   gdouble axis;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  flip_type = g_value_get_enum (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  axis = g_value_get_double (&args->values[3]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  axis = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -112,32 +114,32 @@ item_transform_flip_simple_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_flip_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble x0;
   gdouble y0;
   gdouble x1;
   gdouble y1;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -201,21 +203,21 @@ item_transform_flip_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_perspective_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble x0;
   gdouble y0;
@@ -226,15 +228,15 @@ item_transform_perspective_invoker (GimpProcedure      *procedure,
   gdouble x3;
   gdouble y3;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
-  x2 = g_value_get_double (&args->values[5]);
-  y2 = g_value_get_double (&args->values[6]);
-  x3 = g_value_get_double (&args->values[7]);
-  y3 = g_value_get_double (&args->values[8]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
+  x2 = g_value_get_double (gimp_value_array_index (args, 5));
+  y2 = g_value_get_double (gimp_value_array_index (args, 6));
+  x3 = g_value_get_double (gimp_value_array_index (args, 7));
+  y3 = g_value_get_double (gimp_value_array_index (args, 8));
 
   if (success)
     {
@@ -301,32 +303,32 @@ item_transform_perspective_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_rotate_simple_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 rotate_type;
   gboolean auto_center;
   gdouble center_x;
   gdouble center_y;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  rotate_type = g_value_get_enum (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  center_x = g_value_get_double (&args->values[3]);
-  center_y = g_value_get_double (&args->values[4]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  rotate_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  center_x = g_value_get_double (gimp_value_array_index (args, 3));
+  center_y = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -378,32 +380,32 @@ item_transform_rotate_simple_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_rotate_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble angle;
   gboolean auto_center;
   gdouble center_x;
   gdouble center_y;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  angle = g_value_get_double (&args->values[1]);
-  auto_center = g_value_get_boolean (&args->values[2]);
-  center_x = g_value_get_double (&args->values[3]);
-  center_y = g_value_get_double (&args->values[4]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  angle = g_value_get_double (gimp_value_array_index (args, 1));
+  auto_center = g_value_get_boolean (gimp_value_array_index (args, 2));
+  center_x = g_value_get_double (gimp_value_array_index (args, 3));
+  center_y = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -472,32 +474,32 @@ item_transform_rotate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_scale_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble x0;
   gdouble y0;
   gdouble x1;
   gdouble y1;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  x1 = g_value_get_double (&args->values[3]);
-  y1 = g_value_get_double (&args->values[4]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  x1 = g_value_get_double (gimp_value_array_index (args, 3));
+  y1 = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -563,28 +565,28 @@ item_transform_scale_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_shear_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gint32 shear_type;
   gdouble magnitude;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  shear_type = g_value_get_enum (&args->values[1]);
-  magnitude = g_value_get_double (&args->values[2]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  shear_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  magnitude = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -650,21 +652,21 @@ item_transform_shear_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_2d_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble source_x;
   gdouble source_y;
@@ -674,14 +676,14 @@ item_transform_2d_invoker (GimpProcedure      *procedure,
   gdouble dest_x;
   gdouble dest_y;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  source_x = g_value_get_double (&args->values[1]);
-  source_y = g_value_get_double (&args->values[2]);
-  scale_x = g_value_get_double (&args->values[3]);
-  scale_y = g_value_get_double (&args->values[4]);
-  angle = g_value_get_double (&args->values[5]);
-  dest_x = g_value_get_double (&args->values[6]);
-  dest_y = g_value_get_double (&args->values[7]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  source_x = g_value_get_double (gimp_value_array_index (args, 1));
+  source_y = g_value_get_double (gimp_value_array_index (args, 2));
+  scale_x = g_value_get_double (gimp_value_array_index (args, 3));
+  scale_y = g_value_get_double (gimp_value_array_index (args, 4));
+  angle = g_value_get_double (gimp_value_array_index (args, 5));
+  dest_x = g_value_get_double (gimp_value_array_index (args, 6));
+  dest_y = g_value_get_double (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -748,21 +750,21 @@ item_transform_2d_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 item_transform_matrix_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpItem *item;
   gdouble coeff_0_0;
   gdouble coeff_0_1;
@@ -774,16 +776,16 @@ item_transform_matrix_invoker (GimpProcedure      *procedure,
   gdouble coeff_2_1;
   gdouble coeff_2_2;
 
-  item = gimp_value_get_item (&args->values[0], gimp);
-  coeff_0_0 = g_value_get_double (&args->values[1]);
-  coeff_0_1 = g_value_get_double (&args->values[2]);
-  coeff_0_2 = g_value_get_double (&args->values[3]);
-  coeff_1_0 = g_value_get_double (&args->values[4]);
-  coeff_1_1 = g_value_get_double (&args->values[5]);
-  coeff_1_2 = g_value_get_double (&args->values[6]);
-  coeff_2_0 = g_value_get_double (&args->values[7]);
-  coeff_2_1 = g_value_get_double (&args->values[8]);
-  coeff_2_2 = g_value_get_double (&args->values[9]);
+  item = gimp_value_get_item (gimp_value_array_index (args, 0), gimp);
+  coeff_0_0 = g_value_get_double (gimp_value_array_index (args, 1));
+  coeff_0_1 = g_value_get_double (gimp_value_array_index (args, 2));
+  coeff_0_2 = g_value_get_double (gimp_value_array_index (args, 3));
+  coeff_1_0 = g_value_get_double (gimp_value_array_index (args, 4));
+  coeff_1_1 = g_value_get_double (gimp_value_array_index (args, 5));
+  coeff_1_2 = g_value_get_double (gimp_value_array_index (args, 6));
+  coeff_2_0 = g_value_get_double (gimp_value_array_index (args, 7));
+  coeff_2_1 = g_value_get_double (gimp_value_array_index (args, 8));
+  coeff_2_2 = g_value_get_double (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -854,7 +856,7 @@ item_transform_matrix_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_item (&return_vals->values[1], item);
+    gimp_value_set_item (gimp_value_array_index (return_vals, 1), item);
 
   return return_vals;
 }
diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c
index 5cacd32..a146f9b 100644
--- a/app/pdb/layer-cmds.c
+++ b/app/pdb/layer-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -48,16 +50,16 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 layer_new_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 width;
   gint32 height;
@@ -67,13 +69,13 @@ layer_new_invoker (GimpProcedure      *procedure,
   gint32 mode;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  width = g_value_get_int (&args->values[1]);
-  height = g_value_get_int (&args->values[2]);
-  type = g_value_get_enum (&args->values[3]);
-  name = g_value_get_string (&args->values[4]);
-  opacity = g_value_get_double (&args->values[5]);
-  mode = g_value_get_enum (&args->values[6]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  width = g_value_get_int (gimp_value_array_index (args, 1));
+  height = g_value_get_int (gimp_value_array_index (args, 2));
+  type = g_value_get_enum (gimp_value_array_index (args, 3));
+  name = g_value_get_string (gimp_value_array_index (args, 4));
+  opacity = g_value_get_double (gimp_value_array_index (args, 5));
+  mode = g_value_get_enum (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -93,29 +95,29 @@ layer_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_new_from_visible_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpImage *dest_image;
   const gchar *name;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  dest_image = gimp_value_get_image (&args->values[1], gimp);
-  name = g_value_get_string (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  dest_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -135,27 +137,27 @@ layer_new_from_visible_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_new_from_drawable_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   GimpImage *dest_image;
   GimpLayer *layer_copy = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  dest_image = gimp_value_get_image (&args->values[1], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  dest_image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -182,25 +184,25 @@ layer_new_from_drawable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer_copy);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_copy);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_group_new_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *layer_group = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -214,27 +216,27 @@ layer_group_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer_group);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_group);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_copy_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean add_alpha;
   GimpLayer *layer_copy = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  add_alpha = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  add_alpha = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -255,23 +257,23 @@ layer_copy_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer_copy);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer_copy);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_add_alpha_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -286,18 +288,18 @@ layer_add_alpha_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_flatten_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -312,13 +314,13 @@ layer_flatten_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_scale_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
@@ -326,10 +328,10 @@ layer_scale_invoker (GimpProcedure      *procedure,
   gint32 new_height;
   gboolean local_origin;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  local_origin = g_value_get_boolean (&args->values[3]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  local_origin = g_value_get_boolean (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -357,13 +359,13 @@ layer_scale_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_scale_full_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
@@ -372,11 +374,11 @@ layer_scale_full_invoker (GimpProcedure      *procedure,
   gboolean local_origin;
   gint32 interpolation;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  local_origin = g_value_get_boolean (&args->values[3]);
-  interpolation = g_value_get_enum (&args->values[4]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  local_origin = g_value_get_boolean (gimp_value_array_index (args, 3));
+  interpolation = g_value_get_enum (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -402,13 +404,13 @@ layer_scale_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_resize_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
@@ -417,11 +419,11 @@ layer_resize_invoker (GimpProcedure      *procedure,
   gint32 offx;
   gint32 offy;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  new_width = g_value_get_int (&args->values[1]);
-  new_height = g_value_get_int (&args->values[2]);
-  offx = g_value_get_int (&args->values[3]);
-  offy = g_value_get_int (&args->values[4]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  new_width = g_value_get_int (gimp_value_array_index (args, 1));
+  new_height = g_value_get_int (gimp_value_array_index (args, 2));
+  offx = g_value_get_int (gimp_value_array_index (args, 3));
+  offy = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -436,18 +438,18 @@ layer_resize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_resize_to_image_size_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -461,22 +463,22 @@ layer_resize_to_image_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_translate_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 offx;
   gint32 offy;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  offx = g_value_get_int (&args->values[1]);
-  offy = g_value_get_int (&args->values[2]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  offx = g_value_get_int (gimp_value_array_index (args, 1));
+  offy = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -497,22 +499,22 @@ layer_translate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_offsets_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 offx;
   gint32 offy;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  offx = g_value_get_int (&args->values[1]);
-  offy = g_value_get_int (&args->values[2]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  offx = g_value_get_int (gimp_value_array_index (args, 1));
+  offy = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -539,22 +541,22 @@ layer_set_offsets_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_create_mask_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gint32 mask_type;
   GimpLayerMask *mask = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  mask_type = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  mask_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -581,25 +583,25 @@ layer_create_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer_mask (&return_vals->values[1], mask);
+    gimp_value_set_layer_mask (gimp_value_array_index (return_vals, 1), mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_mask_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   GimpLayerMask *mask = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -610,25 +612,25 @@ layer_get_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer_mask (&return_vals->values[1], mask);
+    gimp_value_set_layer_mask (gimp_value_array_index (return_vals, 1), mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_from_mask_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayerMask *mask;
   GimpLayer *layer = NULL;
 
-  mask = gimp_value_get_layer_mask (&args->values[0], gimp);
+  mask = gimp_value_get_layer_mask (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -639,25 +641,25 @@ layer_from_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_add_mask_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   GimpLayerMask *mask;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  mask = gimp_value_get_layer_mask (&args->values[1], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  mask = gimp_value_get_layer_mask (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -674,20 +676,20 @@ layer_add_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_remove_mask_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 mode;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  mode = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  mode = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -702,20 +704,20 @@ layer_remove_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_is_floating_sel_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean is_floating_sel = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -726,25 +728,25 @@ layer_is_floating_sel_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], is_floating_sel);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), is_floating_sel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_lock_alpha_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean lock_alpha = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -755,25 +757,25 @@ layer_get_lock_alpha_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], lock_alpha);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), lock_alpha);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_lock_alpha_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean lock_alpha;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  lock_alpha = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  lock_alpha = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -787,20 +789,20 @@ layer_set_lock_alpha_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_apply_mask_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean apply_mask = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -814,25 +816,25 @@ layer_get_apply_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], apply_mask);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), apply_mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_apply_mask_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean apply_mask;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  apply_mask = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  apply_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -846,20 +848,20 @@ layer_set_apply_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_show_mask_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean show_mask = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -873,25 +875,25 @@ layer_get_show_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], show_mask);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), show_mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_show_mask_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean show_mask;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  show_mask = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  show_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -905,20 +907,20 @@ layer_set_show_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_edit_mask_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean edit_mask = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -932,25 +934,25 @@ layer_get_edit_mask_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], edit_mask);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), edit_mask);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_edit_mask_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean edit_mask;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  edit_mask = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  edit_mask = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -964,20 +966,20 @@ layer_set_edit_mask_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_opacity_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gdouble opacity = 0.0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -988,25 +990,25 @@ layer_get_opacity_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], opacity);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), opacity);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_opacity_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble opacity;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  opacity = g_value_get_double (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  opacity = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -1017,20 +1019,20 @@ layer_set_opacity_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_get_mode_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gint32 mode = 0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1041,25 +1043,25 @@ layer_get_mode_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], mode);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), mode);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 layer_set_mode_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 mode;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  mode = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  mode = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/message-cmds.c b/app/pdb/message-cmds.c
index 0a1bba5..4d41939 100644
--- a/app/pdb/message-cmds.c
+++ b/app/pdb/message-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -39,18 +41,18 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 message_invoker (GimpProcedure      *procedure,
-                 Gimp               *gimp,
-                 GimpContext        *context,
-                 GimpProgress       *progress,
-                 const GValueArray  *args,
-                 GError            **error)
+                 Gimp                  *gimp,
+                 GimpContext           *context,
+                 GimpProgress          *progress,
+                 const GimpValueArray  *args,
+                 GError               **error)
 {
   gboolean success = TRUE;
   const gchar *message;
 
-  message = g_value_get_string (&args->values[0]);
+  message = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -66,37 +68,37 @@ message_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 message_get_handler_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 handler = 0;
 
   handler = gimp->message_handler;
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_enum (&return_vals->values[1], handler);
+  g_value_set_enum (gimp_value_array_index (return_vals, 1), handler);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 message_set_handler_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   gint32 handler;
 
-  handler = g_value_get_enum (&args->values[0]);
+  handler = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
diff --git a/app/pdb/paint-tools-cmds.c b/app/pdb/paint-tools-cmds.c
index 5732df9..0c91383 100644
--- a/app/pdb/paint-tools-cmds.c
+++ b/app/pdb/paint-tools-cmds.c
@@ -26,6 +26,8 @@
 #include "libgimpconfig/gimpconfig.h"
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpbrush.h"
@@ -110,13 +112,13 @@ paint_tools_stroke (Gimp              *gimp,
   return retval;
 }
 
-static GValueArray *
+static GimpValueArray *
 airbrush_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -124,10 +126,10 @@ airbrush_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  pressure = g_value_get_double (&args->values[1]);
-  num_strokes = g_value_get_int (&args->values[2]);
-  strokes = gimp_value_get_floatarray (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  pressure = g_value_get_double (gimp_value_array_index (args, 1));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -158,22 +160,22 @@ airbrush_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 airbrush_default_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -200,13 +202,13 @@ airbrush_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 clone_invoker (GimpProcedure      *procedure,
-               Gimp               *gimp,
-               GimpContext        *context,
-               GimpProgress       *progress,
-               const GValueArray  *args,
-               GError            **error)
+               Gimp                  *gimp,
+               GimpContext           *context,
+               GimpProgress          *progress,
+               const GimpValueArray  *args,
+               GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -217,13 +219,13 @@ clone_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  src_drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  clone_type = g_value_get_enum (&args->values[2]);
-  src_x = g_value_get_double (&args->values[3]);
-  src_y = g_value_get_double (&args->values[4]);
-  num_strokes = g_value_get_int (&args->values[5]);
-  strokes = gimp_value_get_floatarray (&args->values[6]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  src_drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+  clone_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  src_x = g_value_get_double (gimp_value_array_index (args, 3));
+  src_y = g_value_get_double (gimp_value_array_index (args, 4));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 5));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -257,22 +259,22 @@ clone_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 clone_default_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -299,13 +301,13 @@ clone_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 convolve_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -314,11 +316,11 @@ convolve_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  pressure = g_value_get_double (&args->values[1]);
-  convolve_type = g_value_get_enum (&args->values[2]);
-  num_strokes = g_value_get_int (&args->values[3]);
-  strokes = gimp_value_get_floatarray (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  pressure = g_value_get_double (gimp_value_array_index (args, 1));
+  convolve_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 3));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -350,22 +352,22 @@ convolve_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 convolve_default_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -392,13 +394,13 @@ convolve_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 dodgeburn_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -408,12 +410,12 @@ dodgeburn_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  exposure = g_value_get_double (&args->values[1]);
-  dodgeburn_type = g_value_get_enum (&args->values[2]);
-  dodgeburn_mode = g_value_get_enum (&args->values[3]);
-  num_strokes = g_value_get_int (&args->values[4]);
-  strokes = gimp_value_get_floatarray (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  exposure = g_value_get_double (gimp_value_array_index (args, 1));
+  dodgeburn_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  dodgeburn_mode = g_value_get_enum (gimp_value_array_index (args, 3));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 4));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -446,22 +448,22 @@ dodgeburn_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 dodgeburn_default_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -488,13 +490,13 @@ dodgeburn_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 eraser_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -503,11 +505,11 @@ eraser_invoker (GimpProcedure      *procedure,
   gint32 hardness;
   gint32 method;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
-  hardness = g_value_get_enum (&args->values[3]);
-  method = g_value_get_enum (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
+  hardness = g_value_get_enum (gimp_value_array_index (args, 3));
+  method = g_value_get_enum (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -539,22 +541,22 @@ eraser_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 eraser_default_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -581,13 +583,13 @@ eraser_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 heal_invoker (GimpProcedure      *procedure,
-              Gimp               *gimp,
-              GimpContext        *context,
-              GimpProgress       *progress,
-              const GValueArray  *args,
-              GError            **error)
+              Gimp                  *gimp,
+              GimpContext           *context,
+              GimpProgress          *progress,
+              const GimpValueArray  *args,
+              GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -597,12 +599,12 @@ heal_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  src_drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  src_x = g_value_get_double (&args->values[2]);
-  src_y = g_value_get_double (&args->values[3]);
-  num_strokes = g_value_get_int (&args->values[4]);
-  strokes = gimp_value_get_floatarray (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  src_drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+  src_x = g_value_get_double (gimp_value_array_index (args, 2));
+  src_y = g_value_get_double (gimp_value_array_index (args, 3));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 4));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -632,22 +634,22 @@ heal_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 heal_default_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -674,13 +676,13 @@ heal_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 paintbrush_invoker (GimpProcedure      *procedure,
-                    Gimp               *gimp,
-                    GimpContext        *context,
-                    GimpProgress       *progress,
-                    const GValueArray  *args,
-                    GError            **error)
+                    Gimp                  *gimp,
+                    GimpContext           *context,
+                    GimpProgress          *progress,
+                    const GimpValueArray  *args,
+                    GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -690,12 +692,12 @@ paintbrush_invoker (GimpProcedure      *procedure,
   gint32 method;
   gdouble gradient_length;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  fade_out = g_value_get_double (&args->values[1]);
-  num_strokes = g_value_get_int (&args->values[2]);
-  strokes = gimp_value_get_floatarray (&args->values[3]);
-  method = g_value_get_enum (&args->values[4]);
-  gradient_length = g_value_get_double (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  fade_out = g_value_get_double (gimp_value_array_index (args, 1));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 3));
+  method = g_value_get_enum (gimp_value_array_index (args, 4));
+  gradient_length = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -758,22 +760,22 @@ paintbrush_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 paintbrush_default_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -800,22 +802,22 @@ paintbrush_default_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 pencil_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -842,13 +844,13 @@ pencil_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 smudge_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -856,10 +858,10 @@ smudge_invoker (GimpProcedure      *procedure,
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  pressure = g_value_get_double (&args->values[1]);
-  num_strokes = g_value_get_int (&args->values[2]);
-  strokes = gimp_value_get_floatarray (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  pressure = g_value_get_double (gimp_value_array_index (args, 1));
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 2));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -890,22 +892,22 @@ smudge_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 smudge_default_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 num_strokes;
   const gdouble *strokes;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  num_strokes = g_value_get_int (&args->values[1]);
-  strokes = gimp_value_get_floatarray (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  num_strokes = g_value_get_int (gimp_value_array_index (args, 1));
+  strokes = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
 
   if (success)
     {
diff --git a/app/pdb/palette-cmds.c b/app/pdb/palette-cmds.c
index 8f6b1d6..5f6b4a0 100644
--- a/app/pdb/palette-cmds.c
+++ b/app/pdb/palette-cmds.c
@@ -28,6 +28,8 @@
 
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -42,20 +44,20 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 palette_new_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -72,25 +74,25 @@ palette_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_duplicate_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *copy_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -115,27 +117,27 @@ palette_duplicate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], copy_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), copy_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_rename_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   const gchar *new_name;
   gchar *actual_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  new_name = g_value_get_string (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  new_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -154,23 +156,23 @@ palette_rename_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], actual_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_delete_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -188,20 +190,20 @@ palette_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_is_editable_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gboolean editable = FALSE;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -217,25 +219,25 @@ palette_is_editable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], editable);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), editable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_get_info_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_colors = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -251,26 +253,26 @@ palette_get_info_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], num_colors);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), num_colors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_get_colors_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_colors = 0;
   GimpRGB *colors = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -300,27 +302,27 @@ palette_get_colors_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_colors);
-      gimp_value_take_colorarray (&return_vals->values[2], colors, num_colors);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_colors);
+      gimp_value_take_colorarray (gimp_value_array_index (return_vals, 2), colors, num_colors);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_get_columns_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 num_columns = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -336,25 +338,25 @@ palette_get_columns_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], num_columns);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), num_columns);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_set_columns_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 columns;
 
-  name = g_value_get_string (&args->values[0]);
-  columns = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  columns = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -370,24 +372,24 @@ palette_set_columns_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_add_entry_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   const gchar *entry_name;
   GimpRGB color;
   gint32 entry_num = 0;
 
-  name = g_value_get_string (&args->values[0]);
-  entry_name = g_value_get_string (&args->values[1]);
-  gimp_value_get_rgb (&args->values[2], &color);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_name = g_value_get_string (gimp_value_array_index (args, 1));
+  gimp_value_get_rgb (gimp_value_array_index (args, 2), &color);
 
   if (success)
     {
@@ -408,25 +410,25 @@ palette_add_entry_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], entry_num);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), entry_num);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_delete_entry_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 entry_num;
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -449,22 +451,22 @@ palette_delete_entry_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_entry_get_color_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 entry_num;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -487,27 +489,27 @@ palette_entry_get_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &color);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_entry_set_color_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 entry_num;
   GimpRGB color;
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
-  gimp_value_get_rgb (&args->values[2], &color);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
+  gimp_value_get_rgb (gimp_value_array_index (args, 2), &color);
 
   if (success)
     {
@@ -523,22 +525,22 @@ palette_entry_set_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_entry_get_name_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 entry_num;
   gchar *entry_name = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -561,27 +563,27 @@ palette_entry_get_name_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], entry_name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), entry_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palette_entry_set_name_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   const gchar *name;
   gint32 entry_num;
   const gchar *entry_name;
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
-  entry_name = g_value_get_string (&args->values[2]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
+  entry_name = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
diff --git a/app/pdb/palette-select-cmds.c b/app/pdb/palette-select-cmds.c
index 96403a7..66a0b59 100644
--- a/app/pdb/palette-select-cmds.c
+++ b/app/pdb/palette-select-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -34,22 +36,22 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 palettes_popup_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   const gchar *palette_callback;
   const gchar *popup_title;
   const gchar *initial_palette;
 
-  palette_callback = g_value_get_string (&args->values[0]);
-  popup_title = g_value_get_string (&args->values[1]);
-  initial_palette = g_value_get_string (&args->values[2]);
+  palette_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  popup_title = g_value_get_string (gimp_value_array_index (args, 1));
+  initial_palette = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -66,18 +68,18 @@ palettes_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palettes_close_popup_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *palette_callback;
 
-  palette_callback = g_value_get_string (&args->values[0]);
+  palette_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -92,20 +94,20 @@ palettes_close_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palettes_set_popup_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   const gchar *palette_callback;
   const gchar *palette_name;
 
-  palette_callback = g_value_get_string (&args->values[0]);
-  palette_name = g_value_get_string (&args->values[1]);
+  palette_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  palette_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/palettes-cmds.c b/app/pdb/palettes-cmds.c
index 4b90093..19a875c 100644
--- a/app/pdb/palettes-cmds.c
+++ b/app/pdb/palettes-cmds.c
@@ -28,6 +28,8 @@
 
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -43,34 +45,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 palettes_refresh_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gimp_data_factory_data_refresh (gimp->palette_factory, context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 palettes_get_list_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_palettes = 0;
   gchar **palette_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -83,23 +85,23 @@ palettes_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_palettes);
-      gimp_value_take_stringarray (&return_vals->values[2], palette_list, num_palettes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_palettes);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), palette_list, num_palettes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palettes_get_palette_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
   gint32 num_colors = 0;
 
@@ -118,31 +120,31 @@ palettes_get_palette_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], name);
-      g_value_set_int (&return_vals->values[2], num_colors);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), num_colors);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 palettes_get_palette_entry_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 entry_num;
   gchar *actual_name = NULL;
   gint32 num_colors = 0;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
 
-  name = g_value_get_string (&args->values[0]);
-  entry_num = g_value_get_int (&args->values[1]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  entry_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -175,9 +177,9 @@ palettes_get_palette_entry_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], actual_name);
-      g_value_set_int (&return_vals->values[2], num_colors);
-      gimp_value_set_rgb (&return_vals->values[3], &color);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), num_colors);
+      gimp_value_set_rgb (gimp_value_array_index (return_vals, 3), &color);
     }
 
   return return_vals;
diff --git a/app/pdb/paths-cmds.c b/app/pdb/paths-cmds.c
index 89a46e9..2ff702a 100644
--- a/app/pdb/paths-cmds.c
+++ b/app/pdb/paths-cmds.c
@@ -27,6 +27,8 @@
 
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpimage.h"
@@ -47,21 +49,21 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 path_list_invoker (GimpProcedure      *procedure,
-                   Gimp               *gimp,
-                   GimpContext        *context,
-                   GimpProgress       *progress,
-                   const GValueArray  *args,
-                   GError            **error)
+                   Gimp                  *gimp,
+                   GimpContext           *context,
+                   GimpProgress          *progress,
+                   const GimpValueArray  *args,
+                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 num_paths = 0;
   gchar **path_list = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -74,27 +76,27 @@ path_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_paths);
-      gimp_value_take_stringarray (&return_vals->values[2], path_list, num_paths);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_paths);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), path_list, num_paths);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_get_current_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gchar *name = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -110,25 +112,25 @@ path_get_current_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_set_current_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *name;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -144,20 +146,20 @@ path_set_current_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_delete_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *name;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -173,16 +175,16 @@ path_delete_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_get_points_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   gint32 path_type = 0;
@@ -190,8 +192,8 @@ path_get_points_invoker (GimpProcedure      *procedure,
   gint32 num_path_point_details = 0;
   gdouble *points_pairs = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -239,22 +241,22 @@ path_get_points_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], path_type);
-      g_value_set_int (&return_vals->values[2], path_closed);
-      g_value_set_int (&return_vals->values[3], num_path_point_details);
-      gimp_value_take_floatarray (&return_vals->values[4], points_pairs, num_path_point_details);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), path_type);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), path_closed);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), num_path_point_details);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 4), points_pairs, num_path_point_details);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_set_points_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -262,10 +264,10 @@ path_set_points_invoker (GimpProcedure      *procedure,
   gint32 num_path_points;
   const gdouble *points_pairs;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
-  num_path_points = g_value_get_int (&args->values[3]);
-  points_pairs = gimp_value_get_floatarray (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
+  num_path_points = g_value_get_int (gimp_value_array_index (args, 3));
+  points_pairs = gimp_value_get_floatarray (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -313,18 +315,18 @@ path_set_points_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_stroke_current_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -355,24 +357,24 @@ path_stroke_current_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_get_point_at_dist_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gdouble distance;
   gint32 x_point = 0;
   gint32 y_point = 0;
   gdouble slope = 0.0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  distance = g_value_get_double (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  distance = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -432,30 +434,30 @@ path_get_point_at_dist_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], x_point);
-      g_value_set_int (&return_vals->values[2], y_point);
-      g_value_set_double (&return_vals->values[3], slope);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), x_point);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), y_point);
+      g_value_set_double (gimp_value_array_index (return_vals, 3), slope);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_get_tattoo_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   gint32 tattoo = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -471,27 +473,27 @@ path_get_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], tattoo);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), tattoo);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_set_tattoo_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *name;
   gint32 tattovalue;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
-  tattovalue = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
+  tattovalue = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -507,22 +509,22 @@ path_set_tattoo_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 get_path_by_tattoo_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 tattoo;
   gchar *name = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  tattoo = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  tattoo = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -538,27 +540,27 @@ get_path_by_tattoo_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], name);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_get_locked_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   gboolean locked = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -574,27 +576,27 @@ path_get_locked_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], locked);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), locked);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 path_set_locked_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *name;
   gboolean locked;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
-  locked = g_value_get_boolean (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
+  locked = g_value_get_boolean (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -610,13 +612,13 @@ path_set_locked_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_to_selection_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -627,13 +629,13 @@ path_to_selection_invoker (GimpProcedure      *procedure,
   gdouble feather_radius_x;
   gdouble feather_radius_y;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
-  op = g_value_get_enum (&args->values[2]);
-  antialias = g_value_get_boolean (&args->values[3]);
-  feather = g_value_get_boolean (&args->values[4]);
-  feather_radius_x = g_value_get_double (&args->values[5]);
-  feather_radius_y = g_value_get_double (&args->values[6]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
+  op = g_value_get_enum (gimp_value_array_index (args, 2));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 3));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 4));
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 5));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -654,13 +656,13 @@ path_to_selection_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 path_import_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -668,10 +670,10 @@ path_import_invoker (GimpProcedure      *procedure,
   gboolean merge;
   gboolean scale;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  filename = g_value_get_string (&args->values[1]);
-  merge = g_value_get_boolean (&args->values[2]);
-  scale = g_value_get_boolean (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
+  merge = g_value_get_boolean (gimp_value_array_index (args, 2));
+  scale = g_value_get_boolean (gimp_value_array_index (args, 3));
 
   if (success)
     {
diff --git a/app/pdb/pattern-cmds.c b/app/pdb/pattern-cmds.c
index 0134e5f..cb98313 100644
--- a/app/pdb/pattern-cmds.c
+++ b/app/pdb/pattern-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpcontext.h"
@@ -39,22 +41,22 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 pattern_get_info_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 width = 0;
   gint32 height = 0;
   gint32 bpp = 0;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -75,24 +77,24 @@ pattern_get_info_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), bpp);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 pattern_get_pixels_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gint32 width = 0;
   gint32 height = 0;
@@ -100,7 +102,7 @@ pattern_get_pixels_invoker (GimpProcedure      *procedure,
   gint32 num_color_bytes = 0;
   guint8 *color_bytes = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -124,11 +126,11 @@ pattern_get_pixels_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], bpp);
-      g_value_set_int (&return_vals->values[4], num_color_bytes);
-      gimp_value_take_int8array (&return_vals->values[5], color_bytes, num_color_bytes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), num_color_bytes);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 5), color_bytes, num_color_bytes);
     }
 
   return return_vals;
diff --git a/app/pdb/pattern-select-cmds.c b/app/pdb/pattern-select-cmds.c
index 3f7f02b..6388ea3 100644
--- a/app/pdb/pattern-select-cmds.c
+++ b/app/pdb/pattern-select-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -34,22 +36,22 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 patterns_popup_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   const gchar *pattern_callback;
   const gchar *popup_title;
   const gchar *initial_pattern;
 
-  pattern_callback = g_value_get_string (&args->values[0]);
-  popup_title = g_value_get_string (&args->values[1]);
-  initial_pattern = g_value_get_string (&args->values[2]);
+  pattern_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  popup_title = g_value_get_string (gimp_value_array_index (args, 1));
+  initial_pattern = g_value_get_string (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -66,18 +68,18 @@ patterns_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 patterns_close_popup_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *pattern_callback;
 
-  pattern_callback = g_value_get_string (&args->values[0]);
+  pattern_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -92,20 +94,20 @@ patterns_close_popup_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 patterns_set_popup_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   const gchar *pattern_callback;
   const gchar *pattern_name;
 
-  pattern_callback = g_value_get_string (&args->values[0]);
-  pattern_name = g_value_get_string (&args->values[1]);
+  pattern_callback = g_value_get_string (gimp_value_array_index (args, 0));
+  pattern_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/patterns-cmds.c b/app/pdb/patterns-cmds.c
index 7b97e59..00ccb09 100644
--- a/app/pdb/patterns-cmds.c
+++ b/app/pdb/patterns-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -41,34 +43,34 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 patterns_refresh_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gimp_data_factory_data_refresh (gimp->pattern_factory, context);
 
   return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 patterns_get_list_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *filter;
   gint32 num_patterns = 0;
   gchar **pattern_list = NULL;
 
-  filter = g_value_get_string (&args->values[0]);
+  filter = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -81,23 +83,23 @@ patterns_get_list_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_patterns);
-      gimp_value_take_stringarray (&return_vals->values[2], pattern_list, num_patterns);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_patterns);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), pattern_list, num_patterns);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 patterns_get_pattern_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *name = NULL;
   gint32 width = 0;
   gint32 height = 0;
@@ -118,24 +120,24 @@ patterns_get_pattern_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], name);
-      g_value_set_int (&return_vals->values[2], width);
-      g_value_set_int (&return_vals->values[3], height);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), height);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 patterns_get_pattern_data_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   gchar *actual_name = NULL;
   gint32 width = 0;
@@ -144,7 +146,7 @@ patterns_get_pattern_data_invoker (GimpProcedure      *procedure,
   gint32 length = 0;
   guint8 *mask_data = NULL;
 
-  name = g_value_get_string (&args->values[0]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -173,12 +175,12 @@ patterns_get_pattern_data_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], actual_name);
-      g_value_set_int (&return_vals->values[2], width);
-      g_value_set_int (&return_vals->values[3], height);
-      g_value_set_int (&return_vals->values[4], mask_bpp);
-      g_value_set_int (&return_vals->values[5], length);
-      gimp_value_take_int8array (&return_vals->values[6], mask_data, length);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), actual_name);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), mask_bpp);
+      g_value_set_int (gimp_value_array_index (return_vals, 5), length);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 6), mask_data, length);
     }
 
   return return_vals;
diff --git a/app/pdb/plug-in-cmds.c b/app/pdb/plug-in-cmds.c
index 6c9db07..ae7d931 100644
--- a/app/pdb/plug-in-cmds.c
+++ b/app/pdb/plug-in-cmds.c
@@ -28,6 +28,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -44,15 +46,15 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 plugins_query_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *search_string;
   gint32 num_plugins = 0;
   gchar **menu_path = NULL;
@@ -62,7 +64,7 @@ plugins_query_invoker (GimpProcedure      *procedure,
   gint32 *plugin_install_time = NULL;
   gchar **plugin_real_name = NULL;
 
-  search_string = g_value_get_string (&args->values[0]);
+  search_string = g_value_get_string (gimp_value_array_index (args, 0));
 
   num_plugins = gimp_plug_in_manager_query (gimp->plug_in_manager,
                                             search_string,
@@ -75,36 +77,36 @@ plugins_query_invoker (GimpProcedure      *procedure,
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
-  g_value_set_int (&return_vals->values[1], num_plugins);
-  gimp_value_take_stringarray (&return_vals->values[2], menu_path, num_plugins);
-  g_value_set_int (&return_vals->values[3], num_plugins);
-  gimp_value_take_stringarray (&return_vals->values[4], plugin_accelerator, num_plugins);
-  g_value_set_int (&return_vals->values[5], num_plugins);
-  gimp_value_take_stringarray (&return_vals->values[6], plugin_location, num_plugins);
-  g_value_set_int (&return_vals->values[7], num_plugins);
-  gimp_value_take_stringarray (&return_vals->values[8], plugin_image_type, num_plugins);
-  g_value_set_int (&return_vals->values[9], num_plugins);
-  gimp_value_take_int32array (&return_vals->values[10], plugin_install_time, num_plugins);
-  g_value_set_int (&return_vals->values[11], num_plugins);
-  gimp_value_take_stringarray (&return_vals->values[12], plugin_real_name, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_plugins);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), menu_path, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 3), num_plugins);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 4), plugin_accelerator, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 5), num_plugins);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 6), plugin_location, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 7), num_plugins);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 8), plugin_image_type, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 9), num_plugins);
+  gimp_value_take_int32array (gimp_value_array_index (return_vals, 10), plugin_install_time, num_plugins);
+  g_value_set_int (gimp_value_array_index (return_vals, 11), num_plugins);
+  gimp_value_take_stringarray (gimp_value_array_index (return_vals, 12), plugin_real_name, num_plugins);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_domain_register_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   const gchar *domain_name;
   const gchar *domain_path;
 
-  domain_name = g_value_get_string (&args->values[0]);
-  domain_path = g_value_get_string (&args->values[1]);
+  domain_name = g_value_get_string (gimp_value_array_index (args, 0));
+  domain_path = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -125,20 +127,20 @@ plugin_domain_register_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_help_register_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *domain_name;
   const gchar *domain_uri;
 
-  domain_name = g_value_get_string (&args->values[0]);
-  domain_uri = g_value_get_string (&args->values[1]);
+  domain_name = g_value_get_string (gimp_value_array_index (args, 0));
+  domain_uri = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -159,20 +161,20 @@ plugin_help_register_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_menu_register_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
   const gchar *menu_path;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  menu_path = g_value_get_string (&args->values[1]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  menu_path = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -194,20 +196,20 @@ plugin_menu_register_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_menu_branch_register_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   const gchar *menu_path;
   const gchar *menu_name;
 
-  menu_path = g_value_get_string (&args->values[0]);
-  menu_name = g_value_get_string (&args->values[1]);
+  menu_path = g_value_get_string (gimp_value_array_index (args, 0));
+  menu_name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -228,13 +230,13 @@ plugin_menu_branch_register_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_icon_register_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   const gchar *procedure_name;
@@ -242,10 +244,10 @@ plugin_icon_register_invoker (GimpProcedure      *procedure,
   gint32 icon_data_length;
   const guint8 *icon_data;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  icon_type = g_value_get_enum (&args->values[1]);
-  icon_data_length = g_value_get_int (&args->values[2]);
-  icon_data = gimp_value_get_int8array (&args->values[3]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  icon_type = g_value_get_enum (gimp_value_array_index (args, 1));
+  icon_data_length = g_value_get_int (gimp_value_array_index (args, 2));
+  icon_data = gimp_value_get_int8array (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -279,18 +281,18 @@ plugin_icon_register_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_set_pdb_error_handler_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   gint32 handler;
 
-  handler = g_value_get_enum (&args->values[0]);
+  handler = g_value_get_enum (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -310,16 +312,16 @@ plugin_set_pdb_error_handler_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_get_pdb_error_handler_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 handler = 0;
 
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -337,18 +339,18 @@ plugin_get_pdb_error_handler_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], handler);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), handler);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_enable_precision_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -366,16 +368,16 @@ plugin_enable_precision_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plugin_precision_enabled_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gboolean enabled = FALSE;
 
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -393,7 +395,7 @@ plugin_precision_enabled_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], enabled);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), enabled);
 
   return return_vals;
 }
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index 2aa855c..27df4a4 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpdrawable-operation.h"
@@ -43,20 +45,20 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 plug_in_colortoalpha_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   GimpRGB color;
 
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  gimp_value_get_rgb (&args->values[3], &color);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 3), &color);
 
   if (success)
     {
@@ -87,20 +89,20 @@ plug_in_colortoalpha_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plug_in_pixelize_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 pixel_width;
 
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  pixel_width = g_value_get_int (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  pixel_width = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -128,22 +130,22 @@ plug_in_pixelize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plug_in_pixelize2_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
   gint32 pixel_width;
   gint32 pixel_height;
 
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  pixel_width = g_value_get_int (&args->values[3]);
-  pixel_height = g_value_get_int (&args->values[4]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  pixel_width = g_value_get_int (gimp_value_array_index (args, 3));
+  pixel_height = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -171,13 +173,13 @@ plug_in_pixelize2_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plug_in_polar_coords_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -187,12 +189,12 @@ plug_in_polar_coords_invoker (GimpProcedure      *procedure,
   gboolean inverse;
   gboolean polrec;
 
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
-  circle = g_value_get_double (&args->values[3]);
-  angle = g_value_get_double (&args->values[4]);
-  backwards = g_value_get_boolean (&args->values[5]);
-  inverse = g_value_get_boolean (&args->values[6]);
-  polrec = g_value_get_boolean (&args->values[7]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
+  circle = g_value_get_double (gimp_value_array_index (args, 3));
+  angle = g_value_get_double (gimp_value_array_index (args, 4));
+  backwards = g_value_get_boolean (gimp_value_array_index (args, 5));
+  inverse = g_value_get_boolean (gimp_value_array_index (args, 6));
+  polrec = g_value_get_boolean (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -223,18 +225,18 @@ plug_in_polar_coords_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 plug_in_vinvert_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
 
-  drawable = gimp_value_get_drawable (&args->values[2], gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
 
   if (success)
     {
diff --git a/app/pdb/procedural-db-cmds.c b/app/pdb/procedural-db-cmds.c
index 7fed892..67e8148 100644
--- a/app/pdb/procedural-db-cmds.c
+++ b/app/pdb/procedural-db-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -39,15 +41,15 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_temp_name_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gchar *temp_name = NULL;
 
   static gint proc_number = 0;
@@ -55,23 +57,23 @@ procedural_db_temp_name_invoker (GimpProcedure      *procedure,
   temp_name = g_strdup_printf ("temp-procedure-number-%d", proc_number++);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_take_string (&return_vals->values[1], temp_name);
+  g_value_take_string (gimp_value_array_index (return_vals, 1), temp_name);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_dump_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   const gchar *filename;
 
-  filename = g_value_get_string (&args->values[0]);
+  filename = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -82,16 +84,16 @@ procedural_db_dump_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_query_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *name;
   const gchar *blurb;
   const gchar *help;
@@ -102,13 +104,13 @@ procedural_db_query_invoker (GimpProcedure      *procedure,
   gint32 num_matches = 0;
   gchar **procedure_names = NULL;
 
-  name = g_value_get_string (&args->values[0]);
-  blurb = g_value_get_string (&args->values[1]);
-  help = g_value_get_string (&args->values[2]);
-  author = g_value_get_string (&args->values[3]);
-  copyright = g_value_get_string (&args->values[4]);
-  date = g_value_get_string (&args->values[5]);
-  proc_type = g_value_get_string (&args->values[6]);
+  name = g_value_get_string (gimp_value_array_index (args, 0));
+  blurb = g_value_get_string (gimp_value_array_index (args, 1));
+  help = g_value_get_string (gimp_value_array_index (args, 2));
+  author = g_value_get_string (gimp_value_array_index (args, 3));
+  copyright = g_value_get_string (gimp_value_array_index (args, 4));
+  date = g_value_get_string (gimp_value_array_index (args, 5));
+  proc_type = g_value_get_string (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -124,27 +126,27 @@ procedural_db_query_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_matches);
-      gimp_value_take_stringarray (&return_vals->values[2], procedure_names, num_matches);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_matches);
+      gimp_value_take_stringarray (gimp_value_array_index (return_vals, 2), procedure_names, num_matches);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_proc_exists_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *procedure_name;
   gboolean exists = FALSE;
 
-  procedure_name = g_value_get_string (&args->values[0]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -172,21 +174,21 @@ procedural_db_proc_exists_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], exists);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), exists);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_proc_info_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *procedure_name;
   gchar *blurb = NULL;
   gchar *help = NULL;
@@ -197,7 +199,7 @@ procedural_db_proc_info_invoker (GimpProcedure      *procedure,
   gint32 num_args = 0;
   gint32 num_values = 0;
 
-  procedure_name = g_value_get_string (&args->values[0]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -221,37 +223,37 @@ procedural_db_proc_info_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_take_string (&return_vals->values[1], blurb);
-      g_value_take_string (&return_vals->values[2], help);
-      g_value_take_string (&return_vals->values[3], author);
-      g_value_take_string (&return_vals->values[4], copyright);
-      g_value_take_string (&return_vals->values[5], date);
-      g_value_set_enum (&return_vals->values[6], proc_type);
-      g_value_set_int (&return_vals->values[7], num_args);
-      g_value_set_int (&return_vals->values[8], num_values);
+      g_value_take_string (gimp_value_array_index (return_vals, 1), blurb);
+      g_value_take_string (gimp_value_array_index (return_vals, 2), help);
+      g_value_take_string (gimp_value_array_index (return_vals, 3), author);
+      g_value_take_string (gimp_value_array_index (return_vals, 4), copyright);
+      g_value_take_string (gimp_value_array_index (return_vals, 5), date);
+      g_value_set_enum (gimp_value_array_index (return_vals, 6), proc_type);
+      g_value_set_int (gimp_value_array_index (return_vals, 7), num_args);
+      g_value_set_int (gimp_value_array_index (return_vals, 8), num_values);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_proc_arg_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *procedure_name;
   gint32 arg_num;
   gint32 arg_type = 0;
   gchar *arg_name = NULL;
   gchar *arg_desc = NULL;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  arg_num = g_value_get_int (&args->values[1]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  arg_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -291,32 +293,32 @@ procedural_db_proc_arg_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_enum (&return_vals->values[1], arg_type);
-      g_value_take_string (&return_vals->values[2], arg_name);
-      g_value_take_string (&return_vals->values[3], arg_desc);
+      g_value_set_enum (gimp_value_array_index (return_vals, 1), arg_type);
+      g_value_take_string (gimp_value_array_index (return_vals, 2), arg_name);
+      g_value_take_string (gimp_value_array_index (return_vals, 3), arg_desc);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_proc_val_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *procedure_name;
   gint32 val_num;
   gint32 val_type = 0;
   gchar *val_name = NULL;
   gchar *val_desc = NULL;
 
-  procedure_name = g_value_get_string (&args->values[0]);
-  val_num = g_value_get_int (&args->values[1]);
+  procedure_name = g_value_get_string (gimp_value_array_index (args, 0));
+  val_num = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -356,29 +358,29 @@ procedural_db_proc_val_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_enum (&return_vals->values[1], val_type);
-      g_value_take_string (&return_vals->values[2], val_name);
-      g_value_take_string (&return_vals->values[3], val_desc);
+      g_value_set_enum (gimp_value_array_index (return_vals, 1), val_type);
+      g_value_take_string (gimp_value_array_index (return_vals, 2), val_name);
+      g_value_take_string (gimp_value_array_index (return_vals, 3), val_desc);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_get_data_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *identifier;
   gint32 bytes = 0;
   guint8 *data = NULL;
 
-  identifier = g_value_get_string (&args->values[0]);
+  identifier = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -401,27 +403,27 @@ procedural_db_get_data_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], bytes);
-      gimp_value_take_int8array (&return_vals->values[2], data, bytes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), bytes);
+      gimp_value_take_int8array (gimp_value_array_index (return_vals, 2), data, bytes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_get_data_size_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *identifier;
   gint32 bytes = 0;
 
-  identifier = g_value_get_string (&args->values[0]);
+  identifier = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -438,27 +440,27 @@ procedural_db_get_data_size_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], bytes);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), bytes);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 procedural_db_set_data_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   const gchar *identifier;
   gint32 bytes;
   const guint8 *data;
 
-  identifier = g_value_get_string (&args->values[0]);
-  bytes = g_value_get_int (&args->values[1]);
-  data = gimp_value_get_int8array (&args->values[2]);
+  identifier = g_value_get_string (gimp_value_array_index (args, 0));
+  bytes = g_value_get_int (gimp_value_array_index (args, 1));
+  data = gimp_value_get_int8array (gimp_value_array_index (args, 2));
 
   if (success)
     {
diff --git a/app/pdb/progress-cmds.c b/app/pdb/progress-cmds.c
index 1586dfc..b88b0d3 100644
--- a/app/pdb/progress-cmds.c
+++ b/app/pdb/progress-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -36,20 +38,20 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 progress_init_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   const gchar *message;
   GimpObject *gdisplay;
 
-  message = g_value_get_string (&args->values[0]);
-  gdisplay = gimp_value_get_display (&args->values[1], gimp);
+  message = g_value_get_string (gimp_value_array_index (args, 0));
+  gdisplay = gimp_value_get_display (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -68,18 +70,18 @@ progress_init_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_update_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   gdouble percentage;
 
-  percentage = g_value_get_double (&args->values[0]);
+  percentage = g_value_get_double (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -98,13 +100,13 @@ progress_update_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_pulse_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -121,18 +123,18 @@ progress_pulse_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_set_text_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   const gchar *message;
 
-  message = g_value_get_string (&args->values[0]);
+  message = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -151,13 +153,13 @@ progress_set_text_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_end_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -175,16 +177,16 @@ progress_end_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_get_window_handle_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 window = 0;
 
   GimpPlugIn *plug_in = gimp->plug_in_manager->current_plug_in;
@@ -201,23 +203,23 @@ progress_get_window_handle_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], window);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), window);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_install_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   const gchar *progress_callback;
 
-  progress_callback = g_value_get_string (&args->values[0]);
+  progress_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -233,18 +235,18 @@ progress_install_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_uninstall_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
   const gchar *progress_callback;
 
-  progress_callback = g_value_get_string (&args->values[0]);
+  progress_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -260,18 +262,18 @@ progress_uninstall_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 progress_cancel_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   const gchar *progress_callback;
 
-  progress_callback = g_value_get_string (&args->values[0]);
+  progress_callback = g_value_get_string (gimp_value_array_index (args, 0));
 
   if (success)
     {
diff --git a/app/pdb/selection-cmds.c b/app/pdb/selection-cmds.c
index 41c46da..3d8ed8b 100644
--- a/app/pdb/selection-cmds.c
+++ b/app/pdb/selection-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpchannel.h"
@@ -43,16 +45,16 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 selection_bounds_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean non_empty = FALSE;
   gint32 x1 = 0;
@@ -60,7 +62,7 @@ selection_bounds_invoker (GimpProcedure      *procedure,
   gint32 x2 = 0;
   gint32 y2 = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -73,34 +75,34 @@ selection_bounds_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_boolean (&return_vals->values[1], non_empty);
-      g_value_set_int (&return_vals->values[2], x1);
-      g_value_set_int (&return_vals->values[3], y1);
-      g_value_set_int (&return_vals->values[4], x2);
-      g_value_set_int (&return_vals->values[5], y2);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 1), non_empty);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), x1);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), y1);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), x2);
+      g_value_set_int (gimp_value_array_index (return_vals, 5), y2);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_value_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gint32 x;
   gint32 y;
   gint32 value = 0;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_int (&args->values[1]);
-  y = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_int (gimp_value_array_index (args, 1));
+  y = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -116,25 +118,25 @@ selection_value_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], value);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), value);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_is_empty_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean is_empty = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -145,27 +147,27 @@ selection_is_empty_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], is_empty);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), is_empty);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_translate_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 offx;
   gint32 offy;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  offx = g_value_get_int (&args->values[1]);
-  offy = g_value_get_int (&args->values[2]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  offx = g_value_get_int (gimp_value_array_index (args, 1));
+  offy = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -177,24 +179,24 @@ selection_translate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_float_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 offx;
   gint32 offy;
   GimpLayer *layer = NULL;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  offx = g_value_get_int (&args->values[1]);
-  offy = g_value_get_int (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  offx = g_value_get_int (gimp_value_array_index (args, 1));
+  offy = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -217,23 +219,23 @@ selection_float_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_invert_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -244,18 +246,18 @@ selection_invert_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_sharpen_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -266,18 +268,18 @@ selection_sharpen_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_all_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -288,18 +290,18 @@ selection_all_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_none_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -310,20 +312,20 @@ selection_none_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_feather_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gdouble radius;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  radius = g_value_get_double (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  radius = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -335,20 +337,20 @@ selection_feather_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_border_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 radius;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  radius = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  radius = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -361,20 +363,20 @@ selection_border_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_grow_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 steps;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  steps = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  steps = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -386,20 +388,20 @@ selection_grow_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_shrink_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   gint32 steps;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  steps = g_value_get_int (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  steps = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -411,18 +413,18 @@ selection_shrink_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_layer_alpha_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -438,18 +440,18 @@ selection_layer_alpha_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_load_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -465,20 +467,20 @@ selection_load_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_save_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpChannel *channel = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -492,25 +494,25 @@ selection_save_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_channel (&return_vals->values[1], channel);
+    gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 selection_combine_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpChannel *channel;
   gint32 operation;
 
-  channel = gimp_value_get_channel (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
+  channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/selection-tools-cmds.c b/app/pdb/selection-tools-cmds.c
index d29982f..a14094c 100644
--- a/app/pdb/selection-tools-cmds.c
+++ b/app/pdb/selection-tools-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpchannel-select.h"
@@ -42,13 +44,13 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 by_color_select_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -60,14 +62,14 @@ by_color_select_invoker (GimpProcedure      *procedure,
   gdouble feather_radius;
   gboolean sample_merged;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &color);
-  threshold = g_value_get_int (&args->values[2]);
-  operation = g_value_get_enum (&args->values[3]);
-  antialias = g_value_get_boolean (&args->values[4]);
-  feather = g_value_get_boolean (&args->values[5]);
-  feather_radius = g_value_get_double (&args->values[6]);
-  sample_merged = g_value_get_boolean (&args->values[7]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
+  threshold = g_value_get_int (gimp_value_array_index (args, 2));
+  operation = g_value_get_enum (gimp_value_array_index (args, 3));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 4));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 5));
+  feather_radius = g_value_get_double (gimp_value_array_index (args, 6));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -90,13 +92,13 @@ by_color_select_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 by_color_select_full_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -111,17 +113,17 @@ by_color_select_full_invoker (GimpProcedure      *procedure,
   gboolean select_transparent;
   gint32 select_criterion;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &color);
-  threshold = g_value_get_int (&args->values[2]);
-  operation = g_value_get_enum (&args->values[3]);
-  antialias = g_value_get_boolean (&args->values[4]);
-  feather = g_value_get_boolean (&args->values[5]);
-  feather_radius_x = g_value_get_double (&args->values[6]);
-  feather_radius_y = g_value_get_double (&args->values[7]);
-  sample_merged = g_value_get_boolean (&args->values[8]);
-  select_transparent = g_value_get_boolean (&args->values[9]);
-  select_criterion = g_value_get_enum (&args->values[10]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
+  threshold = g_value_get_int (gimp_value_array_index (args, 2));
+  operation = g_value_get_enum (gimp_value_array_index (args, 3));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 4));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 5));
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 6));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 7));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 8));
+  select_transparent = g_value_get_boolean (gimp_value_array_index (args, 9));
+  select_criterion = g_value_get_enum (gimp_value_array_index (args, 10));
 
   if (success)
     {
@@ -144,13 +146,13 @@ by_color_select_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 ellipse_select_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -163,15 +165,15 @@ ellipse_select_invoker (GimpProcedure      *procedure,
   gboolean feather;
   gdouble feather_radius;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  operation = g_value_get_enum (&args->values[5]);
-  antialias = g_value_get_boolean (&args->values[6]);
-  feather = g_value_get_boolean (&args->values[7]);
-  feather_radius = g_value_get_double (&args->values[8]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 1));
+  y = g_value_get_double (gimp_value_array_index (args, 2));
+  width = g_value_get_double (gimp_value_array_index (args, 3));
+  height = g_value_get_double (gimp_value_array_index (args, 4));
+  operation = g_value_get_enum (gimp_value_array_index (args, 5));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 6));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 7));
+  feather_radius = g_value_get_double (gimp_value_array_index (args, 8));
 
   if (success)
     {
@@ -190,13 +192,13 @@ ellipse_select_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 free_select_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -207,13 +209,13 @@ free_select_invoker (GimpProcedure      *procedure,
   gboolean feather;
   gdouble feather_radius;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  num_segs = g_value_get_int (&args->values[1]);
-  segs = gimp_value_get_floatarray (&args->values[2]);
-  operation = g_value_get_enum (&args->values[3]);
-  antialias = g_value_get_boolean (&args->values[4]);
-  feather = g_value_get_boolean (&args->values[5]);
-  feather_radius = g_value_get_double (&args->values[6]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  num_segs = g_value_get_int (gimp_value_array_index (args, 1));
+  segs = gimp_value_get_floatarray (gimp_value_array_index (args, 2));
+  operation = g_value_get_enum (gimp_value_array_index (args, 3));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 4));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 5));
+  feather_radius = g_value_get_double (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -233,13 +235,13 @@ free_select_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 fuzzy_select_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -252,15 +254,15 @@ fuzzy_select_invoker (GimpProcedure      *procedure,
   gdouble feather_radius;
   gboolean sample_merged;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  threshold = g_value_get_int (&args->values[3]);
-  operation = g_value_get_enum (&args->values[4]);
-  antialias = g_value_get_boolean (&args->values[5]);
-  feather = g_value_get_boolean (&args->values[6]);
-  feather_radius = g_value_get_double (&args->values[7]);
-  sample_merged = g_value_get_boolean (&args->values[8]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 1));
+  y = g_value_get_double (gimp_value_array_index (args, 2));
+  threshold = g_value_get_int (gimp_value_array_index (args, 3));
+  operation = g_value_get_enum (gimp_value_array_index (args, 4));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 5));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 6));
+  feather_radius = g_value_get_double (gimp_value_array_index (args, 7));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 8));
 
   if (success)
     {
@@ -284,13 +286,13 @@ fuzzy_select_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 fuzzy_select_full_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpDrawable *drawable;
@@ -306,18 +308,18 @@ fuzzy_select_full_invoker (GimpProcedure      *procedure,
   gboolean select_transparent;
   gint32 select_criterion;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  threshold = g_value_get_int (&args->values[3]);
-  operation = g_value_get_enum (&args->values[4]);
-  antialias = g_value_get_boolean (&args->values[5]);
-  feather = g_value_get_boolean (&args->values[6]);
-  feather_radius_x = g_value_get_double (&args->values[7]);
-  feather_radius_y = g_value_get_double (&args->values[8]);
-  sample_merged = g_value_get_boolean (&args->values[9]);
-  select_transparent = g_value_get_boolean (&args->values[10]);
-  select_criterion = g_value_get_enum (&args->values[11]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 1));
+  y = g_value_get_double (gimp_value_array_index (args, 2));
+  threshold = g_value_get_int (gimp_value_array_index (args, 3));
+  operation = g_value_get_enum (gimp_value_array_index (args, 4));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 5));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 6));
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 7));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 8));
+  sample_merged = g_value_get_boolean (gimp_value_array_index (args, 9));
+  select_transparent = g_value_get_boolean (gimp_value_array_index (args, 10));
+  select_criterion = g_value_get_enum (gimp_value_array_index (args, 11));
 
   if (success)
     {
@@ -341,13 +343,13 @@ fuzzy_select_full_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 rect_select_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -359,14 +361,14 @@ rect_select_invoker (GimpProcedure      *procedure,
   gboolean feather;
   gdouble feather_radius;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  operation = g_value_get_enum (&args->values[5]);
-  feather = g_value_get_boolean (&args->values[6]);
-  feather_radius = g_value_get_double (&args->values[7]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 1));
+  y = g_value_get_double (gimp_value_array_index (args, 2));
+  width = g_value_get_double (gimp_value_array_index (args, 3));
+  height = g_value_get_double (gimp_value_array_index (args, 4));
+  operation = g_value_get_enum (gimp_value_array_index (args, 5));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 6));
+  feather_radius = g_value_get_double (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -384,13 +386,13 @@ rect_select_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 round_rect_select_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
@@ -406,18 +408,18 @@ round_rect_select_invoker (GimpProcedure      *procedure,
   gdouble feather_radius_x;
   gdouble feather_radius_y;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  x = g_value_get_double (&args->values[1]);
-  y = g_value_get_double (&args->values[2]);
-  width = g_value_get_double (&args->values[3]);
-  height = g_value_get_double (&args->values[4]);
-  corner_radius_x = g_value_get_double (&args->values[5]);
-  corner_radius_y = g_value_get_double (&args->values[6]);
-  operation = g_value_get_enum (&args->values[7]);
-  antialias = g_value_get_boolean (&args->values[8]);
-  feather = g_value_get_boolean (&args->values[9]);
-  feather_radius_x = g_value_get_double (&args->values[10]);
-  feather_radius_y = g_value_get_double (&args->values[11]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 1));
+  y = g_value_get_double (gimp_value_array_index (args, 2));
+  width = g_value_get_double (gimp_value_array_index (args, 3));
+  height = g_value_get_double (gimp_value_array_index (args, 4));
+  corner_radius_x = g_value_get_double (gimp_value_array_index (args, 5));
+  corner_radius_y = g_value_get_double (gimp_value_array_index (args, 6));
+  operation = g_value_get_enum (gimp_value_array_index (args, 7));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 8));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 9));
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 10));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 11));
 
   if (success)
     {
diff --git a/app/pdb/text-layer-cmds.c b/app/pdb/text-layer-cmds.c
index 807a91a..7f148e9 100644
--- a/app/pdb/text-layer-cmds.c
+++ b/app/pdb/text-layer-cmds.c
@@ -28,6 +28,8 @@
 #include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpcontext.h"
@@ -46,16 +48,16 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 text_layer_new_invoker (GimpProcedure      *procedure,
-                        Gimp               *gimp,
-                        GimpContext        *context,
-                        GimpProgress       *progress,
-                        const GValueArray  *args,
-                        GError            **error)
+                        Gimp                  *gimp,
+                        GimpContext           *context,
+                        GimpProgress          *progress,
+                        const GimpValueArray  *args,
+                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *text;
   const gchar *fontname;
@@ -63,11 +65,11 @@ text_layer_new_invoker (GimpProcedure      *procedure,
   GimpUnit unit;
   GimpLayer *layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  text = g_value_get_string (&args->values[1]);
-  fontname = g_value_get_string (&args->values[2]);
-  size = g_value_get_double (&args->values[3]);
-  unit = g_value_get_int (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  text = g_value_get_string (gimp_value_array_index (args, 1));
+  fontname = g_value_get_string (gimp_value_array_index (args, 2));
+  size = g_value_get_double (gimp_value_array_index (args, 3));
+  unit = g_value_get_int (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -100,25 +102,25 @@ text_layer_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_text_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gchar *text = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -138,25 +140,25 @@ text_layer_get_text_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], text);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), text);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_text_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   const gchar *text;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  text = g_value_get_string (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  text = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -177,20 +179,20 @@ text_layer_set_text_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_markup_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gchar *markup = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -210,25 +212,25 @@ text_layer_get_markup_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], markup);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), markup);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_font_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gchar *font = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -248,25 +250,25 @@ text_layer_get_font_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], font);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), font);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_font_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   const gchar *font;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  font = g_value_get_string (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  font = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -287,21 +289,21 @@ text_layer_set_font_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_font_size_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gdouble font_size = 0.0;
   GimpUnit unit = 0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -323,29 +325,29 @@ text_layer_get_font_size_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], font_size);
-      g_value_set_int (&return_vals->values[2], unit);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), font_size);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), unit);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_font_size_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble font_size;
   GimpUnit unit;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  font_size = g_value_get_double (&args->values[1]);
-  unit = g_value_get_int (&args->values[2]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  font_size = g_value_get_double (gimp_value_array_index (args, 1));
+  unit = g_value_get_int (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -367,20 +369,20 @@ text_layer_set_font_size_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_antialias_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean antialias = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -400,25 +402,25 @@ text_layer_get_antialias_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], antialias);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), antialias);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_antialias_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean antialias;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  antialias = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -439,20 +441,20 @@ text_layer_set_antialias_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_hint_style_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gint32 style = 0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -472,25 +474,25 @@ text_layer_get_hint_style_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], style);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), style);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_hint_style_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 style;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  style = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  style = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -511,20 +513,20 @@ text_layer_set_hint_style_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_kerning_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean kerning = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -544,25 +546,25 @@ text_layer_get_kerning_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], kerning);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), kerning);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_kerning_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean kerning;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  kerning = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  kerning = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -583,20 +585,20 @@ text_layer_set_kerning_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_language_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gchar *language = NULL;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -616,25 +618,25 @@ text_layer_get_language_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], language);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), language);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_language_invoker (GimpProcedure      *procedure,
-                                 Gimp               *gimp,
-                                 GimpContext        *context,
-                                 GimpProgress       *progress,
-                                 const GValueArray  *args,
-                                 GError            **error)
+                                 Gimp                  *gimp,
+                                 GimpContext           *context,
+                                 GimpProgress          *progress,
+                                 const GimpValueArray  *args,
+                                 GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   const gchar *language;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  language = g_value_get_string (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  language = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -655,20 +657,20 @@ text_layer_set_language_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_base_direction_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gint32 direction = 0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -688,25 +690,25 @@ text_layer_get_base_direction_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], direction);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), direction);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_base_direction_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 direction;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  direction = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  direction = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -727,20 +729,20 @@ text_layer_set_base_direction_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_justification_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gint32 justify = 0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -760,25 +762,25 @@ text_layer_get_justification_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_enum (&return_vals->values[1], justify);
+    g_value_set_enum (gimp_value_array_index (return_vals, 1), justify);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_justification_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gint32 justify;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  justify = g_value_get_enum (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  justify = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -799,20 +801,20 @@ text_layer_set_justification_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_color_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -830,25 +832,25 @@ text_layer_get_color_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_rgb (&return_vals->values[1], &color);
+    gimp_value_set_rgb (gimp_value_array_index (return_vals, 1), &color);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_color_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   GimpRGB color;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  gimp_value_get_rgb (&args->values[1], &color);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
 
   if (success)
     {
@@ -869,20 +871,20 @@ text_layer_set_color_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_indent_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gdouble indent = 0.0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -902,25 +904,25 @@ text_layer_get_indent_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], indent);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), indent);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_indent_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble indent;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  indent = g_value_get_double (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  indent = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -941,20 +943,20 @@ text_layer_set_indent_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_line_spacing_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gdouble line_spacing = 0.0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -974,25 +976,25 @@ text_layer_get_line_spacing_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], line_spacing);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), line_spacing);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_line_spacing_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble line_spacing;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  line_spacing = g_value_get_double (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  line_spacing = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -1013,20 +1015,20 @@ text_layer_set_line_spacing_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_letter_spacing_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gdouble letter_spacing = 0.0;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1046,25 +1048,25 @@ text_layer_get_letter_spacing_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], letter_spacing);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), letter_spacing);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_letter_spacing_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble letter_spacing;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  letter_spacing = g_value_get_double (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  letter_spacing = g_value_get_double (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -1085,22 +1087,22 @@ text_layer_set_letter_spacing_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_resize_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gdouble width;
   gdouble height;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  width = g_value_get_double (&args->values[1]);
-  height = g_value_get_double (&args->values[2]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  width = g_value_get_double (gimp_value_array_index (args, 1));
+  height = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -1133,21 +1135,21 @@ text_layer_resize_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_get_hinting_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpLayer *layer;
   gboolean hinting = FALSE;
   gboolean autohint = FALSE;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -1168,27 +1170,27 @@ text_layer_get_hinting_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_boolean (&return_vals->values[1], hinting);
-      g_value_set_boolean (&return_vals->values[2], autohint);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 1), hinting);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 2), autohint);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_layer_set_hinting_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpLayer *layer;
   gboolean hinting;
 
-  layer = gimp_value_get_layer (&args->values[0], gimp);
-  hinting = g_value_get_boolean (&args->values[1]);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 0), gimp);
+  hinting = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
diff --git a/app/pdb/text-tool-cmds.c b/app/pdb/text-tool-cmds.c
index 60605b3..3a9750b 100644
--- a/app/pdb/text-tool-cmds.c
+++ b/app/pdb/text-tool-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpdrawable.h"
@@ -39,16 +41,16 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 text_fontname_invoker (GimpProcedure      *procedure,
-                       Gimp               *gimp,
-                       GimpContext        *context,
-                       GimpProgress       *progress,
-                       const GValueArray  *args,
-                       GError            **error)
+                       Gimp                  *gimp,
+                       GimpContext           *context,
+                       GimpProgress          *progress,
+                       const GimpValueArray  *args,
+                       GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpDrawable *drawable;
   gdouble x;
@@ -60,15 +62,15 @@ text_fontname_invoker (GimpProcedure      *procedure,
   const gchar *fontname;
   GimpLayer *text_layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  text = g_value_get_string (&args->values[4]);
-  border = g_value_get_int (&args->values[5]);
-  antialias = g_value_get_boolean (&args->values[6]);
-  size = g_value_get_double (&args->values[7]);
-  fontname = g_value_get_string (&args->values[9]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  text = g_value_get_string (gimp_value_array_index (args, 4));
+  border = g_value_get_int (gimp_value_array_index (args, 5));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 6));
+  size = g_value_get_double (gimp_value_array_index (args, 7));
+  fontname = g_value_get_string (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -93,21 +95,21 @@ text_fontname_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], text_layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), text_layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_get_extents_fontname_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *text;
   gdouble size;
   const gchar *fontname;
@@ -116,9 +118,9 @@ text_get_extents_fontname_invoker (GimpProcedure      *procedure,
   gint32 ascent = 0;
   gint32 descent = 0;
 
-  text = g_value_get_string (&args->values[0]);
-  size = g_value_get_double (&args->values[1]);
-  fontname = g_value_get_string (&args->values[3]);
+  text = g_value_get_string (gimp_value_array_index (args, 0));
+  size = g_value_get_double (gimp_value_array_index (args, 1));
+  fontname = g_value_get_string (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -136,25 +138,25 @@ text_get_extents_fontname_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], ascent);
-      g_value_set_int (&return_vals->values[4], descent);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), ascent);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), descent);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_invoker (GimpProcedure      *procedure,
-              Gimp               *gimp,
-              GimpContext        *context,
-              GimpProgress       *progress,
-              const GValueArray  *args,
-              GError            **error)
+              Gimp                  *gimp,
+              GimpContext           *context,
+              GimpProgress          *progress,
+              const GimpValueArray  *args,
+              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpDrawable *drawable;
   gdouble x;
@@ -166,15 +168,15 @@ text_invoker (GimpProcedure      *procedure,
   const gchar *family;
   GimpLayer *text_layer = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  drawable = gimp_value_get_drawable (&args->values[1], gimp);
-  x = g_value_get_double (&args->values[2]);
-  y = g_value_get_double (&args->values[3]);
-  text = g_value_get_string (&args->values[4]);
-  border = g_value_get_int (&args->values[5]);
-  antialias = g_value_get_boolean (&args->values[6]);
-  size = g_value_get_double (&args->values[7]);
-  family = g_value_get_string (&args->values[10]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 1), gimp);
+  x = g_value_get_double (gimp_value_array_index (args, 2));
+  y = g_value_get_double (gimp_value_array_index (args, 3));
+  text = g_value_get_string (gimp_value_array_index (args, 4));
+  border = g_value_get_int (gimp_value_array_index (args, 5));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 6));
+  size = g_value_get_double (gimp_value_array_index (args, 7));
+  family = g_value_get_string (gimp_value_array_index (args, 10));
 
   if (success)
     {
@@ -199,21 +201,21 @@ text_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_layer (&return_vals->values[1], text_layer);
+    gimp_value_set_layer (gimp_value_array_index (return_vals, 1), text_layer);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 text_get_extents_invoker (GimpProcedure      *procedure,
-                          Gimp               *gimp,
-                          GimpContext        *context,
-                          GimpProgress       *progress,
-                          const GValueArray  *args,
-                          GError            **error)
+                          Gimp                  *gimp,
+                          GimpContext           *context,
+                          GimpProgress          *progress,
+                          const GimpValueArray  *args,
+                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *text;
   gdouble size;
   const gchar *family;
@@ -222,9 +224,9 @@ text_get_extents_invoker (GimpProcedure      *procedure,
   gint32 ascent = 0;
   gint32 descent = 0;
 
-  text = g_value_get_string (&args->values[0]);
-  size = g_value_get_double (&args->values[1]);
-  family = g_value_get_string (&args->values[4]);
+  text = g_value_get_string (gimp_value_array_index (args, 0));
+  size = g_value_get_double (gimp_value_array_index (args, 1));
+  family = g_value_get_string (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -242,10 +244,10 @@ text_get_extents_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], width);
-      g_value_set_int (&return_vals->values[2], height);
-      g_value_set_int (&return_vals->values[3], ascent);
-      g_value_set_int (&return_vals->values[4], descent);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), width);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), height);
+      g_value_set_int (gimp_value_array_index (return_vals, 3), ascent);
+      g_value_set_int (gimp_value_array_index (return_vals, 4), descent);
     }
 
   return return_vals;
diff --git a/app/pdb/transform-tools-cmds.c b/app/pdb/transform-tools-cmds.c
index e31976c..d308cc8 100644
--- a/app/pdb/transform-tools-cmds.c
+++ b/app/pdb/transform-tools-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpmath/gimpmath.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "config/gimpcoreconfig.h"
@@ -45,21 +47,21 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 flip_invoker (GimpProcedure      *procedure,
-              Gimp               *gimp,
-              GimpContext        *context,
-              GimpProgress       *progress,
-              const GValueArray  *args,
-              GError            **error)
+              Gimp                  *gimp,
+              GimpContext           *context,
+              GimpProgress          *progress,
+              const GimpValueArray  *args,
+              GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gint32 flip_type;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  flip_type = g_value_get_enum (&args->values[1]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  flip_type = g_value_get_enum (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -96,21 +98,21 @@ flip_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 perspective_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean interpolation;
   gdouble x0;
@@ -122,16 +124,16 @@ perspective_invoker (GimpProcedure      *procedure,
   gdouble x3;
   gdouble y3;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  interpolation = g_value_get_boolean (&args->values[1]);
-  x0 = g_value_get_double (&args->values[2]);
-  y0 = g_value_get_double (&args->values[3]);
-  x1 = g_value_get_double (&args->values[4]);
-  y1 = g_value_get_double (&args->values[5]);
-  x2 = g_value_get_double (&args->values[6]);
-  y2 = g_value_get_double (&args->values[7]);
-  x3 = g_value_get_double (&args->values[8]);
-  y3 = g_value_get_double (&args->values[9]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  interpolation = g_value_get_boolean (gimp_value_array_index (args, 1));
+  x0 = g_value_get_double (gimp_value_array_index (args, 2));
+  y0 = g_value_get_double (gimp_value_array_index (args, 3));
+  x1 = g_value_get_double (gimp_value_array_index (args, 4));
+  y1 = g_value_get_double (gimp_value_array_index (args, 5));
+  x2 = g_value_get_double (gimp_value_array_index (args, 6));
+  y2 = g_value_get_double (gimp_value_array_index (args, 7));
+  x3 = g_value_get_double (gimp_value_array_index (args, 8));
+  y3 = g_value_get_double (gimp_value_array_index (args, 9));
 
   if (success)
     {
@@ -193,28 +195,28 @@ perspective_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 rotate_invoker (GimpProcedure      *procedure,
-                Gimp               *gimp,
-                GimpContext        *context,
-                GimpProgress       *progress,
-                const GValueArray  *args,
-                GError            **error)
+                Gimp                  *gimp,
+                GimpContext           *context,
+                GimpProgress          *progress,
+                const GimpValueArray  *args,
+                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean interpolation;
   gdouble angle;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  interpolation = g_value_get_boolean (&args->values[1]);
-  angle = g_value_get_double (&args->values[2]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  interpolation = g_value_get_boolean (gimp_value_array_index (args, 1));
+  angle = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -275,21 +277,21 @@ rotate_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 scale_invoker (GimpProcedure      *procedure,
-               Gimp               *gimp,
-               GimpContext        *context,
-               GimpProgress       *progress,
-               const GValueArray  *args,
-               GError            **error)
+               Gimp                  *gimp,
+               GimpContext           *context,
+               GimpProgress          *progress,
+               const GimpValueArray  *args,
+               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean interpolation;
   gdouble x0;
@@ -297,12 +299,12 @@ scale_invoker (GimpProcedure      *procedure,
   gdouble x1;
   gdouble y1;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  interpolation = g_value_get_boolean (&args->values[1]);
-  x0 = g_value_get_double (&args->values[2]);
-  y0 = g_value_get_double (&args->values[3]);
-  x1 = g_value_get_double (&args->values[4]);
-  y1 = g_value_get_double (&args->values[5]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  interpolation = g_value_get_boolean (gimp_value_array_index (args, 1));
+  x0 = g_value_get_double (gimp_value_array_index (args, 2));
+  y0 = g_value_get_double (gimp_value_array_index (args, 3));
+  x1 = g_value_get_double (gimp_value_array_index (args, 4));
+  y1 = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -364,30 +366,30 @@ scale_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 shear_invoker (GimpProcedure      *procedure,
-               Gimp               *gimp,
-               GimpContext        *context,
-               GimpProgress       *progress,
-               const GValueArray  *args,
-               GError            **error)
+               Gimp                  *gimp,
+               GimpContext           *context,
+               GimpProgress          *progress,
+               const GimpValueArray  *args,
+               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean interpolation;
   gint32 shear_type;
   gdouble magnitude;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  interpolation = g_value_get_boolean (&args->values[1]);
-  shear_type = g_value_get_enum (&args->values[2]);
-  magnitude = g_value_get_double (&args->values[3]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  interpolation = g_value_get_boolean (gimp_value_array_index (args, 1));
+  shear_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  magnitude = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -448,21 +450,21 @@ shear_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 transform_2d_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpDrawable *drawable;
   gboolean interpolation;
   gdouble source_x;
@@ -473,15 +475,15 @@ transform_2d_invoker (GimpProcedure      *procedure,
   gdouble dest_x;
   gdouble dest_y;
 
-  drawable = gimp_value_get_drawable (&args->values[0], gimp);
-  interpolation = g_value_get_boolean (&args->values[1]);
-  source_x = g_value_get_double (&args->values[2]);
-  source_y = g_value_get_double (&args->values[3]);
-  scale_x = g_value_get_double (&args->values[4]);
-  scale_y = g_value_get_double (&args->values[5]);
-  angle = g_value_get_double (&args->values[6]);
-  dest_x = g_value_get_double (&args->values[7]);
-  dest_y = g_value_get_double (&args->values[8]);
+  drawable = gimp_value_get_drawable (gimp_value_array_index (args, 0), gimp);
+  interpolation = g_value_get_boolean (gimp_value_array_index (args, 1));
+  source_x = g_value_get_double (gimp_value_array_index (args, 2));
+  source_y = g_value_get_double (gimp_value_array_index (args, 3));
+  scale_x = g_value_get_double (gimp_value_array_index (args, 4));
+  scale_y = g_value_get_double (gimp_value_array_index (args, 5));
+  angle = g_value_get_double (gimp_value_array_index (args, 6));
+  dest_x = g_value_get_double (gimp_value_array_index (args, 7));
+  dest_y = g_value_get_double (gimp_value_array_index (args, 8));
 
   if (success)
     {
@@ -536,7 +538,7 @@ transform_2d_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_drawable (&return_vals->values[1], drawable);
+    gimp_value_set_drawable (gimp_value_array_index (return_vals, 1), drawable);
 
   return return_vals;
 }
diff --git a/app/pdb/undo-cmds.c b/app/pdb/undo-cmds.c
index d9838a4..52111db 100644
--- a/app/pdb/undo-cmds.c
+++ b/app/pdb/undo-cmds.c
@@ -23,6 +23,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimp.h"
@@ -38,18 +40,18 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 image_undo_group_start_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -72,18 +74,18 @@ image_undo_group_start_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_group_end_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -100,20 +102,20 @@ image_undo_group_end_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_is_enabled_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean enabled = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -124,25 +126,25 @@ image_undo_is_enabled_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], enabled);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), enabled);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_disable_invoker (GimpProcedure      *procedure,
-                            Gimp               *gimp,
-                            GimpContext        *context,
-                            GimpProgress       *progress,
-                            const GValueArray  *args,
-                            GError            **error)
+                            Gimp                  *gimp,
+                            GimpContext           *context,
+                            GimpProgress          *progress,
+                            const GimpValueArray  *args,
+                            GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean disabled = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -161,25 +163,25 @@ image_undo_disable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], disabled);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), disabled);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_enable_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean enabled = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -198,25 +200,25 @@ image_undo_enable_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], enabled);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), enabled);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_freeze_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean frozen = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -235,25 +237,25 @@ image_undo_freeze_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], frozen);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), frozen);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 image_undo_thaw_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   gboolean thawed = FALSE;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -272,7 +274,7 @@ image_undo_thaw_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], thawed);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), thawed);
 
   return return_vals;
 }
diff --git a/app/pdb/unit-cmds.c b/app/pdb/unit-cmds.c
index 251363c..1adeabd 100644
--- a/app/pdb/unit-cmds.c
+++ b/app/pdb/unit-cmds.c
@@ -25,6 +25,8 @@
 
 #include "libgimpbase/gimpbase.h"
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpparamspecs.h"
@@ -35,54 +37,54 @@
 #include "internal-procs.h"
 
 
-static GValueArray *
+static GimpValueArray *
 unit_get_number_of_units_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_units = 0;
 
   num_units = _gimp_unit_get_number_of_units (gimp);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], num_units);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_units);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_number_of_built_in_units_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   gint32 num_units = 0;
 
   num_units = _gimp_unit_get_number_of_built_in_units (gimp);
 
   return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
-  g_value_set_int (&return_vals->values[1], num_units);
+  g_value_set_int (gimp_value_array_index (return_vals, 1), num_units);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_new_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   const gchar *identifier;
   gdouble factor;
   gint32 digits;
@@ -92,13 +94,13 @@ unit_new_invoker (GimpProcedure      *procedure,
   const gchar *plural;
   GimpUnit unit_id = 0;
 
-  identifier = g_value_get_string (&args->values[0]);
-  factor = g_value_get_double (&args->values[1]);
-  digits = g_value_get_int (&args->values[2]);
-  symbol = g_value_get_string (&args->values[3]);
-  abbreviation = g_value_get_string (&args->values[4]);
-  singular = g_value_get_string (&args->values[5]);
-  plural = g_value_get_string (&args->values[6]);
+  identifier = g_value_get_string (gimp_value_array_index (args, 0));
+  factor = g_value_get_double (gimp_value_array_index (args, 1));
+  digits = g_value_get_int (gimp_value_array_index (args, 2));
+  symbol = g_value_get_string (gimp_value_array_index (args, 3));
+  abbreviation = g_value_get_string (gimp_value_array_index (args, 4));
+  singular = g_value_get_string (gimp_value_array_index (args, 5));
+  plural = g_value_get_string (gimp_value_array_index (args, 6));
 
   if (success)
     {
@@ -110,25 +112,25 @@ unit_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], unit_id);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), unit_id);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_deletion_flag_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gboolean deletion_flag = FALSE;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -139,25 +141,25 @@ unit_get_deletion_flag_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_boolean (&return_vals->values[1], deletion_flag);
+    g_value_set_boolean (gimp_value_array_index (return_vals, 1), deletion_flag);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_set_deletion_flag_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpUnit unit_id;
   gboolean deletion_flag;
 
-  unit_id = g_value_get_int (&args->values[0]);
-  deletion_flag = g_value_get_boolean (&args->values[1]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
+  deletion_flag = g_value_get_boolean (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -168,20 +170,20 @@ unit_set_deletion_flag_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_identifier_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gchar *identifier = NULL;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -192,25 +194,25 @@ unit_get_identifier_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], identifier);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), identifier);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_factor_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gdouble factor = 0.0;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -221,25 +223,25 @@ unit_get_factor_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], factor);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), factor);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_digits_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gint32 digits = 0;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -250,25 +252,25 @@ unit_get_digits_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], digits);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), digits);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_symbol_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gchar *symbol = NULL;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -279,25 +281,25 @@ unit_get_symbol_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], symbol);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), symbol);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_abbreviation_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gchar *abbreviation = NULL;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -308,25 +310,25 @@ unit_get_abbreviation_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], abbreviation);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), abbreviation);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_singular_invoker (GimpProcedure      *procedure,
-                           Gimp               *gimp,
-                           GimpContext        *context,
-                           GimpProgress       *progress,
-                           const GValueArray  *args,
-                           GError            **error)
+                           Gimp                  *gimp,
+                           GimpContext           *context,
+                           GimpProgress          *progress,
+                           const GimpValueArray  *args,
+                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gchar *singular = NULL;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -337,25 +339,25 @@ unit_get_singular_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], singular);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), singular);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 unit_get_plural_invoker (GimpProcedure      *procedure,
-                         Gimp               *gimp,
-                         GimpContext        *context,
-                         GimpProgress       *progress,
-                         const GValueArray  *args,
-                         GError            **error)
+                         Gimp                  *gimp,
+                         GimpContext           *context,
+                         GimpProgress          *progress,
+                         const GimpValueArray  *args,
+                         GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpUnit unit_id;
   gchar *plural = NULL;
 
-  unit_id = g_value_get_int (&args->values[0]);
+  unit_id = g_value_get_int (gimp_value_array_index (args, 0));
 
   if (success)
     {
@@ -366,7 +368,7 @@ unit_get_plural_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], plural);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), plural);
 
   return return_vals;
 }
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index d51d490..17f70fe 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -25,6 +25,8 @@
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "pdb-types.h"
 
 #include "core/gimpimage-undo-push.h"
@@ -49,22 +51,22 @@
 #include "gimp-intl.h"
 
 
-static GValueArray *
+static GimpValueArray *
 vectors_new_invoker (GimpProcedure      *procedure,
-                     Gimp               *gimp,
-                     GimpContext        *context,
-                     GimpProgress       *progress,
-                     const GValueArray  *args,
-                     GError            **error)
+                     Gimp                  *gimp,
+                     GimpContext           *context,
+                     GimpProgress          *progress,
+                     const GimpValueArray  *args,
+                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *name;
   GimpVectors *vectors = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  name = g_value_get_string (&args->values[1]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  name = g_value_get_string (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -75,27 +77,27 @@ vectors_new_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], vectors);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_new_from_text_layer_invoker (GimpProcedure      *procedure,
-                                     Gimp               *gimp,
-                                     GimpContext        *context,
-                                     GimpProgress       *progress,
-                                     const GValueArray  *args,
-                                     GError            **error)
+                                     Gimp                  *gimp,
+                                     GimpContext           *context,
+                                     GimpProgress          *progress,
+                                     const GimpValueArray  *args,
+                                     GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpLayer *layer;
   GimpVectors *vectors = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  layer = gimp_value_get_layer (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  layer = gimp_value_get_layer (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -119,25 +121,25 @@ vectors_new_from_text_layer_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], vectors);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_copy_invoker (GimpProcedure      *procedure,
-                      Gimp               *gimp,
-                      GimpContext        *context,
-                      GimpProgress       *progress,
-                      const GValueArray  *args,
-                      GError            **error)
+                      Gimp                  *gimp,
+                      GimpContext           *context,
+                      GimpProgress          *progress,
+                      const GimpValueArray  *args,
+                      GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   GimpVectors *vectors_copy = NULL;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -152,26 +154,26 @@ vectors_copy_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_vectors (&return_vals->values[1], vectors_copy);
+    gimp_value_set_vectors (gimp_value_array_index (return_vals, 1), vectors_copy);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_get_strokes_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 num_strokes = 0;
   gint32 *stroke_ids = NULL;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
 
   if (success)
     {
@@ -199,31 +201,31 @@ vectors_get_strokes_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_strokes);
-      gimp_value_take_int32array (&return_vals->values[2], stroke_ids, num_strokes);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_strokes);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), stroke_ids, num_strokes);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_get_length_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 stroke_id;
   gdouble precision;
   gdouble length = 0.0;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  precision = g_value_get_double (&args->values[2]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  precision = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -239,21 +241,21 @@ vectors_stroke_get_length_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_double (&return_vals->values[1], length);
+    g_value_set_double (gimp_value_array_index (return_vals, 1), length);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_get_point_at_dist_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 stroke_id;
   gdouble dist;
@@ -263,10 +265,10 @@ vectors_stroke_get_point_at_dist_invoker (GimpProcedure      *procedure,
   gdouble slope = 0.0;
   gboolean valid = FALSE;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  dist = g_value_get_double (&args->values[2]);
-  precision = g_value_get_double (&args->values[3]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  dist = g_value_get_double (gimp_value_array_index (args, 2));
+  precision = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -290,29 +292,29 @@ vectors_stroke_get_point_at_dist_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_double (&return_vals->values[1], x_point);
-      g_value_set_double (&return_vals->values[2], y_point);
-      g_value_set_double (&return_vals->values[3], slope);
-      g_value_set_boolean (&return_vals->values[4], valid);
+      g_value_set_double (gimp_value_array_index (return_vals, 1), x_point);
+      g_value_set_double (gimp_value_array_index (return_vals, 2), y_point);
+      g_value_set_double (gimp_value_array_index (return_vals, 3), slope);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 4), valid);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_remove_stroke_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
   gint32 stroke_id;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -335,20 +337,20 @@ vectors_remove_stroke_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_close_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
   gint32 stroke_id;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -371,13 +373,13 @@ vectors_stroke_close_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_translate_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -385,10 +387,10 @@ vectors_stroke_translate_invoker (GimpProcedure      *procedure,
   gint32 off_x;
   gint32 off_y;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  off_x = g_value_get_int (&args->values[2]);
-  off_y = g_value_get_int (&args->values[3]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  off_x = g_value_get_int (gimp_value_array_index (args, 2));
+  off_y = g_value_get_int (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -411,13 +413,13 @@ vectors_stroke_translate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_scale_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -425,10 +427,10 @@ vectors_stroke_scale_invoker (GimpProcedure      *procedure,
   gdouble scale_x;
   gdouble scale_y;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  scale_x = g_value_get_double (&args->values[2]);
-  scale_y = g_value_get_double (&args->values[3]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  scale_x = g_value_get_double (gimp_value_array_index (args, 2));
+  scale_y = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -451,13 +453,13 @@ vectors_stroke_scale_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_rotate_invoker (GimpProcedure      *procedure,
-                               Gimp               *gimp,
-                               GimpContext        *context,
-                               GimpProgress       *progress,
-                               const GValueArray  *args,
-                               GError            **error)
+                               Gimp                  *gimp,
+                               GimpContext           *context,
+                               GimpProgress          *progress,
+                               const GimpValueArray  *args,
+                               GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -466,11 +468,11 @@ vectors_stroke_rotate_invoker (GimpProcedure      *procedure,
   gdouble center_y;
   gdouble angle;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  center_x = g_value_get_double (&args->values[2]);
-  center_y = g_value_get_double (&args->values[3]);
-  angle = g_value_get_double (&args->values[4]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  center_x = g_value_get_double (gimp_value_array_index (args, 2));
+  center_y = g_value_get_double (gimp_value_array_index (args, 3));
+  angle = g_value_get_double (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -493,13 +495,13 @@ vectors_stroke_rotate_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_flip_invoker (GimpProcedure      *procedure,
-                             Gimp               *gimp,
-                             GimpContext        *context,
-                             GimpProgress       *progress,
-                             const GValueArray  *args,
-                             GError            **error)
+                             Gimp                  *gimp,
+                             GimpContext           *context,
+                             GimpProgress          *progress,
+                             const GimpValueArray  *args,
+                             GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -507,10 +509,10 @@ vectors_stroke_flip_invoker (GimpProcedure      *procedure,
   gint32 flip_type;
   gdouble axis;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  flip_type = g_value_get_enum (&args->values[2]);
-  axis = g_value_get_double (&args->values[3]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  flip_type = g_value_get_enum (gimp_value_array_index (args, 2));
+  axis = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -533,13 +535,13 @@ vectors_stroke_flip_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_flip_free_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -549,12 +551,12 @@ vectors_stroke_flip_free_invoker (GimpProcedure      *procedure,
   gdouble x2;
   gdouble y2;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  x1 = g_value_get_double (&args->values[2]);
-  y1 = g_value_get_double (&args->values[3]);
-  x2 = g_value_get_double (&args->values[4]);
-  y2 = g_value_get_double (&args->values[5]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  x1 = g_value_get_double (gimp_value_array_index (args, 2));
+  y1 = g_value_get_double (gimp_value_array_index (args, 3));
+  x2 = g_value_get_double (gimp_value_array_index (args, 4));
+  y2 = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -577,16 +579,16 @@ vectors_stroke_flip_free_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_get_points_invoker (GimpProcedure      *procedure,
-                                   Gimp               *gimp,
-                                   GimpContext        *context,
-                                   GimpProgress       *progress,
-                                   const GValueArray  *args,
-                                   GError            **error)
+                                   Gimp                  *gimp,
+                                   GimpContext           *context,
+                                   GimpProgress          *progress,
+                                   const GimpValueArray  *args,
+                                   GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 stroke_id;
   gint32 type = 0;
@@ -594,8 +596,8 @@ vectors_stroke_get_points_invoker (GimpProcedure      *procedure,
   gdouble *controlpoints = NULL;
   gboolean closed = FALSE;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
 
   if (success)
     {
@@ -636,25 +638,25 @@ vectors_stroke_get_points_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_enum (&return_vals->values[1], type);
-      g_value_set_int (&return_vals->values[2], num_points);
-      gimp_value_take_floatarray (&return_vals->values[3], controlpoints, num_points);
-      g_value_set_boolean (&return_vals->values[4], closed);
+      g_value_set_enum (gimp_value_array_index (return_vals, 1), type);
+      g_value_set_int (gimp_value_array_index (return_vals, 2), num_points);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 3), controlpoints, num_points);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 4), closed);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_new_from_points_invoker (GimpProcedure      *procedure,
-                                        Gimp               *gimp,
-                                        GimpContext        *context,
-                                        GimpProgress       *progress,
-                                        const GValueArray  *args,
-                                        GError            **error)
+                                        Gimp                  *gimp,
+                                        GimpContext           *context,
+                                        GimpProgress          *progress,
+                                        const GimpValueArray  *args,
+                                        GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 type;
   gint32 num_points;
@@ -662,11 +664,11 @@ vectors_stroke_new_from_points_invoker (GimpProcedure      *procedure,
   gboolean closed;
   gint32 stroke_id = 0;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  type = g_value_get_enum (&args->values[1]);
-  num_points = g_value_get_int (&args->values[2]);
-  controlpoints = gimp_value_get_floatarray (&args->values[3]);
-  closed = g_value_get_boolean (&args->values[4]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  type = g_value_get_enum (gimp_value_array_index (args, 1));
+  num_points = g_value_get_int (gimp_value_array_index (args, 2));
+  controlpoints = gimp_value_get_floatarray (gimp_value_array_index (args, 3));
+  closed = g_value_get_boolean (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -712,21 +714,21 @@ vectors_stroke_new_from_points_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], stroke_id);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), stroke_id);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_stroke_interpolate_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gint32 stroke_id;
   gdouble precision;
@@ -734,9 +736,9 @@ vectors_stroke_interpolate_invoker (GimpProcedure      *procedure,
   gdouble *coords = NULL;
   gboolean closed = FALSE;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  precision = g_value_get_double (&args->values[2]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  precision = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -774,32 +776,32 @@ vectors_stroke_interpolate_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_coords);
-      gimp_value_take_floatarray (&return_vals->values[2], coords, num_coords);
-      g_value_set_boolean (&return_vals->values[3], closed);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_coords);
+      gimp_value_take_floatarray (gimp_value_array_index (return_vals, 2), coords, num_coords);
+      g_value_set_boolean (gimp_value_array_index (return_vals, 3), closed);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_bezier_stroke_new_moveto_invoker (GimpProcedure      *procedure,
-                                          Gimp               *gimp,
-                                          GimpContext        *context,
-                                          GimpProgress       *progress,
-                                          const GValueArray  *args,
-                                          GError            **error)
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gdouble x0;
   gdouble y0;
   gint32 stroke_id = 0;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
 
   if (success)
     {
@@ -832,18 +834,18 @@ vectors_bezier_stroke_new_moveto_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], stroke_id);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), stroke_id);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_bezier_stroke_lineto_invoker (GimpProcedure      *procedure,
-                                      Gimp               *gimp,
-                                      GimpContext        *context,
-                                      GimpProgress       *progress,
-                                      const GValueArray  *args,
-                                      GError            **error)
+                                      Gimp                  *gimp,
+                                      GimpContext           *context,
+                                      GimpProgress          *progress,
+                                      const GimpValueArray  *args,
+                                      GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -851,10 +853,10 @@ vectors_bezier_stroke_lineto_invoker (GimpProcedure      *procedure,
   gdouble x0;
   gdouble y0;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  x0 = g_value_get_double (&args->values[2]);
-  y0 = g_value_get_double (&args->values[3]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  x0 = g_value_get_double (gimp_value_array_index (args, 2));
+  y0 = g_value_get_double (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -882,13 +884,13 @@ vectors_bezier_stroke_lineto_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_bezier_stroke_conicto_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -898,12 +900,12 @@ vectors_bezier_stroke_conicto_invoker (GimpProcedure      *procedure,
   gdouble x1;
   gdouble y1;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  x0 = g_value_get_double (&args->values[2]);
-  y0 = g_value_get_double (&args->values[3]);
-  x1 = g_value_get_double (&args->values[4]);
-  y1 = g_value_get_double (&args->values[5]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  x0 = g_value_get_double (gimp_value_array_index (args, 2));
+  y0 = g_value_get_double (gimp_value_array_index (args, 3));
+  x1 = g_value_get_double (gimp_value_array_index (args, 4));
+  y1 = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -935,13 +937,13 @@ vectors_bezier_stroke_conicto_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_bezier_stroke_cubicto_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error)
+                                       Gimp                  *gimp,
+                                       GimpContext           *context,
+                                       GimpProgress          *progress,
+                                       const GimpValueArray  *args,
+                                       GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -953,14 +955,14 @@ vectors_bezier_stroke_cubicto_invoker (GimpProcedure      *procedure,
   gdouble x2;
   gdouble y2;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  stroke_id = g_value_get_int (&args->values[1]);
-  x0 = g_value_get_double (&args->values[2]);
-  y0 = g_value_get_double (&args->values[3]);
-  x1 = g_value_get_double (&args->values[4]);
-  y1 = g_value_get_double (&args->values[5]);
-  x2 = g_value_get_double (&args->values[6]);
-  y2 = g_value_get_double (&args->values[7]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  stroke_id = g_value_get_int (gimp_value_array_index (args, 1));
+  x0 = g_value_get_double (gimp_value_array_index (args, 2));
+  y0 = g_value_get_double (gimp_value_array_index (args, 3));
+  x1 = g_value_get_double (gimp_value_array_index (args, 4));
+  y1 = g_value_get_double (gimp_value_array_index (args, 5));
+  x2 = g_value_get_double (gimp_value_array_index (args, 6));
+  y2 = g_value_get_double (gimp_value_array_index (args, 7));
 
   if (success)
     {
@@ -996,16 +998,16 @@ vectors_bezier_stroke_cubicto_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_bezier_stroke_new_ellipse_invoker (GimpProcedure      *procedure,
-                                           Gimp               *gimp,
-                                           GimpContext        *context,
-                                           GimpProgress       *progress,
-                                           const GValueArray  *args,
-                                           GError            **error)
+                                           Gimp                  *gimp,
+                                           GimpContext           *context,
+                                           GimpProgress          *progress,
+                                           const GimpValueArray  *args,
+                                           GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpVectors *vectors;
   gdouble x0;
   gdouble y0;
@@ -1014,12 +1016,12 @@ vectors_bezier_stroke_new_ellipse_invoker (GimpProcedure      *procedure,
   gdouble angle;
   gint32 stroke_id = 0;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  x0 = g_value_get_double (&args->values[1]);
-  y0 = g_value_get_double (&args->values[2]);
-  radius_x = g_value_get_double (&args->values[3]);
-  radius_y = g_value_get_double (&args->values[4]);
-  angle = g_value_get_double (&args->values[5]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  x0 = g_value_get_double (gimp_value_array_index (args, 1));
+  y0 = g_value_get_double (gimp_value_array_index (args, 2));
+  radius_x = g_value_get_double (gimp_value_array_index (args, 3));
+  radius_y = g_value_get_double (gimp_value_array_index (args, 4));
+  angle = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -1052,18 +1054,18 @@ vectors_bezier_stroke_new_ellipse_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_set_int (&return_vals->values[1], stroke_id);
+    g_value_set_int (gimp_value_array_index (return_vals, 1), stroke_id);
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_to_selection_invoker (GimpProcedure      *procedure,
-                              Gimp               *gimp,
-                              GimpContext        *context,
-                              GimpProgress       *progress,
-                              const GValueArray  *args,
-                              GError            **error)
+                              Gimp                  *gimp,
+                              GimpContext           *context,
+                              GimpProgress          *progress,
+                              const GimpValueArray  *args,
+                              GError               **error)
 {
   gboolean success = TRUE;
   GimpVectors *vectors;
@@ -1073,12 +1075,12 @@ vectors_to_selection_invoker (GimpProcedure      *procedure,
   gdouble feather_radius_x;
   gdouble feather_radius_y;
 
-  vectors = gimp_value_get_vectors (&args->values[0], gimp);
-  operation = g_value_get_enum (&args->values[1]);
-  antialias = g_value_get_boolean (&args->values[2]);
-  feather = g_value_get_boolean (&args->values[3]);
-  feather_radius_x = g_value_get_double (&args->values[4]);
-  feather_radius_y = g_value_get_double (&args->values[5]);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 0), gimp);
+  operation = g_value_get_enum (gimp_value_array_index (args, 1));
+  antialias = g_value_get_boolean (gimp_value_array_index (args, 2));
+  feather = g_value_get_boolean (gimp_value_array_index (args, 3));
+  feather_radius_x = g_value_get_double (gimp_value_array_index (args, 4));
+  feather_radius_y = g_value_get_double (gimp_value_array_index (args, 5));
 
   if (success)
     {
@@ -1097,16 +1099,16 @@ vectors_to_selection_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_import_from_file_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *filename;
   gboolean merge;
@@ -1114,10 +1116,10 @@ vectors_import_from_file_invoker (GimpProcedure      *procedure,
   gint32 num_vectors = 0;
   gint32 *vectors_ids = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  filename = g_value_get_string (&args->values[1]);
-  merge = g_value_get_boolean (&args->values[2]);
-  scale = g_value_get_boolean (&args->values[3]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
+  merge = g_value_get_boolean (gimp_value_array_index (args, 2));
+  scale = g_value_get_boolean (gimp_value_array_index (args, 3));
 
   if (success)
     {
@@ -1152,23 +1154,23 @@ vectors_import_from_file_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_vectors);
-      gimp_value_take_int32array (&return_vals->values[2], vectors_ids, num_vectors);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), vectors_ids, num_vectors);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_import_from_string_invoker (GimpProcedure      *procedure,
-                                    Gimp               *gimp,
-                                    GimpContext        *context,
-                                    GimpProgress       *progress,
-                                    const GValueArray  *args,
-                                    GError            **error)
+                                    Gimp                  *gimp,
+                                    GimpContext           *context,
+                                    GimpProgress          *progress,
+                                    const GimpValueArray  *args,
+                                    GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   const gchar *string;
   gint32 length;
@@ -1177,11 +1179,11 @@ vectors_import_from_string_invoker (GimpProcedure      *procedure,
   gint32 num_vectors = 0;
   gint32 *vectors_ids = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  string = g_value_get_string (&args->values[1]);
-  length = g_value_get_int (&args->values[2]);
-  merge = g_value_get_boolean (&args->values[3]);
-  scale = g_value_get_boolean (&args->values[4]);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  string = g_value_get_string (gimp_value_array_index (args, 1));
+  length = g_value_get_int (gimp_value_array_index (args, 2));
+  merge = g_value_get_boolean (gimp_value_array_index (args, 3));
+  scale = g_value_get_boolean (gimp_value_array_index (args, 4));
 
   if (success)
     {
@@ -1216,29 +1218,29 @@ vectors_import_from_string_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      g_value_set_int (&return_vals->values[1], num_vectors);
-      gimp_value_take_int32array (&return_vals->values[2], vectors_ids, num_vectors);
+      g_value_set_int (gimp_value_array_index (return_vals, 1), num_vectors);
+      gimp_value_take_int32array (gimp_value_array_index (return_vals, 2), vectors_ids, num_vectors);
     }
 
   return return_vals;
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_export_to_file_invoker (GimpProcedure      *procedure,
-                                Gimp               *gimp,
-                                GimpContext        *context,
-                                GimpProgress       *progress,
-                                const GValueArray  *args,
-                                GError            **error)
+                                Gimp                  *gimp,
+                                GimpContext           *context,
+                                GimpProgress          *progress,
+                                const GimpValueArray  *args,
+                                GError               **error)
 {
   gboolean success = TRUE;
   GimpImage *image;
   const gchar *filename;
   GimpVectors *vectors;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  filename = g_value_get_string (&args->values[1]);
-  vectors = gimp_value_get_vectors (&args->values[2], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 2), gimp);
 
   if (success)
     {
@@ -1249,22 +1251,22 @@ vectors_export_to_file_invoker (GimpProcedure      *procedure,
                                            error ? *error : NULL);
 }
 
-static GValueArray *
+static GimpValueArray *
 vectors_export_to_string_invoker (GimpProcedure      *procedure,
-                                  Gimp               *gimp,
-                                  GimpContext        *context,
-                                  GimpProgress       *progress,
-                                  const GValueArray  *args,
-                                  GError            **error)
+                                  Gimp                  *gimp,
+                                  GimpContext           *context,
+                                  GimpProgress          *progress,
+                                  const GimpValueArray  *args,
+                                  GError               **error)
 {
   gboolean success = TRUE;
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
   GimpImage *image;
   GimpVectors *vectors;
   gchar *string = NULL;
 
-  image = gimp_value_get_image (&args->values[0], gimp);
-  vectors = gimp_value_get_vectors (&args->values[1], gimp);
+  image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
+  vectors = gimp_value_get_vectors (gimp_value_array_index (args, 1), gimp);
 
   if (success)
     {
@@ -1277,7 +1279,7 @@ vectors_export_to_string_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    g_value_take_string (&return_vals->values[1], string);
+    g_value_take_string (gimp_value_array_index (return_vals, 1), string);
 
   return return_vals;
 }
diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c
index 09a2a49..9c32b90 100644
--- a/app/plug-in/gimpplugin-message.c
+++ b/app/plug-in/gimpplugin-message.c
@@ -511,8 +511,8 @@ gimp_plug_in_handle_proc_run (GimpPlugIn *plug_in,
   gchar               *canonical;
   const gchar         *proc_name   = NULL;
   GimpProcedure       *procedure;
-  GValueArray         *args        = NULL;
-  GValueArray         *return_vals = NULL;
+  GimpValueArray      *args        = NULL;
+  GimpValueArray      *return_vals = NULL;
   GError              *error       = NULL;
 
   g_return_if_fail (proc_run != NULL);
@@ -596,7 +596,7 @@ gimp_plug_in_handle_proc_run (GimpPlugIn *plug_in,
                                                          args);
   gimp_plug_in_manager_plug_in_pop (plug_in->manager);
 
-  g_value_array_free (args);
+  gimp_value_array_unref (args);
 
   if (error)
     {
@@ -619,7 +619,7 @@ gimp_plug_in_handle_proc_run (GimpPlugIn *plug_in,
        *  and canonical may be different too.
        */
       proc_return.name    = proc_run->name;
-      proc_return.nparams = return_vals->n_values;
+      proc_return.nparams = gimp_value_array_length (return_vals);
       proc_return.params  = plug_in_args_to_params (return_vals, FALSE);
 
       if (! gp_proc_return_write (plug_in->my_write, &proc_return, plug_in))
@@ -632,7 +632,7 @@ gimp_plug_in_handle_proc_run (GimpPlugIn *plug_in,
       g_free (proc_return.params);
     }
 
-  g_value_array_free (return_vals);
+  gimp_value_array_unref (return_vals);
 }
 
 static void
diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c
index 9c06937..ea08d1d 100644
--- a/app/plug-in/gimpplugin-progress.c
+++ b/app/plug-in/gimpplugin-progress.c
@@ -321,11 +321,11 @@ gimp_plug_in_progress_cancel (GimpPlugIn  *plug_in,
 
 /*  private functions  */
 
-static GValueArray *
+static GimpValueArray *
 get_cancel_return_values (GimpProcedure *procedure)
 {
-  GValueArray *return_vals;
-  GError      *error;
+  GimpValueArray *return_vals;
+  GError         *error;
 
   error = g_error_new_literal (GIMP_PDB_ERROR, GIMP_PDB_ERROR_CANCELLED,
                                _("Cancelled"));
diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c
index 75c715c..4049697 100644
--- a/app/plug-in/gimppluginmanager-call.c
+++ b/app/plug-in/gimppluginmanager-call.c
@@ -132,17 +132,17 @@ gimp_plug_in_manager_call_init (GimpPlugInManager *manager,
     }
 }
 
-GValueArray *
+GimpValueArray *
 gimp_plug_in_manager_call_run (GimpPlugInManager   *manager,
                                GimpContext         *context,
                                GimpProgress        *progress,
                                GimpPlugInProcedure *procedure,
-                               GValueArray         *args,
+                               GimpValueArray      *args,
                                gboolean             synchronous,
                                GimpObject          *display)
 {
-  GValueArray *return_vals = NULL;
-  GimpPlugIn  *plug_in;
+  GimpValueArray *return_vals = NULL;
+  GimpPlugIn     *plug_in;
 
   g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
   g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
@@ -208,7 +208,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager   *manager,
       config.timestamp        = gimp_get_user_time (manager->gimp);
 
       proc_run.name    = GIMP_PROCEDURE (procedure)->original_name;
-      proc_run.nparams = args->n_values;
+      proc_run.nparams = gimp_value_array_length (args);
       proc_run.params  = plug_in_args_to_params (args, FALSE);
 
       if (! gp_config_write (plug_in->my_write, &config, plug_in)     ||
@@ -280,15 +280,15 @@ gimp_plug_in_manager_call_run (GimpPlugInManager   *manager,
   return return_vals;
 }
 
-GValueArray *
+GimpValueArray *
 gimp_plug_in_manager_call_run_temp (GimpPlugInManager      *manager,
                                     GimpContext            *context,
                                     GimpProgress           *progress,
                                     GimpTemporaryProcedure *procedure,
-                                    GValueArray            *args)
+                                    GimpValueArray         *args)
 {
-  GValueArray *return_vals = NULL;
-  GimpPlugIn  *plug_in;
+  GimpValueArray *return_vals = NULL;
+  GimpPlugIn     *plug_in;
 
   g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
   g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
@@ -307,7 +307,7 @@ gimp_plug_in_manager_call_run_temp (GimpPlugInManager      *manager,
                                                  procedure);
 
       proc_run.name    = GIMP_PROCEDURE (procedure)->original_name;
-      proc_run.nparams = args->n_values;
+      proc_run.nparams = gimp_value_array_length (args);
       proc_run.params  = plug_in_args_to_params (args, FALSE);
 
       if (! gp_temp_proc_run_write (plug_in->my_write, &proc_run, plug_in) ||
diff --git a/app/plug-in/gimppluginmanager-call.h b/app/plug-in/gimppluginmanager-call.h
index 240ce68..0095c9d 100644
--- a/app/plug-in/gimppluginmanager-call.h
+++ b/app/plug-in/gimppluginmanager-call.h
@@ -27,33 +27,33 @@
 
 /*  Call the plug-in's query() function
  */
-void          gimp_plug_in_manager_call_query    (GimpPlugInManager      *manager,
-                                                  GimpContext            *context,
-                                                  GimpPlugInDef          *plug_in_def);
+void             gimp_plug_in_manager_call_query    (GimpPlugInManager      *manager,
+                                                     GimpContext            *context,
+                                                     GimpPlugInDef          *plug_in_def);
 
 /*  Call the plug-in's init() function
  */
-void          gimp_plug_in_manager_call_init     (GimpPlugInManager      *manager,
-                                                  GimpContext            *context,
-                                                  GimpPlugInDef          *plug_in_def);
+void             gimp_plug_in_manager_call_init     (GimpPlugInManager      *manager,
+                                                     GimpContext            *context,
+                                                     GimpPlugInDef          *plug_in_def);
 
 /*  Run a plug-in as if it were a procedure database procedure
  */
-GValueArray * gimp_plug_in_manager_call_run      (GimpPlugInManager      *manager,
-                                                  GimpContext            *context,
-                                                  GimpProgress           *progress,
-                                                  GimpPlugInProcedure    *procedure,
-                                                  GValueArray            *args,
-                                                  gboolean                synchronous,
-                                                  GimpObject             *display);
+GimpValueArray * gimp_plug_in_manager_call_run      (GimpPlugInManager      *manager,
+                                                     GimpContext            *context,
+                                                     GimpProgress           *progress,
+                                                     GimpPlugInProcedure    *procedure,
+                                                     GimpValueArray         *args,
+                                                     gboolean                synchronous,
+                                                     GimpObject             *display);
 
 /*  Run a temp plug-in proc as if it were a procedure database procedure
  */
-GValueArray * gimp_plug_in_manager_call_run_temp (GimpPlugInManager      *manager,
-                                                  GimpContext            *context,
-                                                  GimpProgress           *progress,
-                                                  GimpTemporaryProcedure *procedure,
-                                                  GValueArray            *args);
+GimpValueArray * gimp_plug_in_manager_call_run_temp (GimpPlugInManager      *manager,
+                                                     GimpContext            *context,
+                                                     GimpProgress           *progress,
+                                                     GimpTemporaryProcedure *procedure,
+                                                     GimpValueArray         *args);
 
 
 #endif /* __GIMP_PLUG_IN_MANAGER_CALL_H__ */
diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c
index 43bca1c..96e05a4 100644
--- a/app/plug-in/gimppluginmanager-restore.c
+++ b/app/plug-in/gimppluginmanager-restore.c
@@ -444,7 +444,7 @@ gimp_plug_in_manager_run_extensions (GimpPlugInManager  *manager,
       for (list = extensions, nth = 0; list; list = g_list_next (list), nth++)
         {
           GimpPlugInProcedure *proc = list->data;
-          GValueArray         *args;
+          GimpValueArray      *args;
           GError              *error = NULL;
 
           if (gimp->be_verbose)
@@ -453,13 +453,13 @@ gimp_plug_in_manager_run_extensions (GimpPlugInManager  *manager,
           status_callback (NULL, gimp_object_get_name (proc),
                            (gdouble) nth / (gdouble) n_extensions);
 
-          args = g_value_array_new (0);
+          args = gimp_value_array_new (0);
 
           gimp_procedure_execute_async (GIMP_PROCEDURE (proc),
                                         gimp, context, NULL,
                                         args, NULL, &error);
 
-          g_value_array_free (args);
+          gimp_value_array_unref (args);
 
           if (error)
             {
@@ -681,8 +681,8 @@ gimp_plug_in_manager_add_to_db (GimpPlugInManager   *manager,
 
   if (proc->file_proc)
     {
-      GValueArray *return_vals;
-      GError      *error = NULL;
+      GimpValueArray *return_vals;
+      GError         *error = NULL;
 
       if (proc->image_types)
         {
@@ -708,7 +708,7 @@ gimp_plug_in_manager_add_to_db (GimpPlugInManager   *manager,
                                                 G_TYPE_NONE);
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       if (error)
         {
diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c
index 01f6707..5630a38 100644
--- a/app/plug-in/gimppluginprocedure.c
+++ b/app/plug-in/gimppluginprocedure.c
@@ -53,25 +53,25 @@ enum
 };
 
 
-static void          gimp_plug_in_procedure_finalize    (GObject        *object);
+static void             gimp_plug_in_procedure_finalize    (GObject        *object);
 
-static gint64        gimp_plug_in_procedure_get_memsize (GimpObject     *object,
-                                                         gint64         *gui_size);
+static gint64           gimp_plug_in_procedure_get_memsize (GimpObject     *object,
+                                                            gint64         *gui_size);
 
-static GValueArray * gimp_plug_in_procedure_execute     (GimpProcedure  *procedure,
-                                                         Gimp           *gimp,
-                                                         GimpContext    *context,
-                                                         GimpProgress   *progress,
-                                                         GValueArray    *args,
-                                                         GError        **error);
-static void       gimp_plug_in_procedure_execute_async  (GimpProcedure  *procedure,
-                                                         Gimp           *gimp,
-                                                         GimpContext    *context,
-                                                         GimpProgress   *progress,
-                                                         GValueArray    *args,
-                                                         GimpObject     *display);
+static GimpValueArray * gimp_plug_in_procedure_execute     (GimpProcedure  *procedure,
+                                                            Gimp           *gimp,
+                                                            GimpContext    *context,
+                                                            GimpProgress   *progress,
+                                                            GimpValueArray *args,
+                                                            GError        **error);
+static void          gimp_plug_in_procedure_execute_async  (GimpProcedure  *procedure,
+                                                            Gimp           *gimp,
+                                                            GimpContext    *context,
+                                                            GimpProgress   *progress,
+                                                            GimpValueArray *args,
+                                                            GimpObject     *display);
 
-const gchar  * gimp_plug_in_procedure_real_get_progname (const GimpPlugInProcedure *procedure);
+const gchar     * gimp_plug_in_procedure_real_get_progname (const GimpPlugInProcedure *procedure);
 
 
 G_DEFINE_TYPE (GimpPlugInProcedure, gimp_plug_in_procedure,
@@ -194,12 +194,12 @@ gimp_plug_in_procedure_get_memsize (GimpObject *object,
                                                                   gui_size);
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_plug_in_procedure_execute (GimpProcedure  *procedure,
                                 Gimp           *gimp,
                                 GimpContext    *context,
                                 GimpProgress   *progress,
-                                GValueArray    *args,
+                                GimpValueArray *args,
                                 GError        **error)
 {
   if (procedure->proc_type == GIMP_INTERNAL)
@@ -214,15 +214,15 @@ gimp_plug_in_procedure_execute (GimpProcedure  *procedure,
 }
 
 static void
-gimp_plug_in_procedure_execute_async (GimpProcedure *procedure,
-                                      Gimp          *gimp,
-                                      GimpContext   *context,
-                                      GimpProgress  *progress,
-                                      GValueArray   *args,
-                                      GimpObject    *display)
+gimp_plug_in_procedure_execute_async (GimpProcedure  *procedure,
+                                      Gimp           *gimp,
+                                      GimpContext    *context,
+                                      GimpProgress   *progress,
+                                      GimpValueArray *args,
+                                      GimpObject     *display)
 {
   GimpPlugInProcedure *plug_in_procedure = GIMP_PLUG_IN_PROCEDURE (procedure);
-  GValueArray         *return_vals;
+  GimpValueArray      *return_vals;
 
   return_vals = gimp_plug_in_manager_call_run (gimp->plug_in_manager,
                                                context, progress,
@@ -234,7 +234,7 @@ gimp_plug_in_procedure_execute_async (GimpProcedure *procedure,
       gimp_plug_in_procedure_handle_return_values (plug_in_procedure,
                                                    gimp, progress,
                                                    return_vals);
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
     }
 }
 
@@ -962,43 +962,44 @@ void
 gimp_plug_in_procedure_handle_return_values (GimpPlugInProcedure *proc,
                                              Gimp                *gimp,
                                              GimpProgress        *progress,
-                                             GValueArray         *return_vals)
+                                             GimpValueArray      *return_vals)
 {
   g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
   g_return_if_fail (return_vals != NULL);
 
-  if (! return_vals->n_values > 0 ||
-      G_VALUE_TYPE (&return_vals->values[0]) != GIMP_TYPE_PDB_STATUS_TYPE)
+  if (! gimp_value_array_length (return_vals) > 0 ||
+      G_VALUE_TYPE (gimp_value_array_index (return_vals, 0)) !=
+      GIMP_TYPE_PDB_STATUS_TYPE)
     {
       return;
     }
 
-  switch (g_value_get_enum (&return_vals->values[0]))
+  switch (g_value_get_enum (gimp_value_array_index (return_vals, 0)))
     {
     case GIMP_PDB_SUCCESS:
       break;
 
     case GIMP_PDB_CALLING_ERROR:
-      if (return_vals->n_values > 1 &&
-          G_VALUE_HOLDS_STRING (&return_vals->values[1]))
+      if (gimp_value_array_length (return_vals) > 1 &&
+          G_VALUE_HOLDS_STRING (gimp_value_array_index (return_vals, 1)))
         {
           gimp_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_ERROR,
                         _("Calling error for '%s':\n"
                           "%s"),
                         gimp_plug_in_procedure_get_label (proc),
-                        g_value_get_string (&return_vals->values[1]));
+                        g_value_get_string (gimp_value_array_index (return_vals, 1)));
         }
       break;
 
     case GIMP_PDB_EXECUTION_ERROR:
-      if (return_vals->n_values > 1 &&
-          G_VALUE_HOLDS_STRING (&return_vals->values[1]))
+      if (gimp_value_array_length (return_vals) > 1 &&
+          G_VALUE_HOLDS_STRING (gimp_value_array_index (return_vals, 1)))
         {
           gimp_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_ERROR,
                         _("Execution error for '%s':\n"
                           "%s"),
                         gimp_plug_in_procedure_get_label (proc),
-                        g_value_get_string (&return_vals->values[1]));
+                        g_value_get_string (gimp_value_array_index (return_vals, 1)));
         }
       break;
     }
diff --git a/app/plug-in/gimppluginprocedure.h b/app/plug-in/gimppluginprocedure.h
index 195a98f..57dba9f 100644
--- a/app/plug-in/gimppluginprocedure.h
+++ b/app/plug-in/gimppluginprocedure.h
@@ -133,7 +133,7 @@ void     gimp_plug_in_procedure_handle_return_values (GimpPlugInProcedure
                                                       Gimp                      *gimp,
                                                       GimpProgress              *progress,
 
-                                                      GValueArray               *return_vals);
+                                                      GimpValueArray            *return_vals);
 
 
 #endif /* __GIMP_PLUG_IN_PROCEDURE_H__ */
diff --git a/app/plug-in/gimppluginprocframe.c b/app/plug-in/gimppluginprocframe.c
index bec0dd2..c7f8332 100644
--- a/app/plug-in/gimppluginprocframe.c
+++ b/app/plug-in/gimppluginprocframe.c
@@ -23,6 +23,8 @@
 
 #include <gegl.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "plug-in-types.h"
 
 #include "core/gimpprogress.h"
@@ -119,7 +121,7 @@ gimp_plug_in_proc_frame_dispose (GimpPlugInProcFrame *proc_frame,
 
   if (proc_frame->return_vals)
     {
-      g_value_array_free (proc_frame->return_vals);
+      gimp_value_array_unref (proc_frame->return_vals);
       proc_frame->return_vals = NULL;
     }
 
@@ -165,16 +167,16 @@ gimp_plug_in_proc_frame_unref (GimpPlugInProcFrame *proc_frame,
     }
 }
 
-GValueArray *
+GimpValueArray *
 gimp_plug_in_proc_frame_get_return_values (GimpPlugInProcFrame *proc_frame)
 {
-  GValueArray *return_vals;
+  GimpValueArray *return_vals;
 
   g_return_val_if_fail (proc_frame != NULL, NULL);
 
   if (proc_frame->return_vals)
     {
-      if (proc_frame->return_vals->n_values >=
+      if (gimp_value_array_length (proc_frame->return_vals) >=
           proc_frame->procedure->num_values + 1)
         {
           return_vals = proc_frame->return_vals;
@@ -186,14 +188,16 @@ gimp_plug_in_proc_frame_get_return_values (GimpPlugInProcFrame *proc_frame)
                                                           TRUE, NULL);
 
           /* Copy all of the arguments we can. */
-          memcpy (return_vals->values, proc_frame->return_vals->values,
-                  sizeof (GValue) * proc_frame->return_vals->n_values);
+          memcpy (gimp_value_array_index (return_vals, 0),
+                  gimp_value_array_index (proc_frame->return_vals, 0),
+                  sizeof (GValue) *
+                  gimp_value_array_length (proc_frame->return_vals));
 
           /* Free the old arguments. */
-          g_free (proc_frame->return_vals->values);
-          proc_frame->return_vals->values = NULL;
-          proc_frame->return_vals->n_values = 0;
-          g_value_array_free (proc_frame->return_vals);
+          memset (gimp_value_array_index (proc_frame->return_vals, 0), 0,
+                  sizeof (GValue) *
+                  gimp_value_array_length (proc_frame->return_vals));
+          gimp_value_array_unref (proc_frame->return_vals);
         }
 
       /* We have consumed any saved values, so clear them. */
diff --git a/app/plug-in/gimppluginprocframe.h b/app/plug-in/gimppluginprocframe.h
index e345cd2..e7709be 100644
--- a/app/plug-in/gimppluginprocframe.h
+++ b/app/plug-in/gimppluginprocframe.h
@@ -31,7 +31,7 @@ struct _GimpPlugInProcFrame
   GimpProcedure       *procedure;
   GMainLoop           *main_loop;
 
-  GValueArray         *return_vals;
+  GimpValueArray      *return_vals;
 
   GimpProgress        *progress;
   gboolean             progress_created;
@@ -60,7 +60,7 @@ GimpPlugInProcFrame * gimp_plug_in_proc_frame_ref     (GimpPlugInProcFrame *proc
 void                  gimp_plug_in_proc_frame_unref   (GimpPlugInProcFrame *proc_frame,
                                                        GimpPlugIn          *plug_in);
 
-GValueArray         * gimp_plug_in_proc_frame_get_return_values
+GimpValueArray      * gimp_plug_in_proc_frame_get_return_values
                                                       (GimpPlugInProcFrame *proc_frame);
 
 
diff --git a/app/plug-in/gimptemporaryprocedure.c b/app/plug-in/gimptemporaryprocedure.c
index dc2961e..aa0d363 100644
--- a/app/plug-in/gimptemporaryprocedure.c
+++ b/app/plug-in/gimptemporaryprocedure.c
@@ -19,7 +19,9 @@
 
 #include "config.h"
 
-#include <glib-object.h>
+#include <gegl.h>
+
+#include "libgimpbase/gimpbase.h"
 
 #include "plug-in-types.h"
 
@@ -33,22 +35,22 @@
 #include "gimp-intl.h"
 
 
-static void          gimp_temporary_procedure_finalize (GObject        *object);
+static void             gimp_temporary_procedure_finalize (GObject        *object);
 
-static GValueArray * gimp_temporary_procedure_execute  (GimpProcedure  *procedure,
-                                                        Gimp           *gimp,
-                                                        GimpContext    *context,
-                                                        GimpProgress   *progress,
-                                                        GValueArray    *args,
-                                                        GError        **error);
-static void     gimp_temporary_procedure_execute_async (GimpProcedure  *procedure,
-                                                        Gimp           *gimp,
-                                                        GimpContext    *context,
-                                                        GimpProgress   *progress,
-                                                        GValueArray    *args,
-                                                        GimpObject     *display);
+static GimpValueArray * gimp_temporary_procedure_execute  (GimpProcedure  *procedure,
+                                                           Gimp           *gimp,
+                                                           GimpContext    *context,
+                                                           GimpProgress   *progress,
+                                                           GimpValueArray *args,
+                                                           GError        **error);
+static void        gimp_temporary_procedure_execute_async (GimpProcedure  *procedure,
+                                                           Gimp           *gimp,
+                                                           GimpContext    *context,
+                                                           GimpProgress   *progress,
+                                                           GimpValueArray *args,
+                                                           GimpObject     *display);
 
-const gchar    * gimp_temporary_procedure_get_progname (const GimpPlugInProcedure *procedure);
+const gchar       * gimp_temporary_procedure_get_progname (const GimpPlugInProcedure *procedure);
 
 
 G_DEFINE_TYPE (GimpTemporaryProcedure, gimp_temporary_procedure,
@@ -86,13 +88,13 @@ gimp_temporary_procedure_finalize (GObject *object)
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
-static GValueArray *
-gimp_temporary_procedure_execute (GimpProcedure  *procedure,
-                                  Gimp           *gimp,
-                                  GimpContext    *context,
-                                  GimpProgress   *progress,
-                                  GValueArray    *args,
-                                  GError        **error)
+static GimpValueArray *
+gimp_temporary_procedure_execute (GimpProcedure   *procedure,
+                                  Gimp            *gimp,
+                                  GimpContext     *context,
+                                  GimpProgress    *progress,
+                                  GimpValueArray  *args,
+                                  GError         **error)
 {
   return gimp_plug_in_manager_call_run_temp (gimp->plug_in_manager,
                                              context, progress,
@@ -101,15 +103,15 @@ gimp_temporary_procedure_execute (GimpProcedure  *procedure,
 }
 
 static void
-gimp_temporary_procedure_execute_async (GimpProcedure *procedure,
-                                        Gimp          *gimp,
-                                        GimpContext   *context,
-                                        GimpProgress  *progress,
-                                        GValueArray   *args,
-                                        GimpObject    *display)
+gimp_temporary_procedure_execute_async (GimpProcedure  *procedure,
+                                        Gimp           *gimp,
+                                        GimpContext    *context,
+                                        GimpProgress   *progress,
+                                        GimpValueArray *args,
+                                        GimpObject     *display)
 {
   GimpTemporaryProcedure *temp_procedure = GIMP_TEMPORARY_PROCEDURE (procedure);
-  GValueArray            *return_vals;
+  GimpValueArray         *return_vals;
 
   return_vals = gimp_plug_in_manager_call_run_temp (gimp->plug_in_manager,
                                                     context, progress,
@@ -123,7 +125,7 @@ gimp_temporary_procedure_execute_async (GimpProcedure *procedure,
       gimp_plug_in_procedure_handle_return_values (proc,
                                                    gimp, progress,
                                                    return_vals);
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
     }
 }
 
diff --git a/app/plug-in/plug-in-icc-profile.c b/app/plug-in/plug-in-icc-profile.c
index 268b5b8..77e498d 100644
--- a/app/plug-in/plug-in-icc-profile.c
+++ b/app/plug-in/plug-in-icc-profile.c
@@ -22,6 +22,8 @@
 
 #include <gegl.h>
 
+#include "libgimpbase/gimpbase.h"
+
 #include "core/core-types.h"
 
 #include "core/gimp.h"
@@ -45,10 +47,10 @@
 
 
 static void
-plug_in_icc_profile_info_return (GValueArray  *return_vals,
-                                 gchar       **name,
-                                 gchar       **desc,
-                                 gchar       **info);
+plug_in_icc_profile_info_return (GimpValueArray  *return_vals,
+                                 gchar          **name,
+                                 gchar          **desc,
+                                 gchar          **info);
 
 
 gboolean
@@ -78,7 +80,7 @@ plug_in_icc_profile_apply_rgb (GimpImage     *image,
       GIMP_IS_PARAM_SPEC_INT32 (procedure->args[0]) &&
       GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]))
     {
-      GValueArray            *return_vals;
+      GimpValueArray         *return_vals;
       GimpPDBStatusType       status;
       GimpColorProfilePolicy  policy = GIMP_COLOR_PROFILE_POLICY_ASK;
       gboolean                success;
@@ -91,7 +93,7 @@ plug_in_icc_profile_apply_rgb (GimpImage     *image,
                                             gimp_image_get_ID (image),
                                             G_TYPE_NONE);
 
-      status = g_value_get_enum (return_vals->values);
+      status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
       switch (status)
         {
@@ -114,9 +116,9 @@ plug_in_icc_profile_apply_rgb (GimpImage     *image,
           break;
         }
 
-      if (success && return_vals->n_values > 1)
+      if (success && gimp_value_array_length (return_vals) > 1)
         {
-          GValue *value = g_value_array_get_nth (return_vals, 1);
+          GValue *value = gimp_value_array_index (return_vals, 1);
 
           if (GIMP_VALUE_HOLDS_INT32 (value) && g_value_get_int (value))
             {
@@ -126,7 +128,7 @@ plug_in_icc_profile_apply_rgb (GimpImage     *image,
             }
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       return success;
     }
@@ -163,7 +165,7 @@ plug_in_icc_profile_info (GimpImage     *image,
       procedure->num_args >= 1 &&
       GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[0]))
     {
-      GValueArray       *return_vals;
+      GimpValueArray    *return_vals;
       GimpPDBStatusType  status;
 
       return_vals =
@@ -173,7 +175,7 @@ plug_in_icc_profile_info (GimpImage     *image,
                                             gimp_image_get_ID (image),
                                             G_TYPE_NONE);
 
-      status = g_value_get_enum (return_vals->values);
+      status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
       switch (status)
         {
@@ -188,7 +190,7 @@ plug_in_icc_profile_info (GimpImage     *image,
           break;
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       return (status == GIMP_PDB_SUCCESS);
     }
@@ -223,7 +225,7 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
       procedure->num_args >= 1 &&
       GIMP_IS_PARAM_SPEC_STRING (procedure->args[0]))
     {
-      GValueArray       *return_vals;
+      GimpValueArray    *return_vals;
       GimpPDBStatusType  status;
 
       return_vals =
@@ -232,7 +234,7 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
                                             G_TYPE_STRING, filename,
                                             G_TYPE_NONE);
 
-      status = g_value_get_enum (return_vals->values);
+      status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
 
       switch (status)
         {
@@ -247,7 +249,7 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
           break;
         }
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       return (status == GIMP_PDB_SUCCESS);
     }
@@ -259,28 +261,28 @@ plug_in_icc_profile_file_info (Gimp          *gimp,
 }
 
 static void
-plug_in_icc_profile_info_return (GValueArray  *return_vals,
-                                 gchar       **name,
-                                 gchar       **desc,
-                                 gchar       **info)
+plug_in_icc_profile_info_return (GimpValueArray  *return_vals,
+                                 gchar          **name,
+                                 gchar          **desc,
+                                 gchar          **info)
 {
   if (name)
     {
-      GValue *value = g_value_array_get_nth (return_vals, 1);
+      GValue *value = gimp_value_array_index (return_vals, 1);
 
       *name = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
 
   if (desc)
     {
-      GValue *value = g_value_array_get_nth (return_vals, 2);
+      GValue *value = gimp_value_array_index (return_vals, 2);
 
       *desc = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
 
   if (info)
     {
-      GValue *value = g_value_array_get_nth (return_vals, 3);
+      GValue *value = gimp_value_array_index (return_vals, 3);
 
       *info = G_VALUE_HOLDS_STRING (value) ? g_value_dup_string (value) : NULL;
     }
diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c
index 03cc7a4..2a2f257 100644
--- a/app/plug-in/plug-in-params.c
+++ b/app/plug-in/plug-in-params.c
@@ -34,7 +34,7 @@
 #include "plug-in-params.h"
 
 
-GValueArray *
+GimpValueArray *
 plug_in_params_to_args (GParamSpec **pspecs,
                         gint         n_pspecs,
                         GPParam     *params,
@@ -42,15 +42,15 @@ plug_in_params_to_args (GParamSpec **pspecs,
                         gboolean     return_values,
                         gboolean     full_copy)
 {
-  GValueArray *args;
-  gint         i;
+  GimpValueArray *args;
+  gint            i;
 
   g_return_val_if_fail ((pspecs != NULL && n_pspecs  > 0) ||
                         (pspecs == NULL && n_pspecs == 0), NULL);
   g_return_val_if_fail ((params != NULL && n_params  > 0) ||
                         (params == NULL && n_params == 0), NULL);
 
-  args = g_value_array_new (n_params);
+  args = gimp_value_array_new (n_params);
 
   for (i = 0; i < n_params; i++)
     {
@@ -131,7 +131,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_INT32ARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_int32array (&value,
                                        params[i].data.d_int32array,
@@ -143,7 +143,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_INT16ARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_int16array (&value,
                                        params[i].data.d_int16array,
@@ -155,7 +155,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_INT8ARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_int8array (&value,
                                       params[i].data.d_int8array,
@@ -167,7 +167,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_FLOATARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_floatarray (&value,
                                        params[i].data.d_floatarray,
@@ -179,7 +179,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_STRINGARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_stringarray (&value,
                                         (const gchar **) params[i].data.d_stringarray,
@@ -223,7 +223,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
 
         case GIMP_PDB_COLORARRAY:
-          count = g_value_get_int (&args->values[i - 1]);
+          count = g_value_get_int (gimp_value_array_index (args, i - 1));
           if (full_copy)
             gimp_value_set_colorarray (&value,
                                       params[i].data.d_colorarray,
@@ -253,7 +253,7 @@ plug_in_params_to_args (GParamSpec **pspecs,
           break;
         }
 
-      g_value_array_append (args, &value);
+      gimp_value_array_append (args, &value);
       g_value_unset (&value);
     }
 
@@ -261,19 +261,22 @@ plug_in_params_to_args (GParamSpec **pspecs,
 }
 
 GPParam *
-plug_in_args_to_params (GValueArray *args,
-                        gboolean     full_copy)
+plug_in_args_to_params (GimpValueArray *args,
+                        gboolean        full_copy)
 {
   GPParam *params;
+  gint     length;
   gint     i;
 
   g_return_val_if_fail (args != NULL, NULL);
 
-  params = g_new0 (GPParam, args->n_values);
+  params = g_new0 (GPParam, gimp_value_array_length (args));
+
+  length = gimp_value_array_length (args);
 
-  for (i = 0; i < args->n_values; i++)
+  for (i = 0; i < length; i++)
     {
-      GValue *value = &args->values[i];
+      GValue *value = gimp_value_array_index (args, i);
 
       params[i].type =
         gimp_pdb_compat_arg_type_from_gtype (G_VALUE_TYPE (value));
diff --git a/app/plug-in/plug-in-params.h b/app/plug-in/plug-in-params.h
index a478f06..0e66256 100644
--- a/app/plug-in/plug-in-params.h
+++ b/app/plug-in/plug-in-params.h
@@ -19,14 +19,14 @@
 #define __PLUG_IN_PARAMS_H__
 
 
-GValueArray * plug_in_params_to_args (GParamSpec  **pspecs,
-                                      gint          n_pspecs,
-                                      GPParam      *params,
-                                      gint          n_params,
-                                      gboolean      return_values,
-                                      gboolean      full_copy);
-GPParam     * plug_in_args_to_params (GValueArray  *args,
-                                      gboolean      full_copy);
+GimpValueArray * plug_in_params_to_args (GParamSpec     **pspecs,
+                                         gint             n_pspecs,
+                                         GPParam         *params,
+                                         gint             n_params,
+                                         gboolean         return_values,
+                                         gboolean         full_copy);
+GPParam     * plug_in_args_to_params    (GimpValueArray  *args,
+                                         gboolean         full_copy);
 
 
 #endif /* __PLUG_IN_PARAMS_H__ */
diff --git a/app/vectors/gimpstroke.c b/app/vectors/gimpstroke.c
index d6fea3a..91728b9 100644
--- a/app/vectors/gimpstroke.c
+++ b/app/vectors/gimpstroke.c
@@ -20,14 +20,18 @@
 
 #include "config.h"
 
+#include <cairo.h>
 #include <gegl.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
 
-#include "vectors-types.h"
-
+#include "libgimpbase/gimpbase.h"
 #include "libgimpmath/gimpmath.h"
 
+#include "vectors-types.h"
+
 #include "core/gimp-utils.h"
 #include "core/gimpcoords.h"
+#include "core/gimpparamspecs.h"
 #include "core/gimp-transform-utils.h"
 
 #include "gimpanchor.h"
@@ -236,15 +240,15 @@ gimp_stroke_class_init (GimpStrokeClass *klass)
                                    GIMP_PARAM_WRITABLE |
                                    G_PARAM_CONSTRUCT_ONLY);
   g_object_class_install_property (object_class, PROP_CONTROL_POINTS,
-                                   g_param_spec_value_array ("control-points",
-                                                             "Control Points",
-                                                             "This is an ValueArray "
-                                                             "with the initial "
-                                                             "control points of "
-                                                             "the new Stroke",
-                                                             param_spec,
-                                                             GIMP_PARAM_WRITABLE |
-                                                             G_PARAM_CONSTRUCT_ONLY));
+                                   gimp_param_spec_value_array ("control-points",
+                                                                "Control Points",
+                                                                "This is an ValueArray "
+                                                                "with the initial "
+                                                                "control points of "
+                                                                "the new Stroke",
+                                                                param_spec,
+                                                                GIMP_PARAM_WRITABLE |
+                                                                G_PARAM_CONSTRUCT_ONLY));
 
   g_object_class_install_property (object_class, PROP_CLOSED,
                                    g_param_spec_boolean ("closed",
@@ -271,16 +275,17 @@ gimp_stroke_set_property (GObject      *object,
                           const GValue *value,
                           GParamSpec   *pspec)
 {
-  GimpStroke  *stroke = GIMP_STROKE (object);
-  GValueArray *val_array;
-  GValue      *item;
-  gint         i;
+  GimpStroke     *stroke = GIMP_STROKE (object);
+  GimpValueArray *val_array;
+  gint            length;
+  gint            i;
 
   switch (property_id)
     {
     case PROP_CLOSED:
       stroke->closed = g_value_get_boolean (value);
       break;
+
     case PROP_CONTROL_POINTS:
       g_return_if_fail (stroke->anchors == NULL);
       g_return_if_fail (value != NULL);
@@ -290,9 +295,11 @@ gimp_stroke_set_property (GObject      *object,
       if (val_array == NULL)
         return;
 
-      for (i = 0; i < val_array->n_values; i++)
+      length = gimp_value_array_length (val_array);
+
+      for (i = 0; i < length; i++)
         {
-          item = g_value_array_get_nth (val_array, i);
+          GValue *item = gimp_value_array_index (val_array, i);
 
           g_return_if_fail (G_VALUE_HOLDS (item, GIMP_TYPE_ANCHOR));
           stroke->anchors = g_list_append (stroke->anchors,
@@ -300,6 +307,7 @@ gimp_stroke_set_property (GObject      *object,
         }
 
       break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -319,6 +327,7 @@ gimp_stroke_get_property (GObject    *object,
     case PROP_CLOSED:
       g_value_set_boolean (value, stroke->closed);
       break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
diff --git a/app/widgets/gimpbrushselect.c b/app/widgets/gimpbrushselect.c
index c526211..d88f60a 100644
--- a/app/widgets/gimpbrushselect.c
+++ b/app/widgets/gimpbrushselect.c
@@ -23,6 +23,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -53,30 +54,30 @@ enum
 };
 
 
-static void          gimp_brush_select_constructed  (GObject         *object);
-static void          gimp_brush_select_set_property (GObject         *object,
-                                                     guint            property_id,
-                                                     const GValue    *value,
-                                                     GParamSpec      *pspec);
+static void             gimp_brush_select_constructed  (GObject         *object);
+static void             gimp_brush_select_set_property (GObject         *object,
+                                                        guint            property_id,
+                                                        const GValue    *value,
+                                                        GParamSpec      *pspec);
 
-static GValueArray * gimp_brush_select_run_callback (GimpPdbDialog   *dialog,
-                                                     GimpObject      *object,
-                                                     gboolean         closing,
-                                                     GError         **error);
+static GimpValueArray * gimp_brush_select_run_callback (GimpPdbDialog   *dialog,
+                                                        GimpObject      *object,
+                                                        gboolean         closing,
+                                                        GError         **error);
 
-static void       gimp_brush_select_opacity_changed (GimpContext     *context,
-                                                     gdouble          opacity,
-                                                     GimpBrushSelect *select);
-static void       gimp_brush_select_mode_changed    (GimpContext     *context,
-                                                     GimpLayerModeEffects  paint_mode,
-                                                     GimpBrushSelect *select);
+static void          gimp_brush_select_opacity_changed (GimpContext     *context,
+                                                        gdouble          opacity,
+                                                        GimpBrushSelect *select);
+static void          gimp_brush_select_mode_changed    (GimpContext     *context,
+                                                        GimpLayerModeEffects  paint_mode,
+                                                        GimpBrushSelect *select);
 
-static void       gimp_brush_select_opacity_update  (GtkAdjustment   *adj,
-                                                     GimpBrushSelect *select);
-static void       gimp_brush_select_mode_update     (GtkWidget       *widget,
-                                                     GimpBrushSelect *select);
-static void       gimp_brush_select_spacing_update  (GtkAdjustment   *adj,
-                                                     GimpBrushSelect *select);
+static void          gimp_brush_select_opacity_update  (GtkAdjustment   *adj,
+                                                        GimpBrushSelect *select);
+static void          gimp_brush_select_mode_update     (GtkWidget       *widget,
+                                                        GimpBrushSelect *select);
+static void          gimp_brush_select_spacing_update  (GtkAdjustment   *adj,
+                                                        GimpBrushSelect *select);
 
 
 G_DEFINE_TYPE (GimpBrushSelect, gimp_brush_select, GIMP_TYPE_PDB_DIALOG)
@@ -252,15 +253,15 @@ gimp_brush_select_set_property (GObject      *object,
     }
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_brush_select_run_callback (GimpPdbDialog  *dialog,
                                 GimpObject     *object,
                                 gboolean        closing,
                                 GError        **error)
 {
-  GimpBrush   *brush = GIMP_BRUSH (object);
-  GimpArray   *array;
-  GValueArray *return_vals;
+  GimpBrush      *brush = GIMP_BRUSH (object);
+  GimpArray      *array;
+  GimpValueArray *return_vals;
 
   array = gimp_array_new (gimp_temp_buf_get_data (brush->mask),
                           gimp_temp_buf_get_data_size (brush->mask),
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 92a6258..fa87fac 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -24,6 +24,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpconfig/gimpconfig.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
@@ -35,6 +36,7 @@
 #include "core/gimpcurve-map.h"
 #include "core/gimpdatafactory.h"
 #include "core/gimpmarshal.h"
+#include "core/gimpparamspecs.h"
 
 #include "gimpdeviceinfo.h"
 
@@ -133,22 +135,22 @@ gimp_device_info_class_init (GimpDeviceInfoClass *klass)
                                   GDK_AXIS_IGNORE,
                                   GIMP_PARAM_READWRITE);
   g_object_class_install_property (object_class, PROP_AXES,
-                                   g_param_spec_value_array ("axes",
-                                                             NULL, NULL,
-                                                             param_spec,
-                                                             GIMP_PARAM_STATIC_STRINGS |
-                                                             GIMP_CONFIG_PARAM_FLAGS));
+                                   gimp_param_spec_value_array ("axes",
+                                                                NULL, NULL,
+                                                                param_spec,
+                                                                GIMP_PARAM_STATIC_STRINGS |
+                                                                GIMP_CONFIG_PARAM_FLAGS));
 
   param_spec = g_param_spec_string ("key",
                                     NULL, NULL,
                                     NULL,
                                     GIMP_PARAM_READWRITE);
   g_object_class_install_property (object_class, PROP_KEYS,
-                                   g_param_spec_value_array ("keys",
-                                                             NULL, NULL,
-                                                             param_spec,
-                                                             GIMP_PARAM_STATIC_STRINGS |
-                                                             GIMP_CONFIG_PARAM_FLAGS));
+                                   gimp_param_spec_value_array ("keys",
+                                                                NULL, NULL,
+                                                                param_spec,
+                                                                GIMP_PARAM_STATIC_STRINGS |
+                                                                GIMP_CONFIG_PARAM_FLAGS));
 
   GIMP_CONFIG_INSTALL_PROP_OBJECT (object_class, PROP_PRESSURE_CURVE,
                                    "pressure-curve", NULL,
@@ -286,7 +288,7 @@ gimp_device_info_set_property (GObject      *object,
 
     case PROP_AXES:
       {
-        GValueArray *array = g_value_get_boxed (value);
+        GimpValueArray *array = g_value_get_boxed (value);
 
         if (array)
           {
@@ -295,11 +297,12 @@ gimp_device_info_set_property (GObject      *object,
 
             if (device)
               {
-                n_device_values = MIN (array->n_values, device->num_axes);
+                n_device_values = MIN (gimp_value_array_length (array),
+                                       device->num_axes);
               }
             else
               {
-                n_device_values = array->n_values;
+                n_device_values = gimp_value_array_length (array);
 
                 info->n_axes = n_device_values;
                 info->axes   = g_renew (GdkAxisUse, info->axes, info->n_axes);
@@ -310,7 +313,7 @@ gimp_device_info_set_property (GObject      *object,
               {
                 GdkAxisUse axis_use;
 
-                axis_use = g_value_get_enum (g_value_array_get_nth (array, i));
+                axis_use = g_value_get_enum (gimp_value_array_index (array, i));
 
                 gimp_device_info_set_axis_use (info, i, axis_use);
               }
@@ -320,7 +323,7 @@ gimp_device_info_set_property (GObject      *object,
 
     case PROP_KEYS:
       {
-        GValueArray *array = g_value_get_boxed (value);
+        GimpValueArray *array = g_value_get_boxed (value);
 
         if (array)
           {
@@ -329,11 +332,12 @@ gimp_device_info_set_property (GObject      *object,
 
             if (device)
               {
-                n_device_values = MIN (array->n_values, device->num_keys);
+                n_device_values = MIN (gimp_value_array_length (array),
+                                       device->num_keys);
               }
             else
               {
-                n_device_values = array->n_values;
+                n_device_values = gimp_value_array_length (array);
 
                 info->n_keys = n_device_values;
                 info->keys   = g_renew (GdkDeviceKey, info->keys, info->n_keys);
@@ -346,7 +350,7 @@ gimp_device_info_set_property (GObject      *object,
                 guint            keyval;
                 GdkModifierType  modifiers;
 
-                accel = g_value_get_string (g_value_array_get_nth (array, i));
+                accel = g_value_get_string (gimp_value_array_index (array, i));
 
                 gtk_accelerator_parse (accel, &keyval, &modifiers);
 
@@ -398,12 +402,12 @@ gimp_device_info_get_property (GObject    *object,
 
     case PROP_AXES:
       {
-        GValueArray *array;
-        GValue       enum_value = { 0, };
-        gint         n_axes;
-        gint         i;
+        GimpValueArray *array;
+        GValue          enum_value = { 0, };
+        gint            n_axes;
+        gint            i;
 
-        array = g_value_array_new (6);
+        array = gimp_value_array_new (6);
         g_value_init (&enum_value, GDK_TYPE_AXIS_USE);
 
         n_axes = gimp_device_info_get_n_axes (info);
@@ -413,7 +417,7 @@ gimp_device_info_get_property (GObject    *object,
             g_value_set_enum (&enum_value,
                               gimp_device_info_get_axis_use (info, i));
 
-            g_value_array_append (array, &enum_value);
+            gimp_value_array_append (array, &enum_value);
           }
 
         g_value_unset (&enum_value);
@@ -424,12 +428,12 @@ gimp_device_info_get_property (GObject    *object,
 
     case PROP_KEYS:
       {
-        GValueArray *array;
-        GValue       string_value = { 0, };
-        gint         n_keys;
-        gint         i;
+        GimpValueArray *array;
+        GValue          string_value = { 0, };
+        gint            n_keys;
+        gint            i;
 
-        array = g_value_array_new (32);
+        array = gimp_value_array_new (32);
         g_value_init (&string_value, G_TYPE_STRING);
 
         n_keys = gimp_device_info_get_n_keys (info);
@@ -458,7 +462,7 @@ gimp_device_info_get_property (GObject    *object,
                 g_value_set_string (&string_value, "");
               }
 
-            g_value_array_append (array, &string_value);
+            gimp_value_array_append (array, &string_value);
           }
 
         g_value_unset (&string_value);
diff --git a/app/widgets/gimpfontselect.c b/app/widgets/gimpfontselect.c
index 8dbe44f..f6eab48 100644
--- a/app/widgets/gimpfontselect.c
+++ b/app/widgets/gimpfontselect.c
@@ -23,6 +23,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -40,12 +41,12 @@
 #include "gimpfontview.h"
 
 
-static void          gimp_font_select_constructed  (GObject        *object);
+static void             gimp_font_select_constructed  (GObject        *object);
 
-static GValueArray * gimp_font_select_run_callback (GimpPdbDialog  *dialog,
-                                                    GimpObject     *object,
-                                                    gboolean        closing,
-                                                    GError        **error);
+static GimpValueArray * gimp_font_select_run_callback (GimpPdbDialog  *dialog,
+                                                       GimpObject     *object,
+                                                       gboolean        closing,
+                                                       GError        **error);
 
 
 G_DEFINE_TYPE (GimpFontSelect, gimp_font_select, GIMP_TYPE_PDB_DIALOG)
@@ -95,7 +96,7 @@ gimp_font_select_constructed (GObject *object)
   gtk_widget_show (dialog->view);
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_font_select_run_callback (GimpPdbDialog  *dialog,
                                GimpObject     *object,
                                gboolean        closing,
diff --git a/app/widgets/gimpgradientselect.c b/app/widgets/gimpgradientselect.c
index 71986c6..5830c71 100644
--- a/app/widgets/gimpgradientselect.c
+++ b/app/widgets/gimpgradientselect.c
@@ -23,6 +23,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -46,16 +47,16 @@ enum
 };
 
 
-static void          gimp_gradient_select_constructed  (GObject        *object);
-static void          gimp_gradient_select_set_property (GObject        *object,
-                                                        guint           property_id,
-                                                        const GValue   *value,
-                                                        GParamSpec     *pspec);
+static void             gimp_gradient_select_constructed  (GObject        *object);
+static void             gimp_gradient_select_set_property (GObject        *object,
+                                                           guint           property_id,
+                                                           const GValue   *value,
+                                                           GParamSpec     *pspec);
 
-static GValueArray * gimp_gradient_select_run_callback (GimpPdbDialog  *dialog,
-                                                        GimpObject     *object,
-                                                        gboolean        closing,
-                                                        GError        **error);
+static GimpValueArray * gimp_gradient_select_run_callback (GimpPdbDialog  *dialog,
+                                                           GimpObject     *object,
+                                                           gboolean        closing,
+                                                           GError        **error);
 
 
 G_DEFINE_TYPE (GimpGradientSelect, gimp_gradient_select,
@@ -135,7 +136,7 @@ gimp_gradient_select_set_property (GObject      *object,
     }
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_gradient_select_run_callback (GimpPdbDialog  *dialog,
                                    GimpObject     *object,
                                    gboolean        closing,
@@ -148,7 +149,7 @@ gimp_gradient_select_run_callback (GimpPdbDialog  *dialog,
   GimpRGB              color;
   gint                 i;
   GimpArray           *array;
-  GValueArray         *return_vals;
+  GimpValueArray      *return_vals;
 
   i      = GIMP_GRADIENT_SELECT (dialog)->sample_size;
   pos    = 0.0;
diff --git a/app/widgets/gimphelp.c b/app/widgets/gimphelp.c
index f112a3c..adda30f 100644
--- a/app/widgets/gimphelp.c
+++ b/app/widgets/gimphelp.c
@@ -279,11 +279,11 @@ gimp_help_browser (Gimp         *gimp,
 
   if (! procedure)
     {
-      GValueArray *args          = NULL;
-      gint          n_domains    = 0;
-      gchar       **help_domains = NULL;
-      gchar       **help_uris    = NULL;
-      GError       *error        = NULL;
+      GimpValueArray *args         = NULL;
+      gint            n_domains    = 0;
+      gchar         **help_domains = NULL;
+      gchar         **help_uris    = NULL;
+      GError         *error        = NULL;
 
       procedure = gimp_pdb_lookup_procedure (gimp->pdb,
                                              "extension-gimp-help-browser");
@@ -307,17 +307,22 @@ gimp_help_browser (Gimp         *gimp,
       args = gimp_procedure_get_arguments (procedure);
       gimp_value_array_truncate (args, 5);
 
-      g_value_set_int             (&args->values[0], GIMP_RUN_INTERACTIVE);
-      g_value_set_int             (&args->values[1], n_domains);
-      gimp_value_take_stringarray (&args->values[2], help_domains, n_domains);
-      g_value_set_int             (&args->values[3], n_domains);
-      gimp_value_take_stringarray (&args->values[4], help_uris, n_domains);
+      g_value_set_int             (gimp_value_array_index (args, 0),
+                                   GIMP_RUN_INTERACTIVE);
+      g_value_set_int             (gimp_value_array_index (args, 1),
+                                   n_domains);
+      gimp_value_take_stringarray (gimp_value_array_index (args, 2),
+                                   help_domains, n_domains);
+      g_value_set_int             (gimp_value_array_index (args, 3),
+                                   n_domains);
+      gimp_value_take_stringarray (gimp_value_array_index (args, 4),
+                                   help_uris, n_domains);
 
       gimp_procedure_execute_async (procedure, gimp,
                                     gimp_get_user_context (gimp),
                                     NULL, args, NULL, &error);
 
-      g_value_array_free (args);
+      gimp_value_array_unref (args);
 
       if (error)
         {
@@ -406,8 +411,8 @@ gimp_help_call (Gimp         *gimp,
   /*  Special case the help browser  */
   if (! strcmp (procedure_name, "extension-gimp-help-browser-temp"))
     {
-      GValueArray *return_vals;
-      GError      *error = NULL;
+      GimpValueArray *return_vals;
+      GError         *error = NULL;
 
       GIMP_LOG (HELP, "Calling help via %s: %s %s %s",
                 procedure_name,
@@ -425,7 +430,7 @@ gimp_help_call (Gimp         *gimp,
                                             G_TYPE_STRING, help_id,
                                             G_TYPE_NONE);
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       if (error)
         {
@@ -441,11 +446,11 @@ gimp_help_call (Gimp         *gimp,
 
   if (! procedure)
     {
-      GValueArray  *args         = NULL;
-      gint          n_domains    = 0;
-      gchar       **help_domains = NULL;
-      gchar       **help_uris    = NULL;
-      GError       *error        = NULL;
+      GimpValueArray  *args         = NULL;
+      gint             n_domains    = 0;
+      gchar          **help_domains = NULL;
+      gchar          **help_uris    = NULL;
+      GError          *error        = NULL;
 
       procedure = gimp_pdb_lookup_procedure (gimp->pdb, "extension-gimp-help");
 
@@ -458,16 +463,20 @@ gimp_help_call (Gimp         *gimp,
       args = gimp_procedure_get_arguments (procedure);
       gimp_value_array_truncate (args, 4);
 
-      g_value_set_int             (&args->values[0], n_domains);
-      gimp_value_take_stringarray (&args->values[1], help_domains, n_domains);
-      g_value_set_int             (&args->values[2], n_domains);
-      gimp_value_take_stringarray (&args->values[3], help_uris, n_domains);
+      g_value_set_int             (gimp_value_array_index (args, 0),
+                                   n_domains);
+      gimp_value_take_stringarray (gimp_value_array_index (args, 1),
+                                   help_domains, n_domains);
+      g_value_set_int             (gimp_value_array_index (args, 2),
+                                   n_domains);
+      gimp_value_take_stringarray (gimp_value_array_index (args, 3),
+                                   help_uris, n_domains);
 
       gimp_procedure_execute_async (procedure, gimp,
                                     gimp_get_user_context (gimp), progress,
                                     args, NULL, &error);
 
-      g_value_array_free (args);
+      gimp_value_array_unref (args);
 
       if (error)
         {
@@ -481,8 +490,8 @@ gimp_help_call (Gimp         *gimp,
 
   if (procedure)
     {
-      GValueArray *return_vals;
-      GError      *error = NULL;
+      GimpValueArray *return_vals;
+      GError         *error = NULL;
 
       GIMP_LOG (HELP, "Calling help via %s: %s %s %s",
                 procedure_name,
@@ -501,7 +510,7 @@ gimp_help_call (Gimp         *gimp,
                                             G_TYPE_STRING, help_id,
                                             G_TYPE_NONE);
 
-      g_value_array_free (return_vals);
+      gimp_value_array_unref (return_vals);
 
       if (error)
         {
diff --git a/app/widgets/gimppaletteselect.c b/app/widgets/gimppaletteselect.c
index a6b44c6..2927561 100644
--- a/app/widgets/gimppaletteselect.c
+++ b/app/widgets/gimppaletteselect.c
@@ -23,6 +23,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -39,12 +40,12 @@
 #include "gimppaletteselect.h"
 
 
-static void          gimp_palette_select_constructed  (GObject        *object);
+static void             gimp_palette_select_constructed  (GObject        *object);
 
-static GValueArray * gimp_palette_select_run_callback (GimpPdbDialog  *dialog,
-                                                       GimpObject     *object,
-                                                       gboolean        closing,
-                                                       GError        **error);
+static GimpValueArray * gimp_palette_select_run_callback (GimpPdbDialog  *dialog,
+                                                          GimpObject     *object,
+                                                          gboolean        closing,
+                                                          GError        **error);
 
 
 G_DEFINE_TYPE (GimpPaletteSelect, gimp_palette_select, GIMP_TYPE_PDB_DIALOG)
@@ -97,7 +98,7 @@ gimp_palette_select_constructed (GObject *object)
   gtk_widget_show (dialog->view);
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_palette_select_run_callback (GimpPdbDialog  *dialog,
                                   GimpObject     *object,
                                   gboolean        closing,
diff --git a/app/widgets/gimppatternselect.c b/app/widgets/gimppatternselect.c
index 3dba0ab..49511af 100644
--- a/app/widgets/gimppatternselect.c
+++ b/app/widgets/gimppatternselect.c
@@ -23,6 +23,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -40,12 +41,12 @@
 #include "gimppatternselect.h"
 
 
-static void          gimp_pattern_select_constructed  (GObject        *object);
+static void             gimp_pattern_select_constructed  (GObject        *object);
 
-static GValueArray * gimp_pattern_select_run_callback (GimpPdbDialog  *dialog,
-                                                       GimpObject     *object,
-                                                       gboolean        closing,
-                                                       GError        **error);
+static GimpValueArray * gimp_pattern_select_run_callback (GimpPdbDialog  *dialog,
+                                                          GimpObject     *object,
+                                                          gboolean        closing,
+                                                          GError        **error);
 
 
 G_DEFINE_TYPE (GimpPatternSelect, gimp_pattern_select, GIMP_TYPE_PDB_DIALOG)
@@ -96,15 +97,15 @@ gimp_pattern_select_constructed (GObject *object)
   gtk_widget_show (dialog->view);
 }
 
-static GValueArray *
+static GimpValueArray *
 gimp_pattern_select_run_callback (GimpPdbDialog  *dialog,
                                   GimpObject     *object,
                                   gboolean        closing,
                                   GError        **error)
 {
-  GimpPattern *pattern = GIMP_PATTERN (object);
-  GimpArray   *array;
-  GValueArray *return_vals;
+  GimpPattern    *pattern = GIMP_PATTERN (object);
+  GimpArray      *array;
+  GimpValueArray *return_vals;
 
   array = gimp_array_new (gimp_temp_buf_get_data (pattern->mask),
                           gimp_temp_buf_get_data_size (pattern->mask),
diff --git a/app/widgets/gimppdbdialog.c b/app/widgets/gimppdbdialog.c
index cbf8386..e3295a4 100644
--- a/app/widgets/gimppdbdialog.c
+++ b/app/widgets/gimppdbdialog.c
@@ -25,6 +25,7 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "widgets-types.h"
@@ -320,12 +321,13 @@ gimp_pdb_dialog_run_callback (GimpPdbDialog *dialog,
 
       if (gimp_pdb_lookup_procedure (dialog->pdb, dialog->callback_name))
         {
-          GValueArray *return_vals;
-          GError      *error = NULL;
+          GimpValueArray *return_vals;
+          GError         *error = NULL;
 
           return_vals = klass->run_callback (dialog, object, closing, &error);
 
-          if (g_value_get_enum (&return_vals->values[0]) != GIMP_PDB_SUCCESS)
+          if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) !=
+              GIMP_PDB_SUCCESS)
             {
               gimp_message (dialog->context->gimp, G_OBJECT (dialog),
                             GIMP_MESSAGE_ERROR,
@@ -342,7 +344,7 @@ gimp_pdb_dialog_run_callback (GimpPdbDialog *dialog,
               g_error_free (error);
             }
 
-          g_value_array_free (return_vals);
+          gimp_value_array_unref (return_vals);
         }
 
       dialog->callback_busy = FALSE;
diff --git a/app/widgets/gimppdbdialog.h b/app/widgets/gimppdbdialog.h
index 77fd9b2..b7f3e62 100644
--- a/app/widgets/gimppdbdialog.h
+++ b/app/widgets/gimppdbdialog.h
@@ -65,10 +65,10 @@ struct _GimpPdbDialogClass
 
   GList           *dialogs;
 
-  GValueArray * (* run_callback) (GimpPdbDialog  *dialog,
-                                  GimpObject     *object,
-                                  gboolean        closing,
-                                  GError        **error);
+  GimpValueArray * (* run_callback) (GimpPdbDialog  *dialog,
+                                     GimpObject     *object,
+                                     gboolean        closing,
+                                     GError        **error);
 };
 
 
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 57a195a..e87028a 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -1921,10 +1921,10 @@ xcf_load_vector (XcfInfo   *info,
       GimpStroke  *stroke;
       gint         j;
 
-      GValueArray *control_points;
-      GValue       value = { 0, };
-      GimpAnchor   anchor = { { 0, } };
-      GType        stroke_type;
+      GimpValueArray *control_points;
+      GValue          value = { 0, };
+      GimpAnchor      anchor = { { 0, } };
+      GType           stroke_type;
 
       g_value_init (&value, GIMP_TYPE_ANCHOR);
 
@@ -1958,7 +1958,7 @@ xcf_load_vector (XcfInfo   *info,
           return FALSE;
         }
 
-      control_points = g_value_array_new (num_control_points);
+      control_points = gimp_value_array_new (num_control_points);
 
       anchor.selected = FALSE;
 
@@ -1976,7 +1976,7 @@ xcf_load_vector (XcfInfo   *info,
           anchor.position.wheel    = coords[5];
 
           g_value_set_boxed (&value, &anchor);
-          g_value_array_append (control_points, &value);
+          gimp_value_array_append (control_points, &value);
 
 #ifdef GIMP_XCF_PATH_DEBUG
           g_printerr ("Anchor: %d, (%f, %f, %f, %f, %f, %f)\n", type,
@@ -1995,7 +1995,7 @@ xcf_load_vector (XcfInfo   *info,
       gimp_vectors_stroke_add (vectors, stroke);
 
       g_object_unref (stroke);
-      g_value_array_free (control_points);
+      gimp_value_array_unref (control_points);
     }
 
   gimp_image_add_vectors (image, vectors,
diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c
index 4877c22..99dcbe8 100644
--- a/app/xcf/xcf.c
+++ b/app/xcf/xcf.c
@@ -50,18 +50,18 @@ typedef GimpImage * GimpXcfLoaderFunc (Gimp     *gimp,
                                        GError  **error);
 
 
-static GValueArray * xcf_load_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error);
-static GValueArray * xcf_save_invoker (GimpProcedure      *procedure,
-                                       Gimp               *gimp,
-                                       GimpContext        *context,
-                                       GimpProgress       *progress,
-                                       const GValueArray  *args,
-                                       GError            **error);
+static GimpValueArray * xcf_load_invoker (GimpProcedure         *procedure,
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error);
+static GimpValueArray * xcf_save_invoker (GimpProcedure         *procedure,
+                                          Gimp                  *gimp,
+                                          GimpContext           *context,
+                                          GimpProgress          *progress,
+                                          const GimpValueArray  *args,
+                                          GError               **error);
 
 
 static GimpXcfLoaderFunc * const xcf_loaders[] =
@@ -229,24 +229,24 @@ xcf_exit (Gimp *gimp)
   g_return_if_fail (GIMP_IS_GIMP (gimp));
 }
 
-static GValueArray *
-xcf_load_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+static GimpValueArray *
+xcf_load_invoker (GimpProcedure         *procedure,
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
-  XcfInfo      info;
-  GValueArray *return_vals;
-  GimpImage   *image   = NULL;
-  const gchar *filename;
-  gboolean     success = FALSE;
-  gchar        id[14];
+  XcfInfo         info;
+  GimpValueArray *return_vals;
+  GimpImage      *image   = NULL;
+  const gchar    *filename;
+  gboolean        success = FALSE;
+  gchar           id[14];
 
   gimp_set_busy (gimp);
 
-  filename = g_value_get_string (&args->values[1]);
+  filename = g_value_get_string (gimp_value_array_index (args, 1));
 
   info.fp = g_fopen (filename, "rb");
 
@@ -335,31 +335,31 @@ xcf_load_invoker (GimpProcedure      *procedure,
                                                   error ? *error : NULL);
 
   if (success)
-    gimp_value_set_image (&return_vals->values[1], image);
+    gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
 
   gimp_unset_busy (gimp);
 
   return return_vals;
 }
 
-static GValueArray *
-xcf_save_invoker (GimpProcedure      *procedure,
-                  Gimp               *gimp,
-                  GimpContext        *context,
-                  GimpProgress       *progress,
-                  const GValueArray  *args,
-                  GError            **error)
+static GimpValueArray *
+xcf_save_invoker (GimpProcedure         *procedure,
+                  Gimp                  *gimp,
+                  GimpContext           *context,
+                  GimpProgress          *progress,
+                  const GimpValueArray  *args,
+                  GError               **error)
 {
-  XcfInfo      info;
-  GValueArray *return_vals;
-  GimpImage   *image;
-  const gchar *filename;
-  gboolean     success = FALSE;
+  XcfInfo         info;
+  GimpValueArray *return_vals;
+  GimpImage      *image;
+  const gchar    *filename;
+  gboolean        success = FALSE;
 
   gimp_set_busy (gimp);
 
-  image    = gimp_value_get_image (&args->values[1], gimp);
-  filename = g_value_get_string (&args->values[3]);
+  image    = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
+  filename = g_value_get_string (gimp_value_array_index (args, 3));
 
   info.fp = g_fopen (filename, "wb");
 
diff --git a/libgimpconfig/gimpconfig-deserialize.c b/libgimpconfig/gimpconfig-deserialize.c
index 648bd2e..387729f 100644
--- a/libgimpconfig/gimpconfig-deserialize.c
+++ b/libgimpconfig/gimpconfig-deserialize.c
@@ -351,7 +351,7 @@ gimp_config_deserialize_value (GValue     *value,
     {
       return gimp_config_deserialize_matrix2 (value, prop_spec, scanner);
     }
-  else if (prop_spec->value_type == G_TYPE_VALUE_ARRAY)
+  else if (prop_spec->value_type == GIMP_TYPE_VALUE_ARRAY)
     {
       return gimp_config_deserialize_value_array (value,
                                                   config, prop_spec, scanner);
@@ -705,19 +705,19 @@ gimp_config_deserialize_value_array (GValue     *value,
                                      GParamSpec *prop_spec,
                                      GScanner   *scanner)
 {
-  GParamSpecValueArray *array_spec;
-  GValueArray          *array;
-  GValue                array_value = { 0, };
-  gint                  n_values;
-  GTokenType            token;
-  gint                  i;
+  GimpParamSpecValueArray *array_spec;
+  GimpValueArray          *array;
+  GValue                   array_value = { 0, };
+  gint                     n_values;
+  GTokenType               token;
+  gint                     i;
 
-  array_spec = G_PARAM_SPEC_VALUE_ARRAY (prop_spec);
+  array_spec = GIMP_PARAM_SPEC_VALUE_ARRAY (prop_spec);
 
   if (! gimp_scanner_parse_int (scanner, &n_values))
     return G_TOKEN_INT;
 
-  array = g_value_array_new (n_values);
+  array = gimp_value_array_new (n_values);
 
   for (i = 0; i < n_values; i++)
     {
@@ -729,7 +729,7 @@ gimp_config_deserialize_value_array (GValue     *value,
                                              scanner);
 
       if (token == G_TOKEN_RIGHT_PAREN)
-        g_value_array_append (array, &array_value);
+        gimp_value_array_append (array, &array_value);
 
       g_value_unset (&array_value);
 
diff --git a/libgimpconfig/gimpconfig-serialize.c b/libgimpconfig/gimpconfig-serialize.c
index 9759d86..4a7950f 100644
--- a/libgimpconfig/gimpconfig-serialize.c
+++ b/libgimpconfig/gimpconfig-serialize.c
@@ -453,24 +453,25 @@ gimp_config_serialize_value (const GValue *value,
       return TRUE;
     }
 
-  if (G_VALUE_TYPE (value) == G_TYPE_VALUE_ARRAY)
+  if (G_VALUE_TYPE (value) == GIMP_TYPE_VALUE_ARRAY)
     {
-      GValueArray *array;
+      GimpValueArray *array;
 
       array = g_value_get_boxed (value);
 
       if (array)
         {
+          gint length = gimp_value_array_length (array);
           gint i;
 
-          g_string_append_printf (str, "%d", array->n_values);
+          g_string_append_printf (str, "%d", length);
 
-          for (i = 0; i < array->n_values; i++)
+          for (i = 0; i < length; i++)
             {
               g_string_append (str, " ");
 
-              if (! gimp_config_serialize_value (g_value_array_get_nth (array,
-                                                                        i),
+              if (! gimp_config_serialize_value (gimp_value_array_index (array,
+                                                                         i),
                                                  str, TRUE))
                 return FALSE;
             }
diff --git a/tools/pdbgen/app.pl b/tools/pdbgen/app.pl
index b143862..34383b5 100644
--- a/tools/pdbgen/app.pl
+++ b/tools/pdbgen/app.pl
@@ -112,7 +112,7 @@ sub marshal_inargs {
 	my $var = $_->{name};
 	my $value;
 
-	$value = "&args->values[$argc]";
+	$value = "gimp_value_array_index (args, $argc)";
 	if (!exists $_->{dead}) {
 	    $result .= eval qq/"  $arg->{get_value_func};\n"/;
 	}
@@ -157,7 +157,7 @@ CODE
 
 	    $argc++;
 
-	    $value = "&return_vals->values[$argc]";
+	    $value = "gimp_value_array_index (return_vals, $argc)";
 
 	    if (exists $_->{array}) {
 		my $arrayarg = $_->{array};
@@ -660,13 +660,13 @@ CODE
 	    }
 	}
 
-	$out->{code} .= "\nstatic GValueArray *\n";
+	$out->{code} .= "\nstatic GimpValueArray *\n";
 	$out->{code} .= "${name}_invoker (GimpProcedure      *procedure,\n";
-	$out->{code} .=  ' ' x length($name) . "          Gimp               *gimp,\n";
-	$out->{code} .=  ' ' x length($name) . "          GimpContext        *context,\n";
-	$out->{code} .=  ' ' x length($name) . "          GimpProgress       *progress,\n";
-	$out->{code} .=  ' ' x length($name) . "          const GValueArray  *args,\n";
-	$out->{code} .=  ' ' x length($name) . "          GError            **error)\n{\n";
+	$out->{code} .=  ' ' x length($name) . "          Gimp                  *gimp,\n";
+	$out->{code} .=  ' ' x length($name) . "          GimpContext           *context,\n";
+	$out->{code} .=  ' ' x length($name) . "          GimpProgress          *progress,\n";
+	$out->{code} .=  ' ' x length($name) . "          const GimpValueArray  *args,\n";
+	$out->{code} .=  ' ' x length($name) . "          GError               **error)\n{\n";
 
 	my $code = "";
 
@@ -676,7 +676,7 @@ CODE
 	else {
 	    my $invoker = "";
 	
-	    $invoker .= ' ' x 2 . "GValueArray *return_vals;\n" if scalar @outargs;
+	    $invoker .= ' ' x 2 . "GimpValueArray *return_vals;\n" if scalar @outargs;
 	    $invoker .= &declare_args($proc, $out, 0, qw(inargs));
 	    $invoker .= &declare_args($proc, $out, 1, qw(outargs));
 
@@ -786,6 +786,7 @@ GPL
 
 		if ($sys == 1 && $base == 0) {
 		    $base = 1;
+		    $headers .= "#include \"libgimpbase/gimpbase.h\"\n\n";
 		    $headers .= "#include \"pdb-types.h\"\n\n";
 		}
 	    }
diff --git a/tools/pdbgen/pdb/fileops.pdb b/tools/pdbgen/pdb/fileops.pdb
index 8b11093..462e68c 100644
--- a/tools/pdbgen/pdb/fileops.pdb
+++ b/tools/pdbgen/pdb/fileops.pdb
@@ -50,15 +50,15 @@ HELP
         no_marshalling => 1,
         code => <<'CODE'
 {
-  GValueArray         *new_args;
-  GValueArray         *return_vals;
+  GimpValueArray      *new_args;
+  GimpValueArray      *return_vals;
   GimpPlugInProcedure *file_proc;
   GimpProcedure       *proc;
   gchar               *uri;
   gint                 i;
 
   uri = file_utils_filename_to_uri (gimp,
-                                    g_value_get_string (&args->values[1]),
+                                    g_value_get_string (gimp_value_array_index (args, 1)),
                                     error);
 
   if (! uri)
@@ -79,11 +79,12 @@ HELP
   new_args = gimp_procedure_get_arguments (proc);
 
   for (i = 0; i < 3; i++)
-    g_value_transform (&args->values[i], &new_args->values[i]);
+    g_value_transform (gimp_value_array_index (args, i),
+                       gimp_value_array_index (new_args, i));
 
   for (i = 3; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
-      g_value_set_static_string (&new_args->values[i], "");
+      g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
   return_vals =
     gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -91,15 +92,17 @@ HELP
                                              gimp_object_get_name (proc),
                                              new_args);
 
-  g_value_array_free (new_args);
+  gimp_value_array_unref (new_args);
 
-  if (g_value_get_enum (return_vals->values) == GIMP_PDB_SUCCESS)
+  if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) ==
+      GIMP_PDB_SUCCESS)
     {
-      if (return_vals->n_values > 1 &&
-          GIMP_VALUE_HOLDS_IMAGE_ID (return_vals->values + 1))
+      if (gimp_value_array_length (return_vals) > 1 &&
+          GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
         {
-          GimpImage *image = gimp_value_get_image (return_vals->values + 1,
-                                                   gimp);
+          GimpImage *image =
+            gimp_value_get_image (gimp_value_array_index (return_vals, 1),
+                                  gimp);
           gimp_image_set_load_proc (image, file_proc);
         }
     }
@@ -265,15 +268,15 @@ HELP
         no_marshalling => 1,
         code => <<'CODE'
 {
-  GValueArray         *new_args;
-  GValueArray         *return_vals;
+  GimpValueArray      *new_args;
+  GimpValueArray      *return_vals;
   GimpPlugInProcedure *file_proc;
   GimpProcedure       *proc;
   gchar               *uri;
   gint                 i;
 
   uri = file_utils_filename_to_uri (gimp,
-                                    g_value_get_string (&args->values[3]),
+                                    g_value_get_string (gimp_value_array_index (args, 3)),
                                     error);
 
   if (! uri)
@@ -297,11 +300,12 @@ HELP
   new_args = gimp_procedure_get_arguments (proc);
 
   for (i = 0; i < 5; i++)
-    g_value_transform (&args->values[i], &new_args->values[i]);
+    g_value_transform (gimp_value_array_index (args, i),
+                       gimp_value_array_index (new_args, i));
 
   for (i = 5; i < proc->num_args; i++)
     if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
-      g_value_set_static_string (&new_args->values[i], "");
+      g_value_set_static_string (gimp_value_array_index (new_args, i), "");
 
   return_vals =
     gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
@@ -309,7 +313,7 @@ HELP
                                              gimp_object_get_name (proc),
                                              new_args);
 
-  g_value_array_free (new_args);
+  gimp_value_array_unref (new_args);
 
   return return_vals;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]