Commit 20f3cba2 authored by Michael Natterer's avatar Michael Natterer 😴

app: rename gimp_image_base_type() to gimp_image_get_base_type()

parent 94da46c3
......@@ -93,7 +93,7 @@ colormap_actions_update (GimpActionGroup *group,
if (image)
{
indexed = gimp_image_base_type (image) == GIMP_INDEXED;
indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
num_colors = gimp_image_get_colormap_size (image);
}
......
......@@ -276,7 +276,7 @@ image_actions_update (GimpActionGroup *group,
GimpContainer *layers;
const gchar *action = NULL;
switch (gimp_image_base_type (image))
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB: action = "image-convert-rgb"; break;
case GIMP_GRAY: action = "image-convert-grayscale"; break;
......@@ -298,7 +298,7 @@ image_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_active (group, action, TRUE);
is_indexed = (gimp_image_base_type (image) == GIMP_INDEXED);
is_indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
is_u8 = (gimp_image_get_precision (image) == GIMP_PRECISION_U8);
aux = (gimp_image_get_active_channel (image) != NULL);
lp = ! gimp_image_is_empty (image);
......
......@@ -165,7 +165,7 @@ image_convert_base_type_cmd_callback (GtkAction *action,
value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (action));
if (value == gimp_image_base_type (image))
if (value == gimp_image_get_base_type (image))
return;
switch (value)
......
......@@ -539,7 +539,7 @@ layers_actions_update (GimpActionGroup *group,
fs = (gimp_image_get_floating_selection (image) != NULL);
ac = (gimp_image_get_active_channel (image) != NULL);
sel = ! gimp_channel_is_empty (gimp_image_get_mask (image));
indexed = (gimp_image_base_type (image) == GIMP_INDEXED);
indexed = (gimp_image_get_base_type (image) == GIMP_INDEXED);
layer = gimp_image_get_active_layer (image);
......
......@@ -49,7 +49,7 @@ gimp_image_convert_precision (GimpImage *image,
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (precision != gimp_image_get_precision (image));
g_return_if_fail (precision == GIMP_PRECISION_U8 ||
gimp_image_base_type (image) != GIMP_INDEXED);
gimp_image_get_base_type (image) != GIMP_INDEXED);
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
all_drawables = g_list_concat (gimp_image_get_layer_list (image),
......
......@@ -752,7 +752,7 @@ gimp_image_convert (GimpImage *image,
gint nth_layer, n_layers;
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (new_type != gimp_image_base_type (image), FALSE);
g_return_val_if_fail (new_type != gimp_image_get_base_type (image), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
......@@ -807,7 +807,7 @@ gimp_image_convert (GimpImage *image,
gimp_image_undo_push_image_type (image, NULL);
/* Set the new base type */
old_type = gimp_image_base_type (image);
old_type = gimp_image_get_base_type (image);
g_object_set (image, "base-type", new_type, NULL);
......
......@@ -90,7 +90,7 @@ gimp_image_duplicate (GimpImage *image)
new_image = gimp_create_image (image->gimp,
gimp_image_get_width (image),
gimp_image_get_height (image),
gimp_image_base_type (image),
gimp_image_get_base_type (image),
gimp_image_get_precision (image),
FALSE);
gimp_image_undo_disable (new_image);
......@@ -178,7 +178,7 @@ static void
gimp_image_duplicate_colormap (GimpImage *image,
GimpImage *new_image)
{
if (gimp_image_base_type (new_image) == GIMP_INDEXED)
if (gimp_image_get_base_type (new_image) == GIMP_INDEXED)
gimp_image_set_colormap (new_image,
gimp_image_get_colormap (image),
gimp_image_get_colormap_size (image),
......
......@@ -303,12 +303,12 @@ gimp_image_scale_check (const GimpImage *image,
g_list_free (drawables);
scalable_size +=
gimp_projection_estimate_memsize (gimp_image_base_type (image),
gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
gimp_image_get_width (image),
gimp_image_get_height (image));
scaled_size +=
gimp_projection_estimate_memsize (gimp_image_base_type (image),
gimp_projection_estimate_memsize (gimp_image_get_base_type (image),
new_width, new_height);
GIMP_LOG (IMAGE_SCALE,
......
......@@ -1225,7 +1225,7 @@ gimp_image_real_colormap_changed (GimpImage *image,
private->n_colors);
}
if (gimp_image_base_type (image) == GIMP_INDEXED)
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
/* A colormap alteration affects the whole image */
gimp_image_invalidate (image,
......@@ -1511,7 +1511,7 @@ gimp_image_new (Gimp *gimp,
}
GimpImageBaseType
gimp_image_base_type (const GimpImage *image)
gimp_image_get_base_type (const GimpImage *image)
{
g_return_val_if_fail (GIMP_IS_IMAGE (image), -1);
......@@ -1567,7 +1567,7 @@ gimp_image_get_layer_format (const GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
return gimp_image_get_format (image,
gimp_image_base_type (image),
gimp_image_get_base_type (image),
gimp_image_get_precision (image),
with_alpha);
}
......@@ -2153,7 +2153,7 @@ gimp_image_get_component_index (const GimpImage *image,
case GIMP_GRAY_CHANNEL: return GRAY;
case GIMP_INDEXED_CHANNEL: return INDEXED;
case GIMP_ALPHA_CHANNEL:
switch (gimp_image_base_type (image))
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB: return ALPHA;
case GIMP_GRAY: return ALPHA_G;
......@@ -2243,7 +2243,7 @@ gimp_image_get_active_mask (const GimpImage *image)
private = GIMP_IMAGE_GET_PRIVATE (image);
switch (gimp_image_base_type (image))
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
mask |= (private->active[RED]) ? GIMP_COMPONENT_RED : 0;
......
......@@ -110,7 +110,7 @@ GimpImage * gimp_image_new (Gimp *gimp,
GimpImageBaseType base_type,
GimpPrecision precision);
GimpImageBaseType gimp_image_base_type (const GimpImage *image);
GimpImageBaseType gimp_image_get_base_type (const GimpImage *image);
GimpPrecision gimp_image_get_precision (const GimpImage *image);
CombinationMode gimp_image_get_combination_mode (GimpImageType dest_type,
gint src_bytes);
......
......@@ -158,7 +158,7 @@ gimp_image_undo_constructed (GObject *object)
switch (GIMP_UNDO (object)->undo_type)
{
case GIMP_UNDO_IMAGE_TYPE:
image_undo->base_type = gimp_image_base_type (image);
image_undo->base_type = gimp_image_get_base_type (image);
break;
case GIMP_UNDO_IMAGE_PRECISION:
......@@ -312,12 +312,12 @@ gimp_image_undo_pop (GimpUndo *undo,
GimpImageBaseType base_type;
base_type = image_undo->base_type;
image_undo->base_type = gimp_image_base_type (image);
image_undo->base_type = gimp_image_get_base_type (image);
g_object_set (image, "base-type", base_type, NULL);
gimp_image_colormap_changed (image, -1);
if (image_undo->base_type != gimp_image_base_type (image))
if (image_undo->base_type != gimp_image_get_base_type (image))
accum->mode_changed = TRUE;
}
break;
......
......@@ -623,7 +623,7 @@ gimp_layer_convert (GimpItem *item,
GimpPrecision new_precision;
old_base_type = gimp_drawable_get_base_type (drawable);
new_base_type = gimp_image_base_type (dest_image);
new_base_type = gimp_image_get_base_type (dest_image);
old_precision = gimp_drawable_get_precision (drawable);
new_precision = gimp_image_get_precision (dest_image);
......
......@@ -411,7 +411,7 @@ gimp_palette_import_from_indexed_image (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (gimp_image_base_type (image) == GIMP_INDEXED, NULL);
g_return_val_if_fail (gimp_image_get_base_type (image) == GIMP_INDEXED, NULL);
g_return_val_if_fail (palette_name != NULL, NULL);
palette = GIMP_PALETTE (gimp_palette_new (context, palette_name));
......
......@@ -367,7 +367,7 @@ gimp_template_set_from_image (GimpTemplate *template,
gimp_image_get_resolution (image, &xresolution, &yresolution);
base_type = gimp_image_base_type (image);
base_type = gimp_image_get_base_type (image);
if (base_type == GIMP_INDEXED)
base_type = GIMP_RGB;
......
......@@ -516,7 +516,7 @@ palette_import_image_changed (GimpContext *context,
palette_import_make_palette (dialog);
if (gimp_image_base_type (image) != GIMP_INDEXED)
if (gimp_image_get_base_type (image) != GIMP_INDEXED)
sensitive = TRUE;
}
......@@ -804,7 +804,7 @@ palette_import_make_palette (ImportDialog *dialog)
gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (dialog->selection_only_toggle));
if (gimp_image_base_type (image) == GIMP_INDEXED)
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
palette = gimp_palette_import_from_indexed_image (image,
dialog->context,
......
......@@ -199,7 +199,7 @@ scale_dialog_new (GimpViewable *viewable,
gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (private->combo),
private->interpolation);
if (gimp_image_base_type (image) == GIMP_INDEXED)
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
{
GtkWidget *box = gimp_message_box_new (GIMP_STOCK_INFO);
......
......@@ -132,7 +132,7 @@ gimp_display_shell_title_image_type (GimpImage *image)
const gchar *name = "";
gimp_enum_get_value (GIMP_TYPE_IMAGE_BASE_TYPE,
gimp_image_base_type (image), NULL, NULL, &name, NULL);
gimp_image_get_base_type (image), NULL, NULL, &name, NULL);
return name;
}
......
......@@ -710,7 +710,7 @@ file_open_profile_apply_rgb (GimpImage *image,
GimpColorConfig *config = image->gimp->config->color_management;
GError *error = NULL;
if (gimp_image_base_type (image) == GIMP_GRAY)
if (gimp_image_get_base_type (image) == GIMP_GRAY)
return;
if (config->mode == GIMP_COLOR_MANAGEMENT_OFF)
......
......@@ -591,7 +591,7 @@ gimp_pdb_image_is_base_type (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_image_base_type (image) == type)
if (gimp_image_get_base_type (image) == type)
return TRUE;
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
......@@ -600,7 +600,7 @@ gimp_pdb_image_is_base_type (GimpImage *image,
gimp_image_get_display_name (image),
gimp_image_get_ID (image),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE,
gimp_image_base_type (image)),
gimp_image_get_base_type (image)),
gimp_pdb_enum_value_get_nick (GIMP_TYPE_IMAGE_BASE_TYPE, type));
return FALSE;
......@@ -614,7 +614,7 @@ gimp_pdb_image_is_not_base_type (GimpImage *image,
g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_image_base_type (image) != type)
if (gimp_image_get_base_type (image) != type)
return TRUE;
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
......
......@@ -294,7 +294,7 @@ image_base_type_invoker (GimpProcedure *procedure,
if (success)
{
base_type = gimp_image_base_type (image);
base_type = gimp_image_get_base_type (image);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
......
......@@ -70,7 +70,7 @@ plug_in_icc_profile_apply_rgb (GimpImage *image,
gimp = image->gimp;
if (gimp_image_base_type (image) == GIMP_GRAY)
if (gimp_image_get_base_type (image) == GIMP_GRAY)
return FALSE;
procedure = gimp_pdb_lookup_procedure (gimp->pdb, ICC_PROFILE_APPLY_RGB_PROC);
......
......@@ -51,7 +51,7 @@
#define HAVE_COLORMAP(image) \
(image != NULL && \
gimp_image_base_type (image) == GIMP_INDEXED && \
gimp_image_get_base_type (image) == GIMP_INDEXED && \
gimp_image_get_colormap (image) != NULL)
......@@ -494,7 +494,7 @@ gimp_colormap_preview_expose (GtkWidget *widget,
gint y;
if (image_editor->image == NULL ||
gimp_image_base_type (image_editor->image) == GIMP_INDEXED)
gimp_image_get_base_type (image_editor->image) == GIMP_INDEXED)
return FALSE;
cr = gdk_cairo_create (event->window);
......
......@@ -338,7 +338,7 @@ gimp_component_editor_create_components (GimpComponentEditor *editor)
GEnumClass *enum_class;
gint i;
switch (gimp_image_base_type (image))
switch (gimp_image_get_base_type (image))
{
case GIMP_RGB:
n_components = 3;
......
......@@ -475,7 +475,7 @@ gimp_image_prop_view_update (GimpImagePropView *view)
gtk_label_set_text (GTK_LABEL (view->resolution_label), buf);
/* color type */
type = gimp_image_base_type (image);
type = gimp_image_get_base_type (image);
gimp_enum_get_value (GIMP_TYPE_IMAGE_BASE_TYPE, type,
NULL, NULL, &desc, NULL);
......
......@@ -466,7 +466,7 @@ xcf_load_image_props (XcfInfo *info,
* just sanity checking to make sure gimp doesn't end up
* with an image state that is impossible.
*/
if (gimp_image_base_type (image) == GIMP_INDEXED)
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
gimp_image_set_colormap (image, cmap, n_colors, FALSE);
}
break;
......
......@@ -259,7 +259,7 @@ xcf_save_image (XcfInfo *info,
value = gimp_image_get_height (image);
xcf_write_int32_check_error (info, (guint32 *) &value, 1);
value = gimp_image_base_type (image);
value = gimp_image_get_base_type (image);
xcf_write_int32_check_error (info, &value, 1);
if (info->file_version >= 4)
......
......@@ -1510,7 +1510,7 @@ HELP
%invoke = (
code => <<'CODE'
{
base_type = gimp_image_base_type (image);
base_type = gimp_image_get_base_type (image);
}
CODE
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment