mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
app, pdb: get rid of const object pointer in generated PDB code, and
adapt some core functions accordingly. Const object pointer make no sense at all.
This commit is contained in:
@@ -872,7 +872,7 @@ gimp_drawable_filter_update (GimpDrawableFilter *filter,
|
||||
GimpLayerColorSpace composite_space,
|
||||
GimpLayerCompositeMode composite_mode,
|
||||
const gchar **auxinputnames,
|
||||
const GimpDrawable **auxinputs,
|
||||
GimpDrawable **auxinputs,
|
||||
GError **error)
|
||||
{
|
||||
GimpImage *image;
|
||||
|
@@ -124,7 +124,7 @@ gboolean gimp_drawable_filter_update (GimpDrawableFilter *filter,
|
||||
GimpLayerColorSpace composite_space,
|
||||
GimpLayerCompositeMode composite_mode,
|
||||
const gchar **auxinputnames,
|
||||
const GimpDrawable **auxinputs,
|
||||
GimpDrawable **auxinputs,
|
||||
GError **error);
|
||||
gboolean gimp_drawable_filter_get_add_alpha (GimpDrawableFilter *filter);
|
||||
void gimp_drawable_filter_set_add_alpha (GimpDrawableFilter *filter,
|
||||
|
@@ -361,8 +361,8 @@ gimp_image_item_list_get_list (GimpImage *image,
|
||||
}
|
||||
|
||||
static GList *
|
||||
gimp_image_item_list_remove_children (GList *list,
|
||||
const GimpItem *parent)
|
||||
gimp_image_item_list_remove_children (GList *list,
|
||||
GimpItem *parent)
|
||||
{
|
||||
GList *l = list;
|
||||
|
||||
|
@@ -359,7 +359,7 @@ drawable_filter_update_invoker (GimpProcedure *procedure,
|
||||
gint composite_mode;
|
||||
gint composite_space;
|
||||
const gchar **auxinputnames;
|
||||
const GimpDrawable **auxinputs;
|
||||
GimpDrawable **auxinputs;
|
||||
|
||||
filter = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
propnames = g_value_get_boxed (gimp_value_array_index (args, 1));
|
||||
|
@@ -60,7 +60,7 @@ edit_cut_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
gboolean non_empty = FALSE;
|
||||
|
||||
drawables = g_value_get_boxed (gimp_value_array_index (args, 0));
|
||||
@@ -137,7 +137,7 @@ edit_copy_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
gboolean non_empty = FALSE;
|
||||
|
||||
drawables = g_value_get_boxed (gimp_value_array_index (args, 0));
|
||||
@@ -343,7 +343,7 @@ edit_named_cut_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
const gchar *buffer_name;
|
||||
gchar *real_name = NULL;
|
||||
|
||||
@@ -427,7 +427,7 @@ edit_named_copy_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
const gchar *buffer_name;
|
||||
gchar *real_name = NULL;
|
||||
|
||||
|
@@ -621,7 +621,7 @@ image_pick_color_invoker (GimpProcedure *procedure,
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
gboolean sample_merged;
|
||||
@@ -1926,7 +1926,7 @@ image_set_selected_layers_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
const GimpLayer **layers;
|
||||
GimpLayer **layers;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
layers = g_value_get_boxed (gimp_value_array_index (args, 1));
|
||||
@@ -1995,7 +1995,7 @@ image_set_selected_channels_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
const GimpChannel **channels;
|
||||
GimpChannel **channels;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
channels = g_value_get_boxed (gimp_value_array_index (args, 1));
|
||||
@@ -2064,7 +2064,7 @@ image_set_selected_paths_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *image;
|
||||
const GimpPath **paths;
|
||||
GimpPath **paths;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
paths = g_value_get_boxed (gimp_value_array_index (args, 1));
|
||||
|
@@ -197,7 +197,7 @@ selection_float_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
const GimpDrawable **drawables;
|
||||
GimpDrawable **drawables;
|
||||
gint offx;
|
||||
gint offy;
|
||||
GimpLayer *layer = NULL;
|
||||
|
34
pdb/pdb.pl
34
pdb/pdb.pl
@@ -123,6 +123,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpImage **',
|
||||
const_type => 'const GimpImage **',
|
||||
app_const_type => 'GimpImage **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpImage) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpImage) (array zero-terminated=1) (transfer container)',
|
||||
@@ -135,6 +136,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpItem **',
|
||||
const_type => 'const GimpItem **',
|
||||
app_const_type => 'GimpItem **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpItem) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpItem) (array zero-terminated=1) (transfer container)',
|
||||
@@ -147,6 +149,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpDrawable **',
|
||||
const_type => 'const GimpDrawable **',
|
||||
app_const_type => 'GimpDrawable **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpDrawable) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpDrawable) (array zero-terminated=1) (transfer container)',
|
||||
@@ -159,6 +162,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpLayer **',
|
||||
const_type => 'const GimpLayer **',
|
||||
app_const_type => 'GimpLayer **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpLayer) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpLayer) (array zero-terminated=1) (transfer container)',
|
||||
@@ -167,12 +171,13 @@ package Gimp::CodeGen::pdb;
|
||||
set_value_func => 'g_value_set_boxed ($value, $var)',
|
||||
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
||||
|
||||
channelarray => { name => 'CHANNELARRAY',
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpChannel **',
|
||||
const_type => 'const GimpChannel **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpChannel) (array zero-terminated=1)',
|
||||
channelarray => { name => 'CHANNELARRAY',
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpChannel **',
|
||||
const_type => 'const GimpChannel **',
|
||||
app_const_type => 'GimpChannel **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpChannel) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpChannel) (array zero-terminated=1) (transfer container)',
|
||||
get_value_func => '$var = g_value_get_boxed ($value)',
|
||||
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
||||
@@ -180,11 +185,12 @@ package Gimp::CodeGen::pdb;
|
||||
take_value_func => 'g_value_take_boxed ($value, $var)' },
|
||||
|
||||
patharray => { name => 'PATHARRAY',
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpPath **',
|
||||
const_type => 'const GimpPath **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpPath) (array zero-terminated=1)',
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpPath **',
|
||||
const_type => 'const GimpPath **',
|
||||
app_const_type => 'GimpPath **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpPath) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpPath) (array zero-terminated=1) (transfer container)',
|
||||
get_value_func => '$var = g_value_get_boxed ($value)',
|
||||
dup_value_func => '$var = g_value_dup_boxed (gimp_value_array_index ($value))',
|
||||
@@ -195,6 +201,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpDrawableFilter **',
|
||||
const_type => 'const GimpDrawableFilter **',
|
||||
app_const_type => 'GimpDrawableFilter **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpDrawableFilter) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpDrawableFilter) (array zero-terminated=1) (transfer container)',
|
||||
@@ -207,6 +214,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpResource **',
|
||||
const_type => 'const GimpResource **',
|
||||
app_const_type => 'GimpResource **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpResource) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpResource) (array zero-terminated=1) (transfer container)',
|
||||
@@ -231,6 +239,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpFont **',
|
||||
const_type => 'const GimpFont **',
|
||||
app_const_type => 'GimpFont **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpFont) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpFont) (array zero-terminated=1) (transfer container)',
|
||||
@@ -243,6 +252,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpGradient **',
|
||||
const_type => 'const GimpGradient **',
|
||||
app_const_type => 'GimpGradient **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpGradient) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpGradient) (array zero-terminated=1) (transfer container)',
|
||||
@@ -255,6 +265,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpPalette **',
|
||||
const_type => 'const GimpPalette **',
|
||||
app_const_type => 'GimpPalette **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpPalette) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpPalette) (array zero-terminated=1) (transfer container)',
|
||||
@@ -267,6 +278,7 @@ package Gimp::CodeGen::pdb;
|
||||
gtype => 'GIMP_TYPE_CORE_OBJECT_ARRAY',
|
||||
type => 'GimpPattern **',
|
||||
const_type => 'const GimpPattern **',
|
||||
app_const_type => 'GimpPattern **',
|
||||
init_value => 'NULL',
|
||||
in_annotate => '(element-type GimpPattern) (array zero-terminated=1)',
|
||||
out_annotate => '(element-type GimpPattern) (array zero-terminated=1) (transfer container)',
|
||||
|
Reference in New Issue
Block a user