selection: Remove surface APIs
authorBenjamin Otte <otte@redhat.com>
Fri, 16 Mar 2018 04:30:35 +0000 (05:30 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 16 Mar 2018 05:04:45 +0000 (06:04 +0100)
docs/reference/gtk/gtk4-sections.txt
gtk/gtkselection.c
gtk/gtkselection.h

index 6c84a75e8a9293b0a39cd3368a6bb7a6968720f6..e3a984d3c3ee0b94d494d0736a71848534140ed6 100644 (file)
@@ -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
index 575cd9bf6733ca89f64070749b476f3243719b83..dfa85119663aca54a3ba3d4c8e5308a44ad33798 100644 (file)
@@ -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
index b98e72656a1c6a3403dffe1878244a1e4284a9a6..2fc9026c6db996c5ef4d123893249be1c3bc2fec 100644 (file)
@@ -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,