libgimp: deprecate more cruft, everything not needed by cruft plug-ins

This commit is contained in:
Michael Natterer 2018-04-28 23:32:47 +02:00
parent 74d78e7009
commit 0dd8459a1f
15 changed files with 9 additions and 532 deletions

View File

@ -46,7 +46,6 @@
enum
{
PROP_0,
PROP_DRAWABLE,
PROP_DRAWABLE_ID
};
@ -93,8 +92,6 @@ static void gimp_aspect_preview_untransform (GimpPreview *preview,
gint *dest_x,
gint *dest_y);
static void gimp_aspect_preview_set_drawable (GimpAspectPreview *preview,
GimpDrawable *drawable);
static void gimp_aspect_preview_set_drawable_id
(GimpAspectPreview *preview,
gint32 drawable_ID);
@ -128,20 +125,6 @@ gimp_aspect_preview_class_init (GimpAspectPreviewClass *klass)
g_type_class_add_private (object_class, sizeof (GimpAspectPreviewPrivate));
/**
* GimpAspectPreview:drawable:
*
* Deprecated: use the drawable-id property instead.
*
* Since: 2.4
*/
g_object_class_install_property (object_class, PROP_DRAWABLE,
g_param_spec_pointer ("drawable",
"Drawable",
"Deprecated: use the drawable-id property instead",
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
* GimpAspectPreview:drawable-id:
*
@ -218,10 +201,6 @@ gimp_aspect_preview_get_property (GObject *object,
switch (property_id)
{
case PROP_DRAWABLE:
g_value_set_pointer (value, preview->drawable);
break;
case PROP_DRAWABLE_ID:
g_value_set_int (value, priv->drawable_ID);
break;
@ -238,18 +217,10 @@ gimp_aspect_preview_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GimpAspectPreview *preview = GIMP_ASPECT_PREVIEW (object);
GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
GimpAspectPreview *preview = GIMP_ASPECT_PREVIEW (object);
switch (property_id)
{
case PROP_DRAWABLE:
g_return_if_fail (priv->drawable_ID < 1);
if (g_value_get_pointer (value))
gimp_aspect_preview_set_drawable (preview,
g_value_get_pointer (value));
break;
case PROP_DRAWABLE_ID:
gimp_aspect_preview_set_drawable_id (preview,
g_value_get_int (value));
@ -385,20 +356,6 @@ gimp_aspect_preview_untransform (GimpPreview *preview,
*dest_y = (gdouble) src_y * gimp_drawable_height (priv->drawable_ID) / preview->height;
}
static void
gimp_aspect_preview_set_drawable (GimpAspectPreview *preview,
GimpDrawable *drawable)
{
GimpAspectPreviewPrivate *priv = GIMP_ASPECT_PREVIEW_GET_PRIVATE (preview);
g_return_if_fail (preview->drawable == NULL);
g_return_if_fail (priv->drawable_ID < 1);
preview->drawable = drawable;
gimp_aspect_preview_set_drawable_id (preview, drawable->drawable_id);
}
static void
gimp_aspect_preview_set_drawable_id (GimpAspectPreview *preview,
gint32 drawable_ID)
@ -457,30 +414,3 @@ gimp_aspect_preview_new_from_drawable_id (gint32 drawable_ID)
"drawable-id", drawable_ID,
NULL);
}
/**
* gimp_aspect_preview_new:
* @drawable: a #GimpDrawable
* @toggle: unused
*
* Creates a new #GimpAspectPreview widget for @drawable. See also
* gimp_drawable_preview_new().
*
* In GIMP 2.2 the @toggle parameter was provided to conviently access
* the state of the "Preview" check-button. This is not any longer
* necessary as the preview itself now stores this state, as well as
* the scroll offset.
*
* Since: 2.2
*
* Returns: a new #GimpAspectPreview.
**/
GtkWidget *
gimp_aspect_preview_new (GimpDrawable *drawable,
gboolean *toggle)
{
g_return_val_if_fail (drawable != NULL, NULL);
return g_object_new (GIMP_TYPE_ASPECT_PREVIEW,
"drawable", drawable,
NULL);
}

View File

@ -44,9 +44,6 @@ typedef struct _GimpAspectPreviewClass GimpAspectPreviewClass;
struct _GimpAspectPreview
{
GimpPreview parent_instance;
/*< private >*/
GimpDrawable *drawable;
};
struct _GimpAspectPreviewClass
@ -63,11 +60,7 @@ struct _GimpAspectPreviewClass
GType gimp_aspect_preview_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_aspect_preview_new_from_drawable_id (gint32 drawable_ID);
GIMP_DEPRECATED_FOR(gimp_aspect_preview_new_from_drawable_id)
GtkWidget * gimp_aspect_preview_new (GimpDrawable *drawable,
gboolean *toggle);
GtkWidget * gimp_aspect_preview_new_from_drawable_id (gint32 drawable_ID);
G_END_DECLS

View File

@ -23,9 +23,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
/* we use our own deprecated API here */
#define GIMP_DISABLE_DEPRECATION_WARNINGS
#include "libgimpwidgets/gimpwidgets.h"
#include "gimpuitypes.h"
@ -49,7 +46,6 @@
enum
{
PROP_0,
PROP_DRAWABLE,
PROP_DRAWABLE_ID
};
@ -93,8 +89,6 @@ static void gimp_drawable_preview_draw_buffer (GimpPreview *preview,
const guchar *buffer,
gint rowstride);
static void gimp_drawable_preview_set_drawable (GimpDrawablePreview *preview,
GimpDrawable *drawable);
static void gimp_drawable_preview_set_drawable_id
(GimpDrawablePreview *preview,
gint32 drawable_ID);
@ -128,20 +122,6 @@ gimp_drawable_preview_class_init (GimpDrawablePreviewClass *klass)
g_type_class_add_private (object_class, sizeof (GimpDrawablePreviewPrivate));
/**
* GimpDrawablePreview:drawable:
*
* Deprecated: use the drawable-id property instead.
*
* Since: 2.4
*/
g_object_class_install_property (object_class, PROP_DRAWABLE,
g_param_spec_pointer ("drawable",
"Drawable",
"Deprecated: use the drawable-id property instead",
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
* GimpDrawablePreview:drawable-id:
*
@ -222,10 +202,6 @@ gimp_drawable_preview_get_property (GObject *object,
switch (property_id)
{
case PROP_DRAWABLE:
g_value_set_pointer (value, preview->drawable);
break;
case PROP_DRAWABLE_ID:
g_value_set_int (value,
gimp_drawable_preview_get_drawable_id (preview));
@ -243,18 +219,10 @@ gimp_drawable_preview_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GimpDrawablePreview *preview = GIMP_DRAWABLE_PREVIEW (object);
GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
GimpDrawablePreview *preview = GIMP_DRAWABLE_PREVIEW (object);
switch (property_id)
{
case PROP_DRAWABLE:
g_return_if_fail (priv->drawable_ID < 1);
if (g_value_get_pointer (value))
gimp_drawable_preview_set_drawable (preview,
g_value_get_pointer (value));
break;
case PROP_DRAWABLE_ID:
gimp_drawable_preview_set_drawable_id (preview,
g_value_get_int (value));
@ -537,22 +505,6 @@ gimp_drawable_preview_draw_buffer (GimpPreview *preview,
buffer, rowstride);
}
static void
gimp_drawable_preview_set_drawable (GimpDrawablePreview *drawable_preview,
GimpDrawable *drawable)
{
GimpPreview *preview = GIMP_PREVIEW (drawable_preview);
GimpDrawablePreviewPrivate *priv = GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview);
g_return_if_fail (drawable_preview->drawable == NULL);
g_return_if_fail (priv->drawable_ID < 1);
drawable_preview->drawable = drawable;
gimp_drawable_preview_set_drawable_id (drawable_preview,
drawable->drawable_id);
}
static void
gimp_drawable_preview_set_drawable_id (GimpDrawablePreview *drawable_preview,
gint32 drawable_ID)
@ -658,54 +610,6 @@ gimp_drawable_preview_get_drawable_id (GimpDrawablePreview *preview)
return GIMP_DRAWABLE_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
}
/**
* gimp_drawable_preview_new:
* @drawable: a #GimpDrawable
* @toggle: unused
*
* Creates a new #GimpDrawablePreview widget for @drawable.
*
* In GIMP 2.2 the @toggle parameter was provided to conviently access
* the state of the "Preview" check-button. This is not any longer
* necessary as the preview itself now stores this state, as well as
* the scroll offset.
*
* Returns: A pointer to the new #GimpDrawablePreview widget.
*
* Deprecated: Use gimp_drawable_preview_new_from_drawable_id() instead.
*
* Since: 2.2
**/
GtkWidget *
gimp_drawable_preview_new (GimpDrawable *drawable,
gboolean *toggle)
{
g_return_val_if_fail (drawable != NULL, NULL);
return g_object_new (GIMP_TYPE_DRAWABLE_PREVIEW,
"drawable", drawable,
NULL);
}
/**
* gimp_drawable_preview_get_drawable:
* @preview: a #GimpDrawablePreview widget
*
* Return value: the #GimpDrawable that has been passed to
* gimp_drawable_preview_new().
*
* Deprecated: use gimp_drawable_preview_get_drawable_id() instead.
*
* Since: 2.2
**/
GimpDrawable *
gimp_drawable_preview_get_drawable (GimpDrawablePreview *preview)
{
g_return_val_if_fail (GIMP_IS_DRAWABLE_PREVIEW (preview), NULL);
return preview->drawable;
}
/**
* gimp_drawable_preview_draw_region:
* @preview: a #GimpDrawablePreview widget

View File

@ -44,8 +44,6 @@ typedef struct _GimpDrawablePreviewClass GimpDrawablePreviewClass;
struct _GimpDrawablePreview
{
GimpScrolledPreview parent_instance;
GimpDrawable *drawable;
};
struct _GimpDrawablePreviewClass
@ -65,12 +63,6 @@ GType gimp_drawable_preview_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_drawable_preview_new_from_drawable_id (gint32 drawable_ID);
gint32 gimp_drawable_preview_get_drawable_id (GimpDrawablePreview *preview);
GIMP_DEPRECATED_FOR(gimp_drawable_preview_new_from_drawable_id)
GtkWidget * gimp_drawable_preview_new (GimpDrawable *drawable,
gboolean *toggle);
GIMP_DEPRECATED_FOR(gimp_drawable_preview_get_drawable_id)
GimpDrawable * gimp_drawable_preview_get_drawable (GimpDrawablePreview *preview);
void gimp_drawable_preview_draw_region (GimpDrawablePreview *preview,
const GimpPixelRgn *region);

View File

@ -147,35 +147,6 @@ gimp_pixel_rgn_init (GimpPixelRgn *pr,
pr->shadow = shadow;
}
/**
* gimp_pixel_rgn_resize:
* @pr: a pointer to a previously initialized #GimpPixelRgn.
* @x: the x coordinate of the new position of the region's
* top-left corner.
* @y: the y coordinate of the new position of the region's
* top-left corner.
* @width: the new width of the region.
* @height: the new height of the region.
*
* Change the position and size of a previously initialized pixel region.
**/
void
gimp_pixel_rgn_resize (GimpPixelRgn *pr,
gint x,
gint y,
gint width,
gint height)
{
g_return_if_fail (pr != NULL && pr->drawable != NULL);
g_return_if_fail (x >= 0 && x + width <= pr->drawable->width);
g_return_if_fail (y >= 0 && y + height <= pr->drawable->height);
pr->x = x;
pr->y = y;
pr->w = width;
pr->h = height;
}
/**
* gimp_pixel_rgn_get_pixel:
* @pr: a pointer to a previously initialized #GimpPixelRgn.

View File

@ -53,12 +53,6 @@ void gimp_pixel_rgn_init (GimpPixelRgn *pr,
gint height,
gint dirty,
gint shadow);
GIMP_DEPRECATED
void gimp_pixel_rgn_resize (GimpPixelRgn *pr,
gint x,
gint y,
gint width,
gint height);
GIMP_DEPRECATED_FOR(gegl_buffer_sample)
void gimp_pixel_rgn_get_pixel (GimpPixelRgn *pr,
guchar *buf,

View File

@ -24,9 +24,7 @@
#include "libgimpbase/gimpbase.h"
#undef GIMP_DISABLE_DEPRECATED
#include "gimpprogress.h"
#define GIMP_DISABLE_DEPRECATED
#include "gimp.h"
@ -59,45 +57,6 @@ static const gdouble gimp_progress_step = (1.0 / 256.0);
/* public functions */
/**
* gimp_progress_install:
* @start_callback: the function to call when progress starts
* @end_callback: the function to call when progress finishes
* @text_callback: the function to call to change the text
* @value_callback: the function to call to change the value
* @user_data: a pointer that is returned when uninstalling the progress
*
* Note that since GIMP 2.4, @value_callback can be called with
* negative values. This is triggered by calls to gimp_progress_pulse().
* The callback should then implement a progress indicating business,
* e.g. by calling gtk_progress_bar_pulse().
*
* Return value: the name of the temporary procedure that's been installed
*
* Since: 2.2
**/
const gchar *
gimp_progress_install (GimpProgressStartCallback start_callback,
GimpProgressEndCallback end_callback,
GimpProgressTextCallback text_callback,
GimpProgressValueCallback value_callback,
gpointer user_data)
{
GimpProgressVtable vtable = { 0, };
g_return_val_if_fail (start_callback != NULL, NULL);
g_return_val_if_fail (end_callback != NULL, NULL);
g_return_val_if_fail (text_callback != NULL, NULL);
g_return_val_if_fail (value_callback != NULL, NULL);
vtable.start = start_callback;
vtable.end = end_callback;
vtable.set_text = text_callback;
vtable.set_value = value_callback;
return gimp_progress_install_vtable (&vtable, user_data);
}
/**
* gimp_progress_install_vtable:
* @vtable: a pointer to a @GimpProgressVtable.

View File

@ -70,25 +70,6 @@ gboolean gimp_progress_set_text_printf (const gchar *format,
gboolean gimp_progress_update (gdouble percentage);
#ifndef GIMP_DISABLE_DEPRECATED
typedef void (* GimpProgressStartCallback) (const gchar *message,
gboolean cancelable,
gpointer user_data);
typedef void (* GimpProgressEndCallback) (gpointer user_data);
typedef void (* GimpProgressTextCallback) (const gchar *message,
gpointer user_data);
typedef void (* GimpProgressValueCallback) (gdouble percentage,
gpointer user_data);
GIMP_DEPRECATED_FOR(gimp_progress_install_vtable)
const gchar * gimp_progress_install (GimpProgressStartCallback start_callback,
GimpProgressEndCallback end_callback,
GimpProgressTextCallback text_callback,
GimpProgressValueCallback value_callback,
gpointer user_data);
#endif /* GIMP_DISABLE_DEPRECATED */
G_END_DECLS
#endif /* __GIMP_PROGRESS_H__ */

View File

@ -39,6 +39,12 @@
**/
typedef void (* GimpRgnFuncSrc) (gint x,
gint y,
const guchar *src,
gint bpp,
gpointer data);
struct _GimpRgnIterator
{
GimpDrawable *drawable;
@ -109,90 +115,6 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
g_slice_free (GimpRgnIterator, iter);
}
void
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data)
{
GimpPixelRgn srcPR;
g_return_if_fail (iter != NULL);
gimp_pixel_rgn_init (&srcPR, iter->drawable,
iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1,
FALSE, FALSE);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
}
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data)
{
GimpPixelRgn srcPR, destPR;
gint x1, y1, x2, y2;
gint bpp;
gint count;
gpointer pr;
gint total_area;
gint area_so_far;
g_return_if_fail (iter != NULL);
x1 = iter->x1;
y1 = iter->y1;
x2 = iter->x2;
y2 = iter->y2;
total_area = (x2 - x1) * (y2 - y1);
area_so_far = 0;
gimp_pixel_rgn_init (&srcPR, iter->drawable, x1, y1, x2 - x1, y2 - y1,
FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, iter->drawable, x1, y1, x2 - x1, y2 - y1,
TRUE, TRUE);
bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR), count = 0;
pr != NULL;
pr = gimp_pixel_rgns_process (pr), count++)
{
const guchar *src = srcPR.data;
guchar *dest = destPR.data;
gint y;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{
const guchar *s = src;
guchar *d = dest;
gint x;
for (x = srcPR.x; x < srcPR.x + srcPR.w; x++)
{
func (x, y, s, d, bpp, data);
s += bpp;
d += bpp;
}
src += srcPR.rowstride;
dest += destPR.rowstride;
}
area_so_far += srcPR.w * srcPR.h;
if ((count % 16) == 0)
gimp_progress_update ((gdouble) area_so_far / (gdouble) total_area);
}
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id,
x1, y1, x2 - x1, y2 - y1);
}
void
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,

View File

@ -42,22 +42,11 @@ typedef void (* GimpRgnFunc2) (const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
typedef void (* GimpRgnFuncSrc) (gint x,
gint y,
const guchar *src,
gint bpp,
gpointer data);
typedef void (* GimpRgnFuncDest) (gint x,
gint y,
guchar *dest,
gint bpp,
gpointer data);
typedef void (* GimpRgnFuncSrcDest) (gint x,
gint y,
const guchar *src,
guchar *dest,
gint bpp,
gpointer data);
GIMP_DEPRECATED_FOR(GeglBufferIterator)
GimpRgnIterator * gimp_rgn_iterator_new (GimpDrawable *drawable,
@ -65,18 +54,9 @@ GimpRgnIterator * gimp_rgn_iterator_new (GimpDrawable *drawable,
GIMP_DEPRECATED_FOR(GeglBufferIterator)
void gimp_rgn_iterator_free (GimpRgnIterator *iter);
GIMP_DEPRECATED_FOR(GeglBufferIterator)
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data);
GIMP_DEPRECATED_FOR(GeglBufferIterator)
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data);
GIMP_DEPRECATED_FOR(GeglBufferIterator)
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data);
GIMP_DEPRECATED_FOR(GeglBufferIterator)
void gimp_rgn_iterate1 (GimpDrawable *drawable,

View File

@ -86,19 +86,6 @@ gimp_tile_ref (GimpTile *tile)
gimp_tile_cache_insert (tile);
}
void
gimp_tile_ref_zero (GimpTile *tile)
{
g_return_if_fail (tile != NULL);
tile->ref_count++;
if (tile->ref_count == 1)
tile->data = g_new0 (guchar, tile->ewidth * tile->eheight * tile->bpp);
gimp_tile_cache_insert (tile);
}
void
gimp_tile_unref (GimpTile *tile,
gboolean dirty)

View File

@ -47,8 +47,6 @@ struct _GimpTile
GIMP_DEPRECATED
void gimp_tile_ref (GimpTile *tile);
GIMP_DEPRECATED
void gimp_tile_ref_zero (GimpTile *tile);
GIMP_DEPRECATED
void gimp_tile_unref (GimpTile *tile,
gboolean dirty);
GIMP_DEPRECATED

View File

@ -18,9 +18,6 @@
#include "config.h"
#ifdef GDK_DISABLE_DEPRECATED
#undef GDK_DISABLE_DEPRECATED
#endif
#include <gtk/gtk.h>
#ifdef GDK_WINDOWING_WIN32

View File

@ -24,9 +24,6 @@
#include <gegl.h>
#include <gtk/gtk.h>
/* we use our own deprecated API here */
#define GIMP_DISABLE_DEPRECATION_WARNINGS
#include "libgimpwidgets/gimpwidgets.h"
#include "gimpuitypes.h"
@ -49,7 +46,6 @@
enum
{
PROP_0,
PROP_DRAWABLE,
PROP_DRAWABLE_ID,
PROP_MODEL
};
@ -58,7 +54,6 @@ enum
struct _GimpZoomPreviewPrivate
{
gint32 drawable_ID;
GimpDrawable *drawable;
GimpZoomModel *model;
GdkRectangle extents;
};
@ -114,8 +109,6 @@ static void gimp_zoom_preview_untransform (GimpPreview *preview,
gint *dest_x,
gint *dest_y);
static void gimp_zoom_preview_set_drawable (GimpZoomPreview *preview,
GimpDrawable *drawable);
static void gimp_zoom_preview_set_drawable_id (GimpZoomPreview *preview,
gint32 drawable_ID);
static void gimp_zoom_preview_set_model (GimpZoomPreview *preview,
@ -159,22 +152,6 @@ gimp_zoom_preview_class_init (GimpZoomPreviewClass *klass)
g_type_class_add_private (object_class, sizeof (GimpZoomPreviewPrivate));
/**
* GimpZoomPreview:drawable:
*
* The drawable the #GimpZoomPreview is attached to.
*
* Deprecated: use the drawable-id property instead.
*
* Since: 2.4
*/
g_object_class_install_property (object_class, PROP_DRAWABLE,
g_param_spec_pointer ("drawable",
"Drawable",
"Deprecated: use the drawable-id property instead",
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
/**
* GimpZoomPreview:drawable-id:
*
@ -302,10 +279,6 @@ gimp_zoom_preview_get_property (GObject *object,
switch (property_id)
{
case PROP_DRAWABLE:
g_value_set_pointer (value, gimp_zoom_preview_get_drawable (preview));
break;
case PROP_DRAWABLE_ID:
g_value_set_int (value, gimp_zoom_preview_get_drawable_id (preview));
break;
@ -330,12 +303,6 @@ gimp_zoom_preview_set_property (GObject *object,
switch (property_id)
{
case PROP_DRAWABLE:
g_return_if_fail (preview->priv->drawable_ID < 1);
if (g_value_get_pointer (value))
gimp_zoom_preview_set_drawable (preview, g_value_get_pointer (value));
break;
case PROP_DRAWABLE_ID:
gimp_zoom_preview_set_drawable_id (preview, g_value_get_int (value));
break;
@ -647,18 +614,6 @@ gimp_zoom_preview_untransform (GimpPreview *preview,
priv->extents.height / preview->height / zoom));
}
static void
gimp_zoom_preview_set_drawable (GimpZoomPreview *preview,
GimpDrawable *drawable)
{
g_return_if_fail (preview->priv->drawable == NULL);
g_return_if_fail (preview->priv->drawable_ID < 1);
preview->priv->drawable = drawable;
gimp_zoom_preview_set_drawable_id (preview, drawable->drawable_id);
}
static void
gimp_zoom_preview_set_drawable_id (GimpZoomPreview *preview,
gint32 drawable_ID)
@ -818,63 +773,6 @@ gimp_zoom_preview_new_with_model_from_drawable_id (gint32 drawable_ID,
NULL);
}
/**
* gimp_zoom_preview_new:
* @drawable: a #GimpDrawable
*
* Creates a new #GimpZoomPreview widget for @drawable.
*
* Deprecated: 2.10: Use gimp_zoom_preview_new_from_drawable_id() instead.
*
* Since: 2.4
*
* Returns: a new #GimpZoomPreview.
**/
GtkWidget *
gimp_zoom_preview_new (GimpDrawable *drawable)
{
g_return_val_if_fail (drawable != NULL, NULL);
return g_object_new (GIMP_TYPE_ZOOM_PREVIEW,
"drawable", drawable,
NULL);
}
/**
* gimp_zoom_preview_new_with_model:
* @drawable: a #GimpDrawable
* @model: a #GimpZoomModel
*
* Creates a new #GimpZoomPreview widget for @drawable using the
* given @model.
*
* This variant of gimp_zoom_preview_new() allows you to create a
* preview using an existing zoom model. This may be useful if for
* example you want to have two zoom previews that keep their zoom
* factor in sync.
*
* Deprecated: 2.10: Use gimp_zoom_preview_new_with_model_from_drawable_id()
* instead.
*
* Since: 2.4
*
* Returns: a new #GimpZoomPreview.
**/
GtkWidget *
gimp_zoom_preview_new_with_model (GimpDrawable *drawable,
GimpZoomModel *model)
{
g_return_val_if_fail (drawable != NULL, NULL);
g_return_val_if_fail (GIMP_IS_ZOOM_MODEL (model), NULL);
return g_object_new (GIMP_TYPE_ZOOM_PREVIEW,
"drawable", drawable,
"model", model,
NULL);
}
/**
* gimp_zoom_preview_get_drawable_id:
* @preview: a #GimpZoomPreview widget
@ -894,26 +792,6 @@ gimp_zoom_preview_get_drawable_id (GimpZoomPreview *preview)
return GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview)->drawable_ID;
}
/**
* gimp_zoom_preview_get_drawable:
* @preview: a #GimpZoomPreview widget
*
* Returns the #GimpDrawable the #GimpZoomPreview is attached to.
*
* Return Value: the #GimpDrawable that was passed to gimp_zoom_preview_new().
*
* Deprecated: 2.10: Use gimp_zoom_preview_get_drawable_id() instead.
*
* Since: 2.4
**/
GimpDrawable *
gimp_zoom_preview_get_drawable (GimpZoomPreview *preview)
{
g_return_val_if_fail (GIMP_IS_ZOOM_PREVIEW (preview), NULL);
return GIMP_ZOOM_PREVIEW_GET_PRIVATE (preview)->drawable;
}
/**
* gimp_zoom_preview_get_model:
* @preview: a #GimpZoomPreview widget

View File

@ -80,15 +80,6 @@ gint32 gimp_zoom_preview_get_drawable_id(GimpZoomPreview *preview);
GimpZoomModel * gimp_zoom_preview_get_model (GimpZoomPreview *preview);
gdouble gimp_zoom_preview_get_factor (GimpZoomPreview *preview);
GIMP_DEPRECATED_FOR(gimp_zoom_preview_new_from_drawable_id)
GtkWidget * gimp_zoom_preview_new (GimpDrawable *drawable);
GIMP_DEPRECATED_FOR(gimp_zoom_preview_new_with_model_from_drawable_id)
GtkWidget * gimp_zoom_preview_new_with_model (GimpDrawable *drawable,
GimpZoomModel *model);
GIMP_DEPRECATED_FOR(gimp_zoom_preview_get_drawable_id)
GimpDrawable * gimp_zoom_preview_get_drawable (GimpZoomPreview *preview);
G_END_DECLS