Merge branch 'async-api' into 'master'

Small async api fixes

See merge request GNOME/gtk!701
This commit is contained in:
Matthias Clasen 2019-04-02 15:45:30 +00:00
commit 7a08177a3d
14 changed files with 31 additions and 31 deletions

View File

@ -331,8 +331,8 @@ gdk_clipboard_read_local_async (GdkClipboard *clipboard,
static GInputStream *
gdk_clipboard_read_local_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, clipboard), NULL);
@ -673,9 +673,9 @@ gdk_clipboard_read_async (GdkClipboard *clipboard,
/**
* gdk_clipboard_read_finish:
* @clipboard: a #GdkClipboard
* @result: a #GAsyncResult
* @out_mime_type: (out) (allow-none) (transfer none): pointer to store
* the chosen mime type in or %NULL
* @result: a #GAsyncResult
* @error: a #GError location to store the error occurring, or %NULL to
* ignore.
*
@ -685,8 +685,8 @@ gdk_clipboard_read_async (GdkClipboard *clipboard,
**/
GInputStream *
gdk_clipboard_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
g_return_val_if_fail (GDK_IS_CLIPBOARD (clipboard), NULL);
@ -696,11 +696,11 @@ gdk_clipboard_read_finish (GdkClipboard *clipboard,
* read was ongoing */
if (g_async_result_is_tagged (result, gdk_clipboard_read_local_async))
{
return gdk_clipboard_read_local_finish (clipboard, out_mime_type, result, error);
return gdk_clipboard_read_local_finish (clipboard, result, out_mime_type, error);
}
else
{
return GDK_CLIPBOARD_GET_CLASS (clipboard)->read_finish (clipboard, out_mime_type, result, error);
return GDK_CLIPBOARD_GET_CLASS (clipboard)->read_finish (clipboard, result, out_mime_type, error);
}
}
@ -733,7 +733,7 @@ gdk_clipboard_read_value_got_stream (GObject *source,
GTask *task = data;
const char *mime_type;
stream = gdk_clipboard_read_finish (GDK_CLIPBOARD (source), &mime_type, result, &error);
stream = gdk_clipboard_read_finish (GDK_CLIPBOARD (source), result, &mime_type, &error);
if (stream == NULL)
{
g_task_return_error (task, error);

View File

@ -66,8 +66,8 @@ void gdk_clipboard_read_async (GdkClipboard *
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GInputStream * gdk_clipboard_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error);
GDK_AVAILABLE_IN_ALL
void gdk_clipboard_read_value_async (GdkClipboard *clipboard,
@ -81,14 +81,14 @@ const GValue * gdk_clipboard_read_value_finish (GdkClipboard *
GAsyncResult *result,
GError **error);
GDK_AVAILABLE_IN_ALL
void gdk_clipboard_read_texture_async(GdkClipboard *clipboard,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
void gdk_clipboard_read_texture_async (GdkClipboard *clipboard,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GdkTexture * gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
GAsyncResult *result,
GError **error);
GdkTexture * gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
GAsyncResult *result,
GError **error);
GDK_AVAILABLE_IN_ALL
void gdk_clipboard_read_text_async (GdkClipboard *clipboard,
GCancellable *cancellable,

View File

@ -60,8 +60,8 @@ struct _GdkClipboardClass
GAsyncReadyCallback callback,
gpointer user_data);
GInputStream * (* read_finish) (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error);
};

View File

@ -149,8 +149,8 @@ gdk_drop_read_local_async (GdkDrop *self,
static GInputStream *
gdk_drop_read_local_finish (GdkDrop *self,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (result, self), NULL);
@ -622,8 +622,8 @@ gdk_drop_read_async (GdkDrop *self,
/**
* gdk_drop_read_finish:
* @self: a #GdkDrop
* @out_mime_type: (out) (type utf8): return location for the used mime type
* @result: a #GAsyncResult
* @out_mime_type: (out) (type utf8): return location for the used mime type
* @error: (allow-none): location to store error information on failure, or %NULL
*
* Finishes an async drop read operation, see gdk_drop_read_async().
@ -632,8 +632,8 @@ gdk_drop_read_async (GdkDrop *self,
*/
GInputStream *
gdk_drop_read_finish (GdkDrop *self,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
g_return_val_if_fail (GDK_IS_DROP (self), NULL);
@ -641,11 +641,11 @@ gdk_drop_read_finish (GdkDrop *self,
if (g_async_result_is_tagged (result, gdk_drop_read_local_async))
{
return gdk_drop_read_local_finish (self, out_mime_type, result, error);
return gdk_drop_read_local_finish (self, result, out_mime_type, error);
}
else
{
return GDK_DROP_GET_CLASS (self)->read_finish (self, out_mime_type, result, error);
return GDK_DROP_GET_CLASS (self)->read_finish (self, result, out_mime_type, error);
}
}
@ -678,7 +678,7 @@ gdk_drop_read_value_got_stream (GObject *source,
GTask *task = data;
const char *mime_type;
stream = gdk_drop_read_finish (GDK_DROP (source), &mime_type, result, &error);
stream = gdk_drop_read_finish (GDK_DROP (source), result, &mime_type, &error);
if (stream == NULL)
{
g_task_return_error (task, error);

View File

@ -68,8 +68,8 @@ void gdk_drop_read_async (GdkDrop
gpointer user_data);
GDK_AVAILABLE_IN_ALL
GInputStream * gdk_drop_read_finish (GdkDrop *self,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error);
GDK_AVAILABLE_IN_ALL
void gdk_drop_read_value_async (GdkDrop *self,

View File

@ -51,8 +51,8 @@ struct _GdkDropClass {
GAsyncReadyCallback callback,
gpointer user_data);
GInputStream * (* read_finish) (GdkDrop *self,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error);
};

View File

@ -250,8 +250,8 @@ gdk_wayland_clipboard_read_async (GdkClipboard *clipboard,
static GInputStream *
gdk_wayland_clipboard_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -224,8 +224,8 @@ gdk_wayland_drop_read_async (GdkDrop *drop,
static GInputStream *
gdk_wayland_drop_read_finish (GdkDrop *drop,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -331,8 +331,8 @@ gdk_wayland_primary_read_async (GdkClipboard *clipboard,
static GInputStream *
gdk_wayland_primary_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GInputStream *stream;

View File

@ -234,8 +234,8 @@ gdk_win32_clipboard_read_async (GdkClipboard *clipboard,
static GInputStream *
gdk_win32_clipboard_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -1382,8 +1382,8 @@ gdk_win32_drop_read_async (GdkDrop *drop,
static GInputStream *
gdk_win32_drop_read_finish (GdkDrop *drop,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -776,8 +776,8 @@ gdk_x11_clipboard_read_async (GdkClipboard *clipboard,
static GInputStream *
gdk_x11_clipboard_read_finish (GdkClipboard *clipboard,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -211,8 +211,8 @@ gdk_x11_drop_read_async (GdkDrop *drop,
static GInputStream *
gdk_x11_drop_read_finish (GdkDrop *drop,
const char **out_mime_type,
GAsyncResult *result,
const char **out_mime_type,
GError **error)
{
GTask *task;

View File

@ -244,7 +244,7 @@ gtk_drag_get_data_got_stream (GObject *source,
GInputStream *input_stream;
GOutputStream *output_stream;
input_stream = gdk_drop_read_finish (GDK_DROP (source), &data->mime_type, result, NULL);
input_stream = gdk_drop_read_finish (GDK_DROP (source), result, &data->mime_type, NULL);
if (input_stream == NULL)
{
gtk_drag_get_data_finish (data, NULL, 0);