forked from AuroraMiddleware/gtk
selection: Add another surface api
Of course, we need a getter too.
This commit is contained in:
parent
a4f7d0c0e0
commit
27e89c69cd
@ -1750,6 +1750,19 @@ gtk_selection_data_set_surface (GtkSelectionData *selection_data,
|
||||
return retval;
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -225,6 +225,8 @@ GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_selection_data_set_pixbuf (GtkSelectionData *selection_data,
|
||||
GdkPixbuf *pixbuf);
|
||||
GDK_AVAILABLE_IN_3_94
|
||||
cairo_surface_t *gtk_selection_data_get_surface (GtkSelectionData *selection_data);
|
||||
GDK_AVAILABLE_IN_3_94
|
||||
gboolean gtk_selection_data_set_surface (GtkSelectionData *selection_data,
|
||||
cairo_surface_t *surface);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
Loading…
Reference in New Issue
Block a user