diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c index f764c96331..3e50c4fb20 100644 --- a/gtk/gtktextbuffer.c +++ b/gtk/gtktextbuffer.c @@ -4078,6 +4078,13 @@ cut_or_copy (GtkTextBuffer *buffer, } } +GdkContentProvider * +gtk_text_buffer_get_selection_content (GtkTextBuffer *buffer) +{ + return gtk_text_buffer_content_new (buffer); +} + + /** * gtk_text_buffer_cut_clipboard: * @buffer: a #GtkTextBuffer diff --git a/gtk/gtktextbuffer.h b/gtk/gtktextbuffer.h index 9517077fe6..969db7f3d8 100644 --- a/gtk/gtktextbuffer.h +++ b/gtk/gtktextbuffer.h @@ -453,6 +453,10 @@ gboolean gtk_text_buffer_delete_selection (GtkTextBuffer *buffer, gboolean interactive, gboolean default_editable); +GDK_AVAILABLE_IN_ALL +GdkContentProvider * + gtk_text_buffer_get_selection_content (GtkTextBuffer *buffer); + GDK_AVAILABLE_IN_ALL gboolean gtk_text_buffer_get_can_undo (GtkTextBuffer *buffer); GDK_AVAILABLE_IN_ALL