forked from AuroraMiddleware/gtk
textbuffer: Add a content provider api
We need a content provider for the selection, to implement DND, and the text buffer already has one. Just add an api to get it.
This commit is contained in:
parent
e9203eeef7
commit
a52757874e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user