mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimp: remove more deprecated API
This commit is contained in:
parent
660ad6c41a
commit
9e771d8cd5
8 changed files with 16 additions and 164 deletions
|
@ -209,7 +209,6 @@ EXPORTS
|
|||
gimp_drawable_get_buffer_deprecated
|
||||
gimp_drawable_get_by_id
|
||||
gimp_drawable_get_format
|
||||
gimp_drawable_get_format_deprecated
|
||||
gimp_drawable_get_pixel
|
||||
gimp_drawable_get_shadow_buffer
|
||||
gimp_drawable_get_shadow_buffer_deprecated
|
||||
|
@ -495,7 +494,6 @@ EXPORTS
|
|||
gimp_item_detach_parasite
|
||||
gimp_item_get_by_id
|
||||
gimp_item_get_children
|
||||
gimp_item_get_children_deprecated
|
||||
gimp_item_get_color_tag
|
||||
gimp_item_get_expanded
|
||||
gimp_item_get_id
|
||||
|
|
|
@ -485,19 +485,3 @@ gimp_drawable_get_shadow_buffer_deprecated (gint32 drawable_ID)
|
|||
{
|
||||
return gimp_drawable_get_shadow_buffer (GIMP_DRAWABLE (gimp_item_get_by_id (drawable_ID)));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_drawable_get_format_deprecated: (skip)
|
||||
* @drawable_ID: the ID of the #GimpDrawable to get the format for.
|
||||
*
|
||||
* Returns the #Babl format of the drawable.
|
||||
*
|
||||
* Returns: The #Babl format.
|
||||
*
|
||||
* Since: 2.10
|
||||
*/
|
||||
const Babl *
|
||||
gimp_drawable_get_format_deprecated (gint32 drawable_ID)
|
||||
{
|
||||
return gimp_drawable_get_format (GIMP_DRAWABLE (gimp_item_get_by_id (drawable_ID)));
|
||||
}
|
||||
|
|
|
@ -109,7 +109,6 @@ GdkPixbuf * gimp_drawable_get_sub_thumbnail (GimpDrawable *drawable,
|
|||
|
||||
#define gimp_drawable_get_buffer gimp_drawable_get_buffer_deprecated
|
||||
#define gimp_drawable_get_shadow_buffer gimp_drawable_get_shadow_buffer_deprecated
|
||||
#define gimp_drawable_get_format gimp_drawable_get_format_deprecated
|
||||
|
||||
#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
|
||||
|
||||
|
@ -117,8 +116,6 @@ GdkPixbuf * gimp_drawable_get_sub_thumbnail (GimpDrawable *drawable,
|
|||
GeglBuffer * gimp_drawable_get_buffer_deprecated (gint32 drawable_ID);
|
||||
GeglBuffer * gimp_drawable_get_shadow_buffer_deprecated (gint32 drawable_ID);
|
||||
|
||||
const Babl * gimp_drawable_get_format_deprecated (gint32 drawable_ID);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -422,27 +422,3 @@ gimp_item_list_children (GimpItem *item)
|
|||
|
||||
return g_list_reverse (children);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_get_children_deprecated: (skip)
|
||||
* @item_id: The item.
|
||||
* @num_children: (out): The item's number of children.
|
||||
*
|
||||
* Returns the item's list of children.
|
||||
*
|
||||
* This procedure returns the list of items which are children of the
|
||||
* specified item. The order is topmost to bottommost.
|
||||
*
|
||||
* Returns: (array length=num_children) (element-type gint32) (transfer full):
|
||||
* The item's list of children.
|
||||
* The returned value must be freed with g_free().
|
||||
*
|
||||
* Since: 2.8
|
||||
**/
|
||||
gint *
|
||||
gimp_item_get_children_deprecated (gint32 item_id,
|
||||
gint *num_children)
|
||||
{
|
||||
return _gimp_item_get_children (gimp_item_get_by_id (item_id),
|
||||
num_children);
|
||||
}
|
||||
|
|
|
@ -79,21 +79,10 @@ gboolean gimp_item_is_layer_mask (GimpItem *item);
|
|||
gboolean gimp_item_is_selection (GimpItem *item);
|
||||
gboolean gimp_item_is_vectors (GimpItem *item);
|
||||
|
||||
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
|
||||
|
||||
GimpItem ** gimp_item_get_children (GimpItem *item,
|
||||
gint *num_children);
|
||||
GList * gimp_item_list_children (GimpItem *item);
|
||||
|
||||
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
|
||||
|
||||
#define gimp_item_get_children gimp_item_get_children_deprecated
|
||||
|
||||
#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
|
||||
|
||||
gint * gimp_item_get_children_deprecated (gint32 item_id,
|
||||
gint *num_children);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -60,8 +60,6 @@ struct _GimpItemComboBoxPrivate
|
|||
{
|
||||
GimpItemConstraintFunc constraint;
|
||||
gpointer data;
|
||||
|
||||
GimpItemConstraintDeprecatedFunc constraint_d;
|
||||
};
|
||||
|
||||
typedef struct _GimpDrawableComboBoxClass GimpDrawableComboBoxClass;
|
||||
|
@ -462,9 +460,8 @@ gimp_item_combo_box_model_add (GimpIntComboBox *combo_box,
|
|||
GimpItem *item = list->data;
|
||||
gint32 item_id = gimp_item_get_id (item);
|
||||
|
||||
if ((! private->constraint && ! private->constraint_d) ||
|
||||
(private->constraint && (* private->constraint) (image, item, private->data)) ||
|
||||
(private->constraint_d && (* private->constraint_d) (gimp_image_get_id (image), item_id, private->data)))
|
||||
if (! private->constraint ||
|
||||
private->constraint (image, item, private->data))
|
||||
{
|
||||
gchar *image_name = gimp_image_get_name (image);
|
||||
gchar *item_name = gimp_item_get_name (item);
|
||||
|
@ -599,72 +596,3 @@ gimp_item_combo_box_changed (GimpIntComboBox *combo_box)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Deprecated API. */
|
||||
|
||||
|
||||
static GtkWidget * gimp_item_combo_box_new_deprecated (GType type,
|
||||
GimpItemConstraintDeprecatedFunc constraint,
|
||||
gpointer data,
|
||||
GDestroyNotify data_destroy);
|
||||
|
||||
/**
|
||||
* gimp_drawable_combo_box_new_deprecated: (skip)
|
||||
* @constraint: a #GimpItemConstraintDeprecatedFunc or %NULL
|
||||
* @data : a pointer that is passed to @constraint
|
||||
* @data_destroy: Destroy function for @data
|
||||
*
|
||||
* Creates a new #GimpIntComboBox filled with all currently opened
|
||||
* drawables. If a @constraint function is specified, it is called for
|
||||
* each drawable and only if the function returns %TRUE, the drawable
|
||||
* is added to the combobox.
|
||||
*
|
||||
* You should use gimp_int_combo_box_connect() to initialize and connect
|
||||
* the combo. Use gimp_int_combo_box_set_active() to get the active
|
||||
* drawable ID and gimp_int_combo_box_get_active() to retrieve the ID
|
||||
* of the selected drawable.
|
||||
*
|
||||
* Returns: a new #GimpIntComboBox.
|
||||
*
|
||||
* Since: 2.2
|
||||
**/
|
||||
GtkWidget *
|
||||
gimp_drawable_combo_box_new_deprecated (GimpItemConstraintDeprecatedFunc constraint,
|
||||
gpointer data,
|
||||
GDestroyNotify data_destroy)
|
||||
{
|
||||
return gimp_item_combo_box_new_deprecated (GIMP_TYPE_DRAWABLE_COMBO_BOX,
|
||||
constraint, data, data_destroy);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
gimp_item_combo_box_new_deprecated (GType type,
|
||||
GimpItemConstraintDeprecatedFunc constraint,
|
||||
gpointer data,
|
||||
GDestroyNotify data_destroy)
|
||||
{
|
||||
GimpIntComboBox *combo_box;
|
||||
GimpItemComboBoxPrivate *private;
|
||||
|
||||
combo_box = g_object_new (type,
|
||||
"width-request", WIDTH_REQUEST,
|
||||
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
|
||||
NULL);
|
||||
|
||||
private = GET_PRIVATE (combo_box);
|
||||
|
||||
private->constraint_d = constraint;
|
||||
private->data = data;
|
||||
|
||||
if (data_destroy)
|
||||
g_object_weak_ref (G_OBJECT (combo_box), (GWeakNotify) data_destroy, data);
|
||||
|
||||
gimp_item_combo_box_populate (combo_box);
|
||||
|
||||
g_signal_connect (combo_box, "changed",
|
||||
G_CALLBACK (gimp_item_combo_box_changed),
|
||||
NULL);
|
||||
|
||||
return GTK_WIDGET (combo_box);
|
||||
}
|
||||
|
|
|
@ -55,8 +55,6 @@ GType gimp_layer_combo_box_get_type (void) G_GNUC_CONST;
|
|||
GType gimp_vectors_combo_box_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
||||
#ifndef GIMP_DEPRECATED_REPLACE_NEW_API
|
||||
|
||||
typedef gboolean (* GimpItemConstraintFunc) (GimpImage *image,
|
||||
GimpItem *item,
|
||||
gpointer data);
|
||||
|
@ -74,23 +72,6 @@ GtkWidget * gimp_vectors_combo_box_new (GimpItemConstraintFunc constraint,
|
|||
gpointer data,
|
||||
GDestroyNotify data_destroy);
|
||||
|
||||
#else /* GIMP_DEPRECATED_REPLACE_NEW_API */
|
||||
|
||||
#define GimpItemConstraintFunc GimpItemConstraintDeprecatedFunc
|
||||
#define gimp_drawable_combo_box_new gimp_drawable_combo_box_new_deprecated
|
||||
|
||||
#endif /* GIMP_DEPRECATED_REPLACE_NEW_API */
|
||||
|
||||
|
||||
typedef gboolean (* GimpItemConstraintDeprecatedFunc) (gint image_id,
|
||||
gint32 item_id,
|
||||
gpointer data);
|
||||
|
||||
|
||||
GtkWidget * gimp_drawable_combo_box_new_deprecated (GimpItemConstraintDeprecatedFunc constraint,
|
||||
gpointer data,
|
||||
GDestroyNotify data_destroy);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ EXPORTS
|
|||
gimp_channel_combo_box_new
|
||||
gimp_drawable_combo_box_get_type
|
||||
gimp_drawable_combo_box_new
|
||||
gimp_drawable_combo_box_new_deprecated
|
||||
gimp_drawable_preview_get_drawable
|
||||
gimp_drawable_preview_get_type
|
||||
gimp_drawable_preview_new_from_drawable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue