Commit ec40ac72 authored by Marc Lehmann's avatar Marc Lehmann

API PATCH #2 or so

parent 0975e3da
Sun Oct 17 00:55:38 CEST 1999 Marc Lehmann <marc@gimp.org>
* (221 files): Corrected ~20 pdb function names by choosing the
class/selector syntax over the various other syntaxes floating
around. Maybe more to come before 1.2.
1999-10-16 Michael Natterer <mitch@gimp.org>
* app/gimprc.c: preview_size_to_str() uses the new set of preview
......
......@@ -189,7 +189,7 @@ curves_colour_update (Tool *tool,
return;
sample_type = gimp_drawable_type(drawable);
is_indexed = gimp_drawable_indexed (drawable);
is_indexed = gimp_drawable_is_indexed (drawable);
has_alpha = TYPE_HAS_ALPHA(sample_type);
curves_dialog->col_value[HISTOGRAM_RED] = color[RED_PIX];
......
......@@ -44,7 +44,7 @@ batch_init ()
/* until --batch-interp=xxx or something similar is implemented
* and gimp-1.0 is not extinct use a shortcut to speed up starting the
* perl-server tremendously. This is also fully compatible to 1.0.
* perl-server tremendously. This is also fully compatible with 1.0.
*/
{
int run_mode, flags, extra;
......
......@@ -91,7 +91,7 @@ brightness_contrast_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
success = FALSE;
else
{
......@@ -207,8 +207,8 @@ levels_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable) ||
(gimp_drawable_gray (drawable) && channel != GRAY_LUT))
if (gimp_drawable_is_indexed (drawable) ||
(gimp_drawable_is_gray (drawable) && channel != GRAY_LUT))
success = FALSE;
else
{
......@@ -328,7 +328,7 @@ posterize_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
success = FALSE;
else
{
......@@ -447,7 +447,7 @@ equalize_invoker (Argument *args)
if (success)
{
if (! gimp_drawable_indexed (drawable))
if (! gimp_drawable_is_indexed (drawable))
equalize (drawable_gimage (drawable), drawable, mask_only);
else
success = FALSE;
......@@ -498,7 +498,7 @@ invert_invoker (Argument *args)
if (success)
{
if (! gimp_drawable_indexed (drawable))
if (! gimp_drawable_is_indexed (drawable))
invert (drawable);
else
success = FALSE;
......@@ -561,8 +561,8 @@ curves_spline_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable) || (num_points & 1) ||
(gimp_drawable_gray (drawable) && channel != GRAY_LUT))
if (gimp_drawable_is_indexed (drawable) || (num_points & 1) ||
(gimp_drawable_is_gray (drawable) && channel != GRAY_LUT))
success = FALSE;
else
{
......@@ -680,8 +680,8 @@ curves_explicit_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable) || (num_bytes != 256) ||
(gimp_drawable_gray (drawable) && channel != GRAY_LUT))
if (gimp_drawable_is_indexed (drawable) || (num_bytes != 256) ||
(gimp_drawable_is_gray (drawable) && channel != GRAY_LUT))
success = FALSE;
else
{
......@@ -799,7 +799,7 @@ color_balance_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
success = FALSE;
else
{
......@@ -921,8 +921,8 @@ histogram_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable) ||
(gimp_drawable_gray (drawable) && channel != GRAY_LUT))
if (gimp_drawable_is_indexed (drawable) ||
(gimp_drawable_is_gray (drawable) && channel != GRAY_LUT))
success = FALSE;
else
{
......@@ -1089,7 +1089,7 @@ hue_saturation_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
success = FALSE;
else
{
......@@ -1197,7 +1197,7 @@ threshold_invoker (Argument *args)
if (success)
{
if (gimp_drawable_indexed (drawable) || (low_threshold >= high_threshold))
if (gimp_drawable_is_indexed (drawable) || (low_threshold >= high_threshold))
success = FALSE;
else
{
......
......@@ -487,7 +487,7 @@ pick_color_do (GimpImage *gimage,
y -= offy;
sample_type = gimp_drawable_type (drawable);
is_indexed = gimp_drawable_indexed (drawable);
is_indexed = gimp_drawable_is_indexed (drawable);
get_color_func = (GetColorFunc) gimp_drawable_get_color_at;
get_color_obj = GTK_OBJECT (drawable);
......
......@@ -42,19 +42,19 @@ gimp_init_parasites()
}
void
gimp_attach_parasite (Parasite *p)
gimp_parasite_attach (Parasite *p)
{
parasite_list_add(parasites, p);
}
void
gimp_detach_parasite (const char *name)
gimp_parasite_detach (const char *name)
{
parasite_list_remove(parasites, name);
}
Parasite *
gimp_find_parasite (const char *name)
gimp_parasite_find (const char *name)
{
return parasite_list_find(parasites, name);
}
......
......@@ -21,9 +21,9 @@
#include "libgimp/parasiteF.h"
void gimp_init_parasites (void);
void gimp_attach_parasite (Parasite *p);
void gimp_detach_parasite (const char *name);
Parasite * gimp_find_parasite (const char *name);
void gimp_parasite_attach (Parasite *p);
void gimp_parasite_detach (const char *name);
Parasite * gimp_parasite_find (const char *name);
char ** gimp_parasite_list (gint *count);
void gimp_parasiterc_save (void);
void gimp_parasiterc_load (void);
......
......@@ -31,7 +31,7 @@ image_equalize (GimpImage *gimage)
drawable = gimage_active_drawable (gimage);
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
{
g_message (_("Equalize does not operate on indexed drawables."));
return;
......
......@@ -38,7 +38,7 @@ image_invert (GimpImage *gimage)
drawable = gimage_active_drawable (gimage);
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
{
g_message (_("Invert does not operate on indexed drawables."));
return;
......
......@@ -407,7 +407,7 @@ gimp_drawable_get_color_at (GimpDrawable *drawable,
guchar *dest;
if (!drawable ||
(!gimp_drawable_gimage (drawable) && gimp_drawable_indexed (drawable))
(!gimp_drawable_gimage (drawable) && gimp_drawable_is_indexed (drawable))
|| x < 0 || y < 0 ||
x >= drawable->width || y >= drawable->height)
{
......@@ -423,7 +423,7 @@ gimp_drawable_get_color_at (GimpDrawable *drawable,
dest[3] = src[gimp_drawable_bytes (drawable) - 1];
else
dest[3] = 255;
if (gimp_drawable_indexed (drawable))
if (gimp_drawable_is_indexed (drawable))
dest[4] = src[0];
else
dest[4] = 0;
......@@ -432,7 +432,7 @@ gimp_drawable_get_color_at (GimpDrawable *drawable,
}
Parasite *
gimp_drawable_find_parasite (const GimpDrawable *drawable,
gimp_drawable_parasite_find (const GimpDrawable *drawable,
const gchar *name)
{
return parasite_list_find (drawable->parasites, name);
......@@ -461,7 +461,7 @@ gimp_drawable_parasite_list (GimpDrawable *drawable,
}
void
gimp_drawable_attach_parasite (GimpDrawable *drawable,
gimp_drawable_parasite_attach (GimpDrawable *drawable,
Parasite *parasite)
{
/* only set the dirty bit manually if we can be saved and the new
......@@ -475,7 +475,7 @@ gimp_drawable_attach_parasite (GimpDrawable *drawable,
}
else if (parasite_is_persistent(parasite) &&
!parasite_compare( parasite,
gimp_drawable_find_parasite
gimp_drawable_parasite_find
(drawable, parasite_name (parasite))))
undo_push_cantundo (drawable->gimage, _("parasite attach to drawable"));
......@@ -483,13 +483,13 @@ gimp_drawable_attach_parasite (GimpDrawable *drawable,
if (parasite_has_flag (parasite, PARASITE_ATTACH_PARENT))
{
parasite_shift_parent (parasite);
gimp_image_attach_parasite (drawable->gimage, parasite);
gimp_image_parasite_attach (drawable->gimage, parasite);
}
else if (parasite_has_flag (parasite, PARASITE_ATTACH_GRANDPARENT))
{
parasite_shift_parent (parasite);
parasite_shift_parent (parasite);
gimp_attach_parasite (parasite);
gimp_parasite_attach (parasite);
}
if (parasite_is_undoable (parasite))
{
......@@ -498,7 +498,7 @@ gimp_drawable_attach_parasite (GimpDrawable *drawable,
}
void
gimp_drawable_detach_parasite (GimpDrawable *drawable,
gimp_drawable_parasite_detach (GimpDrawable *drawable,
const gchar *parasite)
{
Parasite *p;
......@@ -532,7 +532,7 @@ gimp_drawable_color (GimpDrawable *drawable)
}
gboolean
gimp_drawable_gray (GimpDrawable *drawable)
gimp_drawable_is_gray (GimpDrawable *drawable)
{
if (gimp_drawable_type (drawable) == GRAYA_GIMAGE ||
gimp_drawable_type (drawable) == GRAY_GIMAGE)
......@@ -542,7 +542,7 @@ gimp_drawable_gray (GimpDrawable *drawable)
}
gboolean
gimp_drawable_indexed (GimpDrawable *drawable)
gimp_drawable_is_indexed (GimpDrawable *drawable)
{
if (gimp_drawable_type (drawable) == INDEXEDA_GIMAGE ||
gimp_drawable_type (drawable) == INDEXED_GIMAGE)
......
......@@ -51,8 +51,8 @@ gboolean gimp_drawable_has_alpha (GimpDrawable *);
GimpImageType gimp_drawable_type (GimpDrawable *);
GimpImageType gimp_drawable_type_with_alpha (GimpDrawable *);
gboolean gimp_drawable_color (GimpDrawable *);
gboolean gimp_drawable_gray (GimpDrawable *);
gboolean gimp_drawable_indexed (GimpDrawable *);
gboolean gimp_drawable_is_gray (GimpDrawable *);
gboolean gimp_drawable_is_indexed (GimpDrawable *);
TileManager * gimp_drawable_data (GimpDrawable *);
TileManager * gimp_drawable_shadow (GimpDrawable *);
gint gimp_drawable_bytes (GimpDrawable *);
......@@ -69,12 +69,10 @@ void gimp_drawable_set_name (GimpDrawable *, gchar *);
guchar * gimp_drawable_get_color_at (GimpDrawable *,
gint x, gint y);
Parasite * gimp_drawable_find_parasite (const GimpDrawable *,
const gchar *name);
void gimp_drawable_attach_parasite (GimpDrawable *, Parasite *);
void gimp_drawable_detach_parasite (GimpDrawable *,
void gimp_drawable_parasite_attach (GimpDrawable *, Parasite *);
void gimp_drawable_parasite_detach (GimpDrawable *,
const gchar *);
Parasite * gimp_drawable_find_parasite (const GimpDrawable *,
Parasite * gimp_drawable_parasite_find (const GimpDrawable *,
const gchar *);
gchar ** gimp_drawable_parasite_list (GimpDrawable *drawable,
gint *count);
......
......@@ -1079,7 +1079,7 @@ gimp_image_delete_guide (GimpImage *gimage,
Parasite *
gimp_image_find_parasite (const GimpImage *gimage,
gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name)
{
return parasite_list_find (gimage->parasites, name);
......@@ -1108,7 +1108,7 @@ gimp_image_parasite_list (GimpImage *image,
}
void
gimp_image_attach_parasite (GimpImage *gimage,
gimp_image_parasite_attach (GimpImage *gimage,
Parasite *parasite)
{
/* only set the dirty bit manually if we can be saved and the new
......@@ -1117,7 +1117,7 @@ gimp_image_attach_parasite (GimpImage *gimage,
undo_push_image_parasite (gimage, parasite);
if (parasite_is_persistent (parasite)
&& !parasite_compare (parasite,
gimp_image_find_parasite(gimage,
gimp_image_parasite_find(gimage,
parasite_name(parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
......@@ -1126,12 +1126,12 @@ gimp_image_attach_parasite (GimpImage *gimage,
if (parasite_has_flag (parasite, PARASITE_ATTACH_PARENT))
{
parasite_shift_parent (parasite);
gimp_attach_parasite (parasite);
gimp_parasite_attach (parasite);
}
}
void
gimp_image_detach_parasite (GimpImage *gimage,
gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite)
{
Parasite *p;
......@@ -3149,7 +3149,7 @@ gimp_image_filename (GimpImage *gimage)
}
gboolean
gimp_image_freeze_undo (GimpImage *gimage)
gimp_image_undo_freeze (GimpImage *gimage)
{
gimage->undo_on = FALSE;
......@@ -3157,7 +3157,7 @@ gimp_image_freeze_undo (GimpImage *gimage)
}
gboolean
gimp_image_thaw_undo (GimpImage *gimage)
gimp_image_undo_thaw (GimpImage *gimage)
{
gimage->undo_on = TRUE;
......@@ -3165,18 +3165,18 @@ gimp_image_thaw_undo (GimpImage *gimage)
}
gboolean
gimp_image_disable_undo (GimpImage *gimage)
gimp_image_undo_disable (GimpImage *gimage)
{
return gimp_image_freeze_undo (gimage);
return gimp_image_undo_freeze (gimage);
}
gboolean
gimp_image_enable_undo (GimpImage *gimage)
gimp_image_undo_enable (GimpImage *gimage)
{
/* Free all undo steps as they are now invalidated */
undo_free (gimage);
return gimp_image_thaw_undo (gimage);
return gimp_image_undo_thaw (gimage);
}
void
......
......@@ -160,12 +160,12 @@ void gimp_image_add_guide (GimpImage *, Guide *);
void gimp_image_remove_guide (GimpImage *, Guide *);
void gimp_image_delete_guide (GimpImage *, Guide *);
Parasite * gimp_image_find_parasite (const GimpImage *,
Parasite * gimp_image_parasite_find (const GimpImage *,
const gchar *name);
gchar ** gimp_image_parasite_list (GimpImage *image,
gint *count);
void gimp_image_attach_parasite (GimpImage *, Parasite *);
void gimp_image_detach_parasite (GimpImage *, const gchar *);
void gimp_image_parasite_attach (GimpImage *, Parasite *);
void gimp_image_parasite_detach (GimpImage *, const gchar *);
Tattoo gimp_image_get_new_tattoo (GimpImage *);
......@@ -248,10 +248,10 @@ GimpDrawable * gimp_image_active_drawable (GimpImage *);
GimpImageBaseType gimp_image_base_type (GimpImage *);
GimpImageType gimp_image_base_type_with_alpha (GimpImage *);
gchar * gimp_image_filename (GimpImage *);
gboolean gimp_image_enable_undo (GimpImage *);
gboolean gimp_image_disable_undo (GimpImage *);
gboolean gimp_image_freeze_undo (GimpImage *);
gboolean gimp_image_thaw_undo (GimpImage *);
gboolean gimp_image_undo_enable (GimpImage *);
gboolean gimp_image_undo_disable (GimpImage *);
gboolean gimp_image_undo_freeze (GimpImage *);
gboolean gimp_image_undo_thaw (GimpImage *);
void gimp_image_undo_event (GimpImage *, int);
gint gimp_image_dirty (GimpImage *);
gint gimp_image_clean (GimpImage *);
......
......@@ -1079,7 +1079,7 @@ gimp_image_delete_guide (GimpImage *gimage,
Parasite *
gimp_image_find_parasite (const GimpImage *gimage,
gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name)
{
return parasite_list_find (gimage->parasites, name);
......@@ -1108,7 +1108,7 @@ gimp_image_parasite_list (GimpImage *image,
}
void
gimp_image_attach_parasite (GimpImage *gimage,
gimp_image_parasite_attach (GimpImage *gimage,
Parasite *parasite)
{
/* only set the dirty bit manually if we can be saved and the new
......@@ -1117,7 +1117,7 @@ gimp_image_attach_parasite (GimpImage *gimage,
undo_push_image_parasite (gimage, parasite);
if (parasite_is_persistent (parasite)
&& !parasite_compare (parasite,
gimp_image_find_parasite(gimage,
gimp_image_parasite_find(gimage,
parasite_name(parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
......@@ -1126,12 +1126,12 @@ gimp_image_attach_parasite (GimpImage *gimage,
if (parasite_has_flag (parasite, PARASITE_ATTACH_PARENT))
{
parasite_shift_parent (parasite);
gimp_attach_parasite (parasite);
gimp_parasite_attach (parasite);
}
}
void
gimp_image_detach_parasite (GimpImage *gimage,
gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite)
{
Parasite *p;
......@@ -3149,7 +3149,7 @@ gimp_image_filename (GimpImage *gimage)
}
gboolean
gimp_image_freeze_undo (GimpImage *gimage)
gimp_image_undo_freeze (GimpImage *gimage)
{
gimage->undo_on = FALSE;
......@@ -3157,7 +3157,7 @@ gimp_image_freeze_undo (GimpImage *gimage)
}
gboolean
gimp_image_thaw_undo (GimpImage *gimage)
gimp_image_undo_thaw (GimpImage *gimage)
{
gimage->undo_on = TRUE;
......@@ -3165,18 +3165,18 @@ gimp_image_thaw_undo (GimpImage *gimage)
}
gboolean
gimp_image_disable_undo (GimpImage *gimage)
gimp_image_undo_disable (GimpImage *gimage)
{
return gimp_image_freeze_undo (gimage);
return gimp_image_undo_freeze (gimage);
}
gboolean
gimp_image_enable_undo (GimpImage *gimage)
gimp_image_undo_enable (GimpImage *gimage)
{
/* Free all undo steps as they are now invalidated */
undo_free (gimage);
return gimp_image_thaw_undo (gimage);
return gimp_image_undo_thaw (gimage);
}
void
......
......@@ -160,12 +160,12 @@ void gimp_image_add_guide (GimpImage *, Guide *);
void gimp_image_remove_guide (GimpImage *, Guide *);
void gimp_image_delete_guide (GimpImage *, Guide *);
Parasite * gimp_image_find_parasite (const GimpImage *,
Parasite * gimp_image_parasite_find (const GimpImage *,
const gchar *name);
gchar ** gimp_image_parasite_list (GimpImage *image,
gint *count);
void gimp_image_attach_parasite (GimpImage *, Parasite *);
void gimp_image_detach_parasite (GimpImage *, const gchar *);
void gimp_image_parasite_attach (GimpImage *, Parasite *);
void gimp_image_parasite_detach (GimpImage *, const gchar *);
Tattoo gimp_image_get_new_tattoo (GimpImage *);
......@@ -248,10 +248,10 @@ GimpDrawable * gimp_image_active_drawable (GimpImage *);
GimpImageBaseType gimp_image_base_type (GimpImage *);
GimpImageType gimp_image_base_type_with_alpha (GimpImage *);
gchar * gimp_image_filename (GimpImage *);
gboolean gimp_image_enable_undo (GimpImage *);
gboolean gimp_image_disable_undo (GimpImage *);
gboolean gimp_image_freeze_undo (GimpImage *);
gboolean gimp_image_thaw_undo (GimpImage *);
gboolean gimp_image_undo_enable (GimpImage *);
gboolean gimp_image_undo_disable (GimpImage *);
gboolean gimp_image_undo_freeze (GimpImage *);
gboolean gimp_image_undo_thaw (GimpImage *);
void gimp_image_undo_event (GimpImage *, int);
gint gimp_image_dirty (GimpImage *);
gint gimp_image_clean (GimpImage *);
......
......@@ -1079,7 +1079,7 @@ gimp_image_delete_guide (GimpImage *gimage,
Parasite *
gimp_image_find_parasite (const GimpImage *gimage,
gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name)
{
return parasite_list_find (gimage->parasites, name);
......@@ -1108,7 +1108,7 @@ gimp_image_parasite_list (GimpImage *image,
}
void
gimp_image_attach_parasite (GimpImage *gimage,
gimp_image_parasite_attach (GimpImage *gimage,
Parasite *parasite)
{
/* only set the dirty bit manually if we can be saved and the new
......@@ -1117,7 +1117,7 @@ gimp_image_attach_parasite (GimpImage *gimage,
undo_push_image_parasite (gimage, parasite);
if (parasite_is_persistent (parasite)
&& !parasite_compare (parasite,
gimp_image_find_parasite(gimage,
gimp_image_parasite_find(gimage,
parasite_name(parasite))))
undo_push_cantundo (gimage, _("attach parasite to image"));
......@@ -1126,12 +1126,12 @@ gimp_image_attach_parasite (GimpImage *gimage,
if (parasite_has_flag (parasite, PARASITE_ATTACH_PARENT))
{
parasite_shift_parent (parasite);
gimp_attach_parasite (parasite);
gimp_parasite_attach (parasite);
}
}
void
gimp_image_detach_parasite (GimpImage *gimage,
gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite)
{
Parasite *p;
......@@ -3149,7 +3149,7 @@ gimp_image_filename (GimpImage *gimage)
}
gboolean
gimp_image_freeze_undo (GimpImage *gimage)
gimp_image_undo_freeze (GimpImage *gimage)
{
gimage->undo_on = FALSE;
......@@ -3157,7 +3157,7 @@ gimp_image_freeze_undo (GimpImage *gimage)
}
gboolean
gimp_image_thaw_undo (GimpImage *gimage)
gimp_image_undo_thaw (GimpImage *gimage)
{
gimage->undo_on = TRUE;
......@@ -3165,18 +3165,18 @@ gimp_image_thaw_undo (GimpImage *gimage)
}
gboolean
gimp_image_disable_undo (GimpImage *gimage)
gimp_image_undo_disable (GimpImage *gimage)
{
return gimp_image_freeze_undo (gimage);
return gimp_image_undo_freeze (gimage);
}
gboolean
gimp_image_enable_undo (GimpImage *gimage)
gimp_image_undo_enable (GimpImage *gimage)
{
/* Free all undo steps as they are now invalidated */
undo_free (gimage);
return gimp_image_thaw_undo (gimage);
return gimp_image_undo_thaw (gimage);
}
void
......