Commit f180a171 authored by Michael Natterer's avatar Michael Natterer 😴

pdb: remove all deprecated procedures

parent 9525c646
......@@ -39,14 +39,12 @@ libappinternal_procs_a_SOURCES = \
brushes-cmds.c \
buffer-cmds.c \
channel-cmds.c \
color-cmds.c \
context-cmds.c \
debug-cmds.c \
display-cmds.c \
drawable-cmds.c \
drawable-color-cmds.c \
drawable-edit-cmds.c \
drawable-transform-cmds.c \
dynamics-cmds.c \
edit-cmds.c \
fileops-cmds.c \
......@@ -76,7 +74,6 @@ libappinternal_procs_a_SOURCES = \
palette-cmds.c \
palette-select-cmds.c \
palettes-cmds.c \
paths-cmds.c \
pattern-cmds.c \
pattern-select-cmds.c \
patterns-cmds.c \
......@@ -85,9 +82,7 @@ libappinternal_procs_a_SOURCES = \
procedural-db-cmds.c \
progress-cmds.c \
selection-cmds.c \
selection-tools-cmds.c \
text-layer-cmds.c \
text-tool-cmds.c \
transform-tools-cmds.c \
unit-cmds.c \
vectors-cmds.c
......@@ -90,166 +90,6 @@ brushes_get_list_invoker (GimpProcedure *procedure,
return return_vals;
}
static GimpValueArray *
brushes_get_brush_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gchar *name = NULL;
gint32 width = 0;
gint32 height = 0;
gint32 spacing = 0;
GimpBrush *brush = gimp_context_get_brush (context);
if (brush)
{
name = g_strdup (gimp_object_get_name (brush));
width = gimp_brush_get_width (brush);
height = gimp_brush_get_height (brush);
spacing = gimp_brush_get_spacing (brush);
}
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
{
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 GimpValueArray *
brushes_get_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
gint32 spacing = 0;
GimpBrush *brush = gimp_context_get_brush (context);
if (brush)
spacing = gimp_brush_get_spacing (brush);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
g_value_set_int (gimp_value_array_index (return_vals, 1), spacing);
return return_vals;
}
static GimpValueArray *
brushes_set_spacing_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
gint32 spacing;
spacing = g_value_get_int (gimp_value_array_index (args, 0));
if (success)
{
gimp_brush_set_spacing (gimp_context_get_brush (context), spacing);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
brushes_get_brush_data_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpValueArray *return_vals;
const gchar *name;
gchar *actual_name = NULL;
gdouble opacity = 0.0;
gint32 spacing = 0;
gint32 paint_mode = 0;
gint32 width = 0;
gint32 height = 0;
gint32 length = 0;
guint8 *mask_data = NULL;
name = g_value_get_string (gimp_value_array_index (args, 0));
if (success)
{
GimpBrush *brush;
if (paint_mode == GIMP_LAYER_MODE_OVERLAY_LEGACY)
paint_mode = GIMP_LAYER_MODE_SOFTLIGHT_LEGACY;
if (name && strlen (name))
brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
else
brush = gimp_context_get_brush (context);
if (brush)
{
GimpTempBuf *mask = gimp_brush_get_mask (brush);
actual_name = g_strdup (gimp_object_get_name (brush));
opacity = 1.0;
spacing = gimp_brush_get_spacing (brush);
paint_mode = 0;
width = gimp_brush_get_width (brush);
height = gimp_brush_get_height (brush);
length = gimp_temp_buf_get_data_size (mask);
mask_data = g_memdup (gimp_temp_buf_get_data (mask), length);
}
else
success = FALSE;
}
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
{
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;
}
void
register_brushes_procs (GimpPDB *pdb)
{
......@@ -306,165 +146,4 @@ register_brushes_procs (GimpPDB *pdb)
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-brushes-get-brush
*/
procedure = gimp_procedure_new (brushes_get_brush_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-brushes-get-brush");
gimp_procedure_set_static_strings (procedure,
"gimp-brushes-get-brush",
"Deprecated: Use 'gimp-context-get-brush' instead.",
"Deprecated: Use 'gimp-context-get-brush' instead.",
"",
"",
"",
"gimp-context-get-brush");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("width",
"width",
"The brush width",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("height",
"height",
"The brush height",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-brushes-get-spacing
*/
procedure = gimp_procedure_new (brushes_get_spacing_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-brushes-get-spacing");
gimp_procedure_set_static_strings (procedure,
"gimp-brushes-get-spacing",
"Deprecated: Use 'gimp-brush-get-spacing' instead.",
"Deprecated: Use 'gimp-brush-get-spacing' instead.",
"",
"",
"",
"gimp-brush-get-spacing");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-brushes-set-spacing
*/
procedure = gimp_procedure_new (brushes_set_spacing_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-brushes-set-spacing");
gimp_procedure_set_static_strings (procedure,
"gimp-brushes-set-spacing",
"Deprecated: Use 'gimp-brush-set-spacing' instead.",
"Deprecated: Use 'gimp-brush-set-spacing' instead.",
"",
"",
"",
"gimp-brush-set-spacing");
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-brushes-get-brush-data
*/
procedure = gimp_procedure_new (brushes_get_brush_data_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-brushes-get-brush-data");
gimp_procedure_set_static_strings (procedure,
"gimp-brushes-get-brush-data",
"Deprecated: Use 'gimp-brush-get-pixels' instead.",
"Deprecated: Use 'gimp-brush-get-pixels' instead.",
"",
"",
"",
"gimp-brush-get-pixels");
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("name",
"name",
"The brush name (\"\" means current active brush)",
FALSE, TRUE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The brush name",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
"opacity",
"The brush opacity",
0, 100, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("spacing",
"spacing",
"The brush spacing",
0, 1000, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_enum ("paint-mode",
"paint mode",
"The paint mode",
GIMP_TYPE_LAYER_MODE,
GIMP_LAYER_MODE_NORMAL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("width",
"width",
"The brush width",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("height",
"height",
"The brush height",
G_MININT32, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("length",
"length",
"Length of brush mask data",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int8_array ("mask-data",
"mask data",
"The brush mask data",
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
This diff is collapsed.
......@@ -2514,41 +2514,6 @@ context_set_transform_resize_invoker (GimpProcedure *procedure,
error ? *error : NULL);
}
static GimpValueArray *
context_get_transform_recursion_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
GimpValueArray *return_vals;
gint32 transform_recursion = 0;
transform_recursion = 3;
return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
g_value_set_int (gimp_value_array_index (return_vals, 1), transform_recursion);
return return_vals;
}
static GimpValueArray *
context_set_transform_recursion_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
if (success)
{
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
context_get_ink_size_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -5334,52 +5299,6 @@ register_context_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-transform-recursion
*/
procedure = gimp_procedure_new (context_get_transform_recursion_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-get-transform-recursion");
gimp_procedure_set_static_strings (procedure,
"gimp-context-get-transform-recursion",
"Deprecated: There is no replacement for this procedure.",
"Deprecated: There is no replacement for this procedure.",
"",
"",
"",
"NONE");
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("transform-recursion",
"transform recursion",
"This returns always 3 and is meaningless",
1, G_MAXINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-set-transform-recursion
*/
procedure = gimp_procedure_new (context_set_transform_recursion_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-context-set-transform-recursion");
gimp_procedure_set_static_strings (procedure,
"gimp-context-set-transform-recursion",
"Deprecated: There is no replacement for this procedure.",
"Deprecated: There is no replacement for this procedure.",
"",
"",
"",
"NONE");
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("transform-recursion",
"transform recursion",
"This parameter is ignored",
1, G_MAXINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-context-get-ink-size
*/
......
......@@ -390,31 +390,6 @@ drawable_offsets_invoker (GimpProcedure *procedure,
return return_vals;
}
static GimpValueArray *
drawable_set_image_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpDrawable *drawable;
GimpImage *image;
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)
{
if (image != gimp_item_get_image (GIMP_ITEM (drawable)))
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
drawable_mask_bounds_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -1318,35 +1293,6 @@ register_drawable_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-drawable-set-image
*/
procedure = gimp_procedure_new (drawable_set_image_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-drawable-set-image");
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-set-image",
"Deprecated: There is no replacement for this procedure.",
"Deprecated: There is no replacement for this procedure.",
"",
"",
"",
"NONE");
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-drawable-mask-bounds
*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -171,38 +171,6 @@ floating_sel_attach_invoker (GimpProcedure *procedure,
error ? *error : NULL);
}
static GimpValueArray *
floating_sel_rigor_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
if (success)
{
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
floating_sel_relax_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
if (success)
{
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
void
register_floating_sel_procs (GimpPDB *pdb)
{
......@@ -305,62 +273,4 @@ register_floating_sel_procs (GimpPDB *pdb)
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-floating-sel-rigor
*/
procedure = gimp_procedure_new (floating_sel_rigor_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-floating-sel-rigor");
gimp_procedure_set_static_strings (procedure,
"gimp-floating-sel-rigor",
"Deprecated: There is no replacement for this procedure.",
"Deprecated: There is no replacement for this procedure.",
"",
"",
"",
"NONE");
gimp_procedure_add_argument (procedure,
gimp_param_spec_layer_id ("floating-sel",
"floating sel",
"The floating selection",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("undo",
"undo",
"",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-floating-sel-relax
*/
procedure = gimp_procedure_new (floating_sel_relax_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-floating-sel-relax");
gimp_procedure_set_static_strings (procedure,
"gimp-floating-sel-relax",
"Deprecated: There is no replacement for this procedure.",
"Deprecated: There is no replacement for this procedure.",
"",
"",
"",
"NONE");
gimp_procedure_add_argument (procedure,
gimp_param_spec_layer_id ("floating-sel",
"floating sel",
"The floating selection",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("undo",
"undo",
"",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
}
This diff is collapsed.
This diff is collapsed.
......@@ -133,40 +133,6 @@ image_scale_invoker (GimpProcedure *procedure,
error ? *error : NULL);
}
static GimpValueArray *
image_scale_full_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GimpValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpImage *image;
gint32 new_width;
gint32 new_height;
gint32 interpolation;
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)
{
if (progress)
gimp_progress_start (progress, FALSE, _("Scaling"));
gimp_image_scale (image, new_width, new_height, interpolation, progress);
if (progress)
gimp_progress_end (progress);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GimpValueArray *
image_crop_invoker (GimpProcedure *procedure,
Gimp *gimp,
......@@ -369,48 +335,6 @@ register_image_transform_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-image-scale-full
*/
procedure = gimp_procedure_new (image_scale_full_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-scale-full");
gimp_procedure_set_static_strings (procedure,
"gimp-image-scale-full",
"Deprecated: Use 'gimp-image-scale' instead.",
"Deprecated: Use 'gimp-image-scale' instead.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2008",
"gimp-image-scale");
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp, FALSE,
<