summaryrefslogtreecommitdiff
path: root/gdk/gdkclipboard.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-11-22 09:25:35 +0100
committerBenjamin Otte <otte@redhat.com>2017-12-03 05:46:26 +0100
commit41f70e18afd9e517fcd685ac46fd0e4937d016d4 (patch)
tree0f56b6b4d6c94ae7c235f85bc0e4b2c43a0ec430 /gdk/gdkclipboard.h
parent516f35b86500e139b9c17e17a12d1b492beca677 (diff)
downloadgtk+-41f70e18afd9e517fcd685ac46fd0e4937d016d4.tar.gz
clipboard: Refactor gdk_clipboard_read() to be async
This allows us not just to pass any mime type to the read function, but it also makes it possible to pass multiple mime types and the clipboard can then try them in order until it finds a supported one. This is so far not implemented though.
Diffstat (limited to 'gdk/gdkclipboard.h')
-rw-r--r--gdk/gdkclipboard.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdk/gdkclipboard.h b/gdk/gdkclipboard.h
index 6c36c940f9..5721fd10ff 100644
--- a/gdk/gdkclipboard.h
+++ b/gdk/gdkclipboard.h
@@ -43,8 +43,17 @@ GDK_AVAILABLE_IN_3_94
GdkContentFormats * gdk_clipboard_get_formats (GdkClipboard *clipboard);
GDK_AVAILABLE_IN_3_94
-GInputStream * gdk_clipboard_read (GdkClipboard *clipboard,
- const char *mime_type);
+void gdk_clipboard_read_async (GdkClipboard *clipboard,
+ const char **mime_types,
+ int io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GDK_AVAILABLE_IN_3_94
+GInputStream * gdk_clipboard_read_finish (GdkClipboard *clipboard,
+ const char **out_mime_type,
+ GAsyncResult *result,
+ GError **error);
G_END_DECLS