mirror of https://github.com/GNOME/gimp.git
app, libgimp, pdb, plug-ins: rename gimp_palette_entry_[gs]et_*().
These function names look like they should be applied to a GimpPaletteEntry, which is a type which doesn't exist in libgimp. This naming is much more appropriate.
This commit is contained in:
parent
1b7f8533ee
commit
151cb9c40c
|
@ -324,7 +324,7 @@ palette_delete_entry_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
palette_entry_get_color_invoker (GimpProcedure *procedure,
|
||||
palette_get_entry_color_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
|
@ -360,7 +360,7 @@ palette_entry_get_color_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
palette_entry_set_color_invoker (GimpProcedure *procedure,
|
||||
palette_set_entry_color_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
|
@ -389,7 +389,7 @@ palette_entry_set_color_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
palette_entry_get_name_invoker (GimpProcedure *procedure,
|
||||
palette_get_entry_name_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
|
@ -425,7 +425,7 @@ palette_entry_get_name_invoker (GimpProcedure *procedure,
|
|||
}
|
||||
|
||||
static GimpValueArray *
|
||||
palette_entry_set_name_invoker (GimpProcedure *procedure,
|
||||
palette_set_entry_name_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
|
@ -806,11 +806,11 @@ register_palette_procs (GimpPDB *pdb)
|
|||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-palette-entry-get-color
|
||||
* gimp-palette-get-entry-color
|
||||
*/
|
||||
procedure = gimp_procedure_new (palette_entry_get_color_invoker);
|
||||
procedure = gimp_procedure_new (palette_get_entry_color_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-palette-entry-get-color");
|
||||
"gimp-palette-get-entry-color");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Gets the color of an entry in the palette.",
|
||||
"Returns the color of the entry at the given zero-based index into the palette. Returns %NULL when the index is out of range.",
|
||||
|
@ -844,11 +844,11 @@ register_palette_procs (GimpPDB *pdb)
|
|||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-palette-entry-set-color
|
||||
* gimp-palette-set-entry-color
|
||||
*/
|
||||
procedure = gimp_procedure_new (palette_entry_set_color_invoker);
|
||||
procedure = gimp_procedure_new (palette_set_entry_color_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-palette-entry-set-color");
|
||||
"gimp-palette-set-entry-color");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Sets the color of an entry in the palette.",
|
||||
"Sets the color of the entry at the zero-based index into the palette. Returns an error when the index is out of range. Returns an error when the palette is not editable.",
|
||||
|
@ -882,11 +882,11 @@ register_palette_procs (GimpPDB *pdb)
|
|||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-palette-entry-get-name
|
||||
* gimp-palette-get-entry-name
|
||||
*/
|
||||
procedure = gimp_procedure_new (palette_entry_get_name_invoker);
|
||||
procedure = gimp_procedure_new (palette_get_entry_name_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-palette-entry-get-name");
|
||||
"gimp-palette-get-entry-name");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Gets the name of an entry in the palette.",
|
||||
"Gets the name of the entry at the zero-based index into the palette. Returns an error when the index is out of range.",
|
||||
|
@ -920,11 +920,11 @@ register_palette_procs (GimpPDB *pdb)
|
|||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-palette-entry-set-name
|
||||
* gimp-palette-set-entry-name
|
||||
*/
|
||||
procedure = gimp_procedure_new (palette_entry_set_name_invoker);
|
||||
procedure = gimp_procedure_new (palette_set_entry_name_invoker);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-palette-entry-set-name");
|
||||
"gimp-palette-set-entry-name");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Sets the name of an entry in the palette.",
|
||||
"Sets the name of the entry at the zero-based index into the palette. Returns an error if the index is out or range. Returns an error if the palette is not editable.",
|
||||
|
|
|
@ -662,19 +662,19 @@ EXPORTS
|
|||
gimp_paintbrush_default
|
||||
gimp_palette_add_entry
|
||||
gimp_palette_delete_entry
|
||||
gimp_palette_entry_get_color
|
||||
gimp_palette_entry_get_name
|
||||
gimp_palette_entry_set_color
|
||||
gimp_palette_entry_set_name
|
||||
gimp_palette_get_by_name
|
||||
gimp_palette_get_color_count
|
||||
gimp_palette_get_colormap
|
||||
gimp_palette_get_colors
|
||||
gimp_palette_get_columns
|
||||
gimp_palette_get_entry_color
|
||||
gimp_palette_get_entry_name
|
||||
gimp_palette_get_type
|
||||
gimp_palette_new
|
||||
gimp_palette_set_colormap
|
||||
gimp_palette_set_columns
|
||||
gimp_palette_set_entry_color
|
||||
gimp_palette_set_entry_name
|
||||
gimp_palettes_close_popup
|
||||
gimp_palettes_get_list
|
||||
gimp_palettes_popup
|
||||
|
|
|
@ -355,7 +355,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_palette_entry_get_color:
|
||||
* gimp_palette_get_entry_color:
|
||||
* @palette: The palette.
|
||||
* @entry_num: The index of the entry to get the color of.
|
||||
*
|
||||
|
@ -369,7 +369,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
|
|||
* Since: 2.2
|
||||
**/
|
||||
GeglColor *
|
||||
gimp_palette_entry_get_color (GimpPalette *palette,
|
||||
gimp_palette_get_entry_color (GimpPalette *palette,
|
||||
gint entry_num)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
|
@ -382,7 +382,7 @@ gimp_palette_entry_get_color (GimpPalette *palette,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-palette-entry-get-color",
|
||||
"gimp-palette-get-entry-color",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
|
@ -395,7 +395,7 @@ gimp_palette_entry_get_color (GimpPalette *palette,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_palette_entry_set_color:
|
||||
* gimp_palette_set_entry_color:
|
||||
* @palette: The palette.
|
||||
* @entry_num: The entry to get.
|
||||
* @color: The new color.
|
||||
|
@ -411,7 +411,7 @@ gimp_palette_entry_get_color (GimpPalette *palette,
|
|||
* Since: 2.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_palette_entry_set_color (GimpPalette *palette,
|
||||
gimp_palette_set_entry_color (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
GeglColor *color)
|
||||
{
|
||||
|
@ -426,7 +426,7 @@ gimp_palette_entry_set_color (GimpPalette *palette,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-palette-entry-set-color",
|
||||
"gimp-palette-set-entry-color",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
|
@ -438,7 +438,7 @@ gimp_palette_entry_set_color (GimpPalette *palette,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_palette_entry_get_name:
|
||||
* gimp_palette_get_entry_name:
|
||||
* @palette: The palette.
|
||||
* @entry_num: The entry to get.
|
||||
* @entry_name: (out) (transfer full): The name of the entry.
|
||||
|
@ -453,7 +453,7 @@ gimp_palette_entry_set_color (GimpPalette *palette,
|
|||
* Since: 2.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_palette_entry_get_name (GimpPalette *palette,
|
||||
gimp_palette_get_entry_name (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
gchar **entry_name)
|
||||
{
|
||||
|
@ -467,7 +467,7 @@ gimp_palette_entry_get_name (GimpPalette *palette,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-palette-entry-get-name",
|
||||
"gimp-palette-get-entry-name",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
|
@ -484,7 +484,7 @@ gimp_palette_entry_get_name (GimpPalette *palette,
|
|||
}
|
||||
|
||||
/**
|
||||
* gimp_palette_entry_set_name:
|
||||
* gimp_palette_set_entry_name:
|
||||
* @palette: The palette.
|
||||
* @entry_num: The entry to get.
|
||||
* @entry_name: The new name.
|
||||
|
@ -500,7 +500,7 @@ gimp_palette_entry_get_name (GimpPalette *palette,
|
|||
* Since: 2.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_palette_entry_set_name (GimpPalette *palette,
|
||||
gimp_palette_set_entry_name (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
const gchar *entry_name)
|
||||
{
|
||||
|
@ -515,7 +515,7 @@ gimp_palette_entry_set_name (GimpPalette *palette,
|
|||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-palette-entry-set-name",
|
||||
"gimp-palette-set-entry-name",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
|
|
|
@ -45,15 +45,15 @@ gboolean gimp_palette_add_entry (GimpPalette *palette,
|
|||
gint *entry_num);
|
||||
gboolean gimp_palette_delete_entry (GimpPalette *palette,
|
||||
gint entry_num);
|
||||
GeglColor* gimp_palette_entry_get_color (GimpPalette *palette,
|
||||
GeglColor* gimp_palette_get_entry_color (GimpPalette *palette,
|
||||
gint entry_num);
|
||||
gboolean gimp_palette_entry_set_color (GimpPalette *palette,
|
||||
gboolean gimp_palette_set_entry_color (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
GeglColor *color);
|
||||
gboolean gimp_palette_entry_get_name (GimpPalette *palette,
|
||||
gboolean gimp_palette_get_entry_name (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
gchar **entry_name);
|
||||
gboolean gimp_palette_entry_set_name (GimpPalette *palette,
|
||||
gboolean gimp_palette_set_entry_name (GimpPalette *palette,
|
||||
gint entry_num,
|
||||
const gchar *entry_name);
|
||||
G_GNUC_INTERNAL GBytes* _gimp_palette_get_bytes (GimpPalette *palette,
|
||||
|
|
|
@ -298,7 +298,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub palette_entry_get_color {
|
||||
sub palette_get_entry_color {
|
||||
$blurb = 'Gets the color of an entry in the palette.';
|
||||
|
||||
$help = <<'HELP';
|
||||
|
@ -333,7 +333,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub palette_entry_set_color {
|
||||
sub palette_set_entry_color {
|
||||
$blurb = 'Sets the color of an entry in the palette.';
|
||||
|
||||
$help = <<'HELP';
|
||||
|
@ -364,7 +364,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub palette_entry_get_name {
|
||||
sub palette_get_entry_name {
|
||||
$blurb = 'Gets the name of an entry in the palette.';
|
||||
|
||||
$help = <<'HELP';
|
||||
|
@ -399,7 +399,7 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub palette_entry_set_name {
|
||||
sub palette_set_entry_name {
|
||||
$blurb = 'Sets the name of an entry in the palette.';
|
||||
|
||||
$help = <<'HELP';
|
||||
|
@ -542,8 +542,8 @@ CODE
|
|||
palette_get_colors
|
||||
palette_get_columns palette_set_columns
|
||||
palette_add_entry palette_delete_entry
|
||||
palette_entry_get_color palette_entry_set_color
|
||||
palette_entry_get_name palette_entry_set_name
|
||||
palette_get_entry_color palette_set_entry_color
|
||||
palette_get_entry_name palette_set_entry_name
|
||||
palette_get_bytes palette_set_bytes);
|
||||
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
|
|
@ -721,7 +721,7 @@ real_remap (GimpImage *image)
|
|||
{
|
||||
gint new_index = index_map_old_new[i];
|
||||
pixmap[new_index] = i;
|
||||
gimp_palette_entry_set_color (palette, i, colors[new_index]);
|
||||
gimp_palette_set_entry_color (palette, i, colors[new_index]);
|
||||
}
|
||||
gimp_color_array_free (colors);
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ get_samples_palette (GimpDrawable *drawable)
|
|||
d_samp = &d_samples[i * nb_chan];
|
||||
pal_entry = CLAMP ((int)(i * factor), 0, num_colors - 1);
|
||||
|
||||
color_sample = gimp_palette_entry_get_color (palette, pal_entry);
|
||||
color_sample = gimp_palette_get_entry_color (palette, pal_entry);
|
||||
gegl_color_get_pixel (color_sample, format, d_samp);
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ ico_create_palette (GimpPalette *reduced_cmap,
|
|||
GeglColor *color;
|
||||
guchar rgb[3];
|
||||
|
||||
color = gimp_palette_entry_get_color (reduced_cmap, i);
|
||||
color = gimp_palette_get_entry_color (reduced_cmap, i);
|
||||
gegl_color_get_pixel (color, format, rgb);
|
||||
|
||||
palette[i * 4 + 2] = rgb[0];
|
||||
|
@ -694,7 +694,7 @@ ico_cmap_contains_black (GimpPalette *cmap)
|
|||
|
||||
for (i = 0; i < num_colors; i++)
|
||||
{
|
||||
GeglColor *color = gimp_palette_entry_get_color (cmap, i);
|
||||
GeglColor *color = gimp_palette_get_entry_color (cmap, i);
|
||||
guchar rgb[3];
|
||||
|
||||
gegl_color_get_pixel (color, format, rgb);
|
||||
|
|
Loading…
Reference in New Issue