From b64a4031006e29a9e54bccf85ff4a82251507307 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 16 Mar 2018 05:30:35 +0100 Subject: [PATCH] selection: Remove surface APIs --- docs/reference/gtk/gtk4-sections.txt | 2 -- gtk/gtkselection.c | 39 +--------------------------- gtk/gtkselection.h | 5 ---- 3 files changed, 1 insertion(+), 45 deletions(-) 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,