From: Benjamin Otte Date: Fri, 16 Mar 2018 04:30:35 +0000 (+0100) Subject: selection: Remove surface APIs X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~927 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b64a4031006e29a9e54bccf85ff4a82251507307;p=gtk4.git selection: Remove surface APIs --- diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index 6c84a75e8a..e3a984d3c3 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4940,8 +4940,6 @@ gtk_selection_data_set_text gtk_selection_data_get_text gtk_selection_data_set_pixbuf gtk_selection_data_get_pixbuf -gtk_selection_data_set_surface -gtk_selection_data_get_surface gtk_selection_data_set_texture gtk_selection_data_get_texture gtk_selection_data_set_uris diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c index 575cd9bf67..dfa8511966 100644 --- a/gtk/gtkselection.c +++ b/gtk/gtkselection.c @@ -802,19 +802,7 @@ gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data, return FALSE; } -/** - * gtk_selection_data_set_surface: - * @selection_data: a #GtkSelectionData - * @surface: a cairo image surface - * - * Sets the contents of the selection from a cairo image surface. - * The surface is converted to the form determined by - * @selection_data->target. - * - * Returns: %TRUE if the selection was successfully set, - * otherwise %FALSE. - **/ -gboolean +static gboolean gtk_selection_data_set_surface (GtkSelectionData *selection_data, cairo_surface_t *surface) { @@ -831,31 +819,6 @@ gtk_selection_data_set_surface (GtkSelectionData *selection_data, return retval; } -/** - * gtk_selection_data_get_surface: - * @selection_data: a #GtkSelectionData - * - * Gets the contents of the selection data as a cairo surface. - * - * Returns: (nullable) (transfer full): if the selection data - * contained a recognized image type and it could be converted to a - * cairo surface, a newly allocated surface is returned, otherwise - * %NULL. If the result is non-%NULL it must be freed with - * g_object_unref(). - **/ -cairo_surface_t * -gtk_selection_data_get_surface (GtkSelectionData *selection_data) -{ - GdkPixbuf *pixbuf; - cairo_surface_t *surface; - - pixbuf = gtk_selection_data_get_pixbuf (selection_data); - surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, NULL); - g_object_unref (pixbuf); - - return surface; -} - /** * gtk_selection_data_get_pixbuf: * @selection_data: a #GtkSelectionData diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h index b98e72656a..2fc9026c6d 100644 --- a/gtk/gtkselection.h +++ b/gtk/gtkselection.h @@ -78,11 +78,6 @@ GDK_AVAILABLE_IN_ALL gboolean gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data, GdkPixbuf *pixbuf); GDK_AVAILABLE_IN_ALL -cairo_surface_t *gtk_selection_data_get_surface (GtkSelectionData *selection_data); -GDK_AVAILABLE_IN_ALL -gboolean gtk_selection_data_set_surface (GtkSelectionData *selection_data, - cairo_surface_t *surface); -GDK_AVAILABLE_IN_ALL GdkPixbuf *gtk_selection_data_get_pixbuf (const GtkSelectionData *selection_data); GDK_AVAILABLE_IN_ALL gboolean gtk_selection_data_set_texture (GtkSelectionData *selection_data,