PIKApp/plug-ins/map-object/map-object-main.c

596 lines
22 KiB
C
Raw Normal View History

2023-09-26 00:35:21 +02:00
/* MapObject 1.2.0 -- image filter plug-in for PIKA
*
* Copyright (C) 1996-98 Tom Bech
* Copyright (C) 1996-98 Federico Mena Quintero
*
* E-mail: tomb@gimp.org (Tom) or quartic@gimp.org (Federico)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gtk/gtk.h>
#include <libpika/pika.h>
#include <libpika/pikaui.h>
#include "map-object-ui.h"
#include "map-object-image.h"
#include "map-object-apply.h"
#include "map-object-preview.h"
#include "map-object-main.h"
#include "libpika/stdplugins-intl.h"
MapObjectValues mapvals;
typedef struct _Map Map;
typedef struct _MapClass MapClass;
struct _Map
{
PikaPlugIn parent_instance;
};
struct _MapClass
{
PikaPlugInClass parent_class;
};
#define MAP_TYPE (map_get_type ())
2023-10-30 23:55:30 +01:00
#define MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAP_TYPE, Map))
2023-09-26 00:35:21 +02:00
GType map_get_type (void) G_GNUC_CONST;
static GList * map_query_procedures (PikaPlugIn *plug_in);
static PikaProcedure * map_create_procedure (PikaPlugIn *plug_in,
const gchar *name);
static PikaValueArray * map_run (PikaProcedure *procedure,
PikaRunMode run_mode,
PikaImage *image,
gint n_drawables,
PikaDrawable **drawables,
2023-10-30 23:55:30 +01:00
PikaProcedureConfig *config,
2023-09-26 00:35:21 +02:00
gpointer run_data);
static void set_default_settings (void);
static void check_drawables (PikaDrawable *drawable);
G_DEFINE_TYPE (Map, map, PIKA_TYPE_PLUG_IN)
PIKA_MAIN (MAP_TYPE)
DEFINE_STD_SET_I18N
static void
map_class_init (MapClass *klass)
{
PikaPlugInClass *plug_in_class = PIKA_PLUG_IN_CLASS (klass);
plug_in_class->query_procedures = map_query_procedures;
plug_in_class->create_procedure = map_create_procedure;
plug_in_class->set_i18n = STD_SET_I18N;
}
static void
map_init (Map *map)
{
}
static GList *
map_query_procedures (PikaPlugIn *plug_in)
{
return g_list_append (NULL, g_strdup (PLUG_IN_PROC));
}
static PikaProcedure *
map_create_procedure (PikaPlugIn *plug_in,
const gchar *name)
{
PikaProcedure *procedure = NULL;
if (! strcmp (name, PLUG_IN_PROC))
{
PikaRGB white = { 1.0, 1.0, 1.0, 1.0 };
procedure = pika_image_procedure_new (plug_in, name,
2023-10-30 23:55:30 +01:00
PIKA_PDB_PROC_TYPE_PLUGIN,
map_run, NULL, NULL);
2023-09-26 00:35:21 +02:00
pika_procedure_set_image_types (procedure, "RGB*");
pika_procedure_set_sensitivity_mask (procedure,
PIKA_PROCEDURE_SENSITIVE_DRAWABLE);
pika_procedure_set_menu_label (procedure, _("Map _Object..."));
pika_procedure_add_menu_path (procedure, "<Image>/Filters/Map");
pika_procedure_set_documentation (procedure,
_("Map the image to an object "
"(plane, sphere, box or cylinder)"),
"No help yet",
name);
pika_procedure_set_attribution (procedure,
"Tom Bech & Federico Mena Quintero",
"Tom Bech & Federico Mena Quintero",
"Version 1.2.0, July 16 1998");
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_CHOICE (procedure, "map-type",
_("Map _to"),
_("Type of mapping"),
pika_choice_new_with_values ("map-plane", MAP_PLANE, _("Plane"), NULL,
"map-sphere", MAP_SPHERE, _("Sphere"), NULL,
"map-box", MAP_BOX, _("Box"), NULL,
"map-cylinder", MAP_CYLINDER, _("Cylinder"), NULL,
NULL),
"map-plane",
G_PARAM_READWRITE);
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_DOUBLE (procedure, "viewpoint-x",
2023-10-30 23:55:30 +01:00
_("X"),
_("Position of viewpoint (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "viewpoint-y",
2023-10-30 23:55:30 +01:00
_("Y"),
_("Position of viewpoint (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "viewpoint-z",
2023-10-30 23:55:30 +01:00
_("Z"),
_("Position of viewpoint (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, 2.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "position-x",
2023-10-30 23:55:30 +01:00
_("Position X"),
_("Object position (x,y,z)"),
-1.0, 2.0, 0.5,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "position-y",
2023-10-30 23:55:30 +01:00
_("Position Y"),
_("Object position (x,y,z)"),
-1.0, 2.0, 0.5,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "position-z",
2023-10-30 23:55:30 +01:00
_("Position Z"),
_("Object position (x,y,z)"),
-1.0, 2.0, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "first-axis-x",
2023-10-30 23:55:30 +01:00
_("X"),
_("First axis of object (x,y,z)"),
-1.0, 2.0, 1.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "first-axis-y",
2023-10-30 23:55:30 +01:00
_("y"),
_("First axis of object (x,y,z)"),
-1.0, 2.0, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "first-axis-z",
2023-10-30 23:55:30 +01:00
_("Z"),
_("First axis of object (x,y,z)"),
-1.0, 2.0, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "second-axis-x",
2023-10-30 23:55:30 +01:00
_("X"),
_("Second axis of object (x,y,z)"),
-1.0, 2.0, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "second-axis-y",
2023-10-30 23:55:30 +01:00
_("Y"),
_("Second axis of object (x,y,z)"),
-1.0, 2.0, 1.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "second-axis-z",
2023-10-30 23:55:30 +01:00
_("Z"),
_("Second axis of object (x,y,z)"),
-1.0, 2.0, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "rotation-angle-x",
2023-10-30 23:55:30 +01:00
_("Angle X"),
_("Rotation about X axis in degrees"),
-180, 180, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "rotation-angle-y",
2023-10-30 23:55:30 +01:00
_("Angle Y"),
_("Rotation about Y axis in degrees"),
-180, 180, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "rotation-angle-z",
2023-10-30 23:55:30 +01:00
_("Angle Z"),
_("Rotation about Z axis in degrees"),
-180, 180, 0.0,
2023-09-26 00:35:21 +02:00
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_CHOICE (procedure, "light-type",
_("Light source type"),
_("Type of lightsource"),
pika_choice_new_with_values ("point-light", POINT_LIGHT, _("Point Light"), NULL,
"directional-light", DIRECTIONAL_LIGHT, _("Directional Light"), NULL,
"no-light", NO_LIGHT, _("No Light"), NULL,
NULL),
"point-light",
G_PARAM_READWRITE);
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_RGB (procedure, "light-color",
2023-10-30 23:55:30 +01:00
_("Light source _color"),
_("Light source color"),
2023-09-26 00:35:21 +02:00
TRUE, &white,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-position-x",
2023-10-30 23:55:30 +01:00
_("Light position X"),
_("Light source position (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, -0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-position-y",
2023-10-30 23:55:30 +01:00
_("Light position Y"),
_("Light source position (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, -0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-position-z",
2023-10-30 23:55:30 +01:00
_("Light position Z"),
_("Light source position (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, 2.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-direction-x",
2023-10-30 23:55:30 +01:00
_("Light direction X"),
_("Light source direction (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, -1.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-direction-y",
2023-10-30 23:55:30 +01:00
_("Light direction Y"),
_("Light source direction (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, -1.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "light-direction-z",
2023-10-30 23:55:30 +01:00
_("Light direction Z"),
_("Light source direction (x,y,z)"),
2023-09-26 00:35:21 +02:00
-G_MAXDOUBLE, G_MAXDOUBLE, 1.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "ambient-intensity",
2023-10-30 23:55:30 +01:00
_("Ambie_nt"),
_("Material ambient intensity"),
2023-09-26 00:35:21 +02:00
0, 1, 0.3,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "diffuse-intensity",
2023-10-30 23:55:30 +01:00
_("D_iffuse"),
_("Material diffuse intensity"),
2023-09-26 00:35:21 +02:00
0, 1, 1.0,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
/* Reflectivity */
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_DOUBLE (procedure, "diffuse-reflectivity",
2023-10-30 23:55:30 +01:00
_("Di_ffuse"),
_("Material diffuse reflectivity"),
2023-09-26 00:35:21 +02:00
0, 1, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "specular-reflectivity",
2023-10-30 23:55:30 +01:00
_("Spec_ular"),
_("Material specular reflectivity"),
2023-09-26 00:35:21 +02:00
0, 1, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "highlight",
2023-10-30 23:55:30 +01:00
_("Highligh_t"),
_("Material highlight "
"(note, it's exponential)"),
2023-09-26 00:35:21 +02:00
0, G_MAXDOUBLE, 27.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_BOOLEAN (procedure, "antialiasing",
2023-10-30 23:55:30 +01:00
_("Antialia_sing"),
_("Apply antialiasing"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_DOUBLE (procedure, "depth",
_("_Depth"),
_("Antialiasing quality. Higher is better, "
"but slower"),
1.0, 5.0, 3.0,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "threshold",
_("Thr_eshold"),
_("Stop when pixel differences are smaller than "
"this value"),
0.001, 1000.0, 0.250,
G_PARAM_READWRITE);
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_BOOLEAN (procedure, "tiled",
2023-10-30 23:55:30 +01:00
_("_Tile source image"),
_("Tile source image"),
2023-09-26 00:35:21 +02:00
FALSE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_BOOLEAN (procedure, "new-image",
2023-10-30 23:55:30 +01:00
_("Create _new image"),
_("Create a new image"),
2023-09-26 00:35:21 +02:00
FALSE,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_BOOLEAN (procedure, "new-layer",
_("Create ne_w layer"),
_("Create a new layer when applying filter"),
2023-09-26 00:35:21 +02:00
FALSE,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_BOOLEAN (procedure, "transparent-background",
_("Transparent bac_kground"),
_("Make background transparent"),
FALSE,
G_PARAM_READWRITE);
2023-09-26 00:35:21 +02:00
2023-10-30 23:55:30 +01:00
/* Sphere Options */
PIKA_PROC_ARG_DOUBLE (procedure, "sphere-radius",
_("Radi_us"),
_("Sphere radius"),
2023-09-26 00:35:21 +02:00
0, G_MAXDOUBLE, 0.25,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
/* Box Options */
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_DRAWABLE (procedure, "box-front-drawable",
2023-10-30 23:55:30 +01:00
_("Fro_nt"),
_("Box front face "
"(set this to NULL if not used)"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "box-back-drawable",
2023-10-30 23:55:30 +01:00
_("B_ack"),
_("Box back face"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "box-top-drawable",
2023-10-30 23:55:30 +01:00
_("To_p"),
_("Box top face"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "box-bottom-drawable",
2023-10-30 23:55:30 +01:00
_("Bo_ttom"),
_("Box bottom face"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "box-left-drawable",
2023-10-30 23:55:30 +01:00
_("Le_ft"),
_("Box left face"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "box-right-drawable",
2023-10-30 23:55:30 +01:00
_("Ri_ght"),
_("Box right face"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_DOUBLE (procedure, "x-scale",
_("Scale X"),
_("Box X size"),
0, G_MAXDOUBLE, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "y-scale",
_("Scale Y"),
_("Box Y size"),
0, G_MAXDOUBLE, 0.5,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "z-scale",
_("Scale Z"),
_("Box Z size"),
0, G_MAXDOUBLE, 0.5,
G_PARAM_READWRITE);
/* Cylinder options */
2023-09-26 00:35:21 +02:00
PIKA_PROC_ARG_DRAWABLE (procedure, "cyl-top-drawable",
2023-10-30 23:55:30 +01:00
_("_Top"),
_("Cylinder top face "
"(set this to NULL if not used)"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DRAWABLE (procedure, "cyl-bottom-drawable",
2023-10-30 23:55:30 +01:00
_("_Bottom"),
_("Cylinder bottom face "
"(set this to NULL if not used)"),
2023-09-26 00:35:21 +02:00
TRUE,
G_PARAM_READWRITE);
2023-10-30 23:55:30 +01:00
PIKA_PROC_ARG_DOUBLE (procedure, "cylinder-radius",
_("Radi_us"),
_("Cylinder radius"),
0, G_MAXDOUBLE, 0.25,
G_PARAM_READWRITE);
PIKA_PROC_ARG_DOUBLE (procedure, "cylinder-length",
_("Cylin_der length"),
_("Cylinder length"),
0, G_MAXDOUBLE, 0.25,
G_PARAM_READWRITE);
2023-09-26 00:35:21 +02:00
}
return procedure;
}
static void
set_default_settings (void)
{
gint i;
pika_vector3_set (&mapvals.viewpoint, 0.5, 0.5, 2.0);
pika_vector3_set (&mapvals.firstaxis, 1.0, 0.0, 0.0);
pika_vector3_set (&mapvals.secondaxis, 0.0, 1.0, 0.0);
pika_vector3_set (&mapvals.normal, 0.0, 0.0, 1.0);
pika_vector3_set (&mapvals.position, 0.5, 0.5, 0.0);
pika_vector3_set (&mapvals.lightsource.position, -0.5, -0.5, 2.0);
pika_vector3_set (&mapvals.lightsource.direction, -1.0, -1.0, 1.0);
pika_vector3_set (&mapvals.scale, 0.5, 0.5, 0.5);
mapvals.maptype = MAP_PLANE;
mapvals.pixelthreshold = 0.25;
mapvals.alpha = 0.0;
mapvals.beta = 0.0;
mapvals.gamma = 0.0;
mapvals.maxdepth = 3.0;
mapvals.radius = 0.25;
mapvals.cylinder_radius = 0.25;
mapvals.cylinder_length = 1.0;
mapvals.zoom = 1.0;
mapvals.lightsource.type = POINT_LIGHT;
mapvals.antialiasing = TRUE;
mapvals.create_new_image = FALSE;
mapvals.create_new_layer = FALSE;
mapvals.transparent_background = FALSE;
mapvals.tiled = FALSE;
mapvals.livepreview = FALSE;
mapvals.showgrid = TRUE;
mapvals.lightsource.intensity = 1.0;
pika_rgba_set (&mapvals.lightsource.color, 1.0, 1.0, 1.0, 1.0);
mapvals.material.ambient_int = 0.3;
mapvals.material.diffuse_int = 1.0;
mapvals.material.diffuse_ref = 0.5;
mapvals.material.specular_ref = 0.5;
mapvals.material.highlight = 27.0;
for (i = 0; i < 6; i++)
mapvals.boxmap_id[i] = -1;
for (i = 0; i < 2; i++)
mapvals.cylindermap_id[i] = -1;
}
static void
check_drawables (PikaDrawable *drawable)
{
PikaDrawable *map;
gint i;
/* Check that boxmap images are valid */
/* ================================== */
for (i = 0; i < 6; i++)
{
map = pika_drawable_get_by_id (mapvals.boxmap_id[i]);
if (! map || pika_drawable_is_gray (map))
mapvals.boxmap_id[i] = pika_item_get_id (PIKA_ITEM (drawable));
}
/* Check that cylindermap images are valid */
/* ======================================= */
for (i = 0; i < 2; i++)
{
map = pika_drawable_get_by_id (mapvals.cylindermap_id[i]);
if (! map || pika_drawable_is_gray (map))
mapvals.cylindermap_id[i] = pika_item_get_id (PIKA_ITEM (drawable));
}
}
static PikaValueArray *
map_run (PikaProcedure *procedure,
PikaRunMode run_mode,
PikaImage *_image,
gint n_drawables,
PikaDrawable **drawables,
2023-10-30 23:55:30 +01:00
PikaProcedureConfig *config,
2023-09-26 00:35:21 +02:00
gpointer run_data)
{
PikaDrawable *drawable;
gegl_init (NULL, NULL);
image = _image;
if (n_drawables != 1)
{
GError *error = NULL;
g_set_error (&error, PIKA_PLUG_IN_ERROR, 0,
_("Procedure '%s' only works with one drawable."),
pika_procedure_get_name (procedure));
return pika_procedure_new_return_values (procedure,
PIKA_PDB_CALLING_ERROR,
error);
}
else
{
drawable = drawables[0];
}
set_default_settings ();
switch (run_mode)
{
case PIKA_RUN_INTERACTIVE:
check_drawables (drawable);
2023-10-30 23:55:30 +01:00
if (! main_dialog (procedure, config, drawable))
2023-09-26 00:35:21 +02:00
{
return pika_procedure_new_return_values (procedure,
PIKA_PDB_CANCEL,
NULL);
}
2023-10-30 23:55:30 +01:00
copy_from_config (config);
2023-09-26 00:35:21 +02:00
compute_image ();
break;
case PIKA_RUN_WITH_LAST_VALS:
check_drawables (drawable);
2023-10-30 23:55:30 +01:00
if (! image_setup (drawable, FALSE, config))
2023-09-26 00:35:21 +02:00
{
return pika_procedure_new_return_values (procedure,
PIKA_PDB_SUCCESS,
NULL);
}
2023-10-30 23:55:30 +01:00
copy_from_config (config);
2023-09-26 00:35:21 +02:00
compute_image ();
break;
case PIKA_RUN_NONINTERACTIVE:
check_drawables (drawable);
2023-10-30 23:55:30 +01:00
if (! image_setup (drawable, FALSE, config))
2023-09-26 00:35:21 +02:00
{
return pika_procedure_new_return_values (procedure,
PIKA_PDB_SUCCESS,
NULL);
}
2023-10-30 23:55:30 +01:00
copy_from_config (config);
2023-09-26 00:35:21 +02:00
compute_image ();
break;
}
if (run_mode != PIKA_RUN_NONINTERACTIVE)
pika_displays_flush ();
return pika_procedure_new_return_values (procedure, PIKA_PDB_SUCCESS, NULL);
}