1/*
2 * Copyright © 2018 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20
21#ifndef __GDK_DROP_H__
22#define __GDK_DROP_H__
23
24#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gdk/gdk.h> can be included directly."
26#endif
27
28#include <gdk/gdkenums.h>
29#include <gdk/gdktypes.h>
30#include <gdk/gdkversionmacros.h>
31
32G_BEGIN_DECLS
33
34G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrop, g_object_unref)
35
36#define GDK_TYPE_DROP (gdk_drop_get_type ())
37#define GDK_DROP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DROP, GdkDrop))
38#define GDK_IS_DROP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DROP))
39
40GDK_AVAILABLE_IN_ALL
41GType gdk_drop_get_type (void) G_GNUC_CONST;
42
43GDK_AVAILABLE_IN_ALL
44GdkDisplay * gdk_drop_get_display (GdkDrop *self);
45GDK_AVAILABLE_IN_ALL
46GdkDevice * gdk_drop_get_device (GdkDrop *self);
47GDK_AVAILABLE_IN_ALL
48GdkSurface * gdk_drop_get_surface (GdkDrop *self);
49GDK_AVAILABLE_IN_ALL
50GdkContentFormats * gdk_drop_get_formats (GdkDrop *self);
51GDK_AVAILABLE_IN_ALL
52GdkDragAction gdk_drop_get_actions (GdkDrop *self);
53GDK_AVAILABLE_IN_ALL
54GdkDrag * gdk_drop_get_drag (GdkDrop *self);
55
56GDK_AVAILABLE_IN_ALL
57void gdk_drop_status (GdkDrop *self,
58 GdkDragAction actions,
59 GdkDragAction preferred);
60GDK_AVAILABLE_IN_ALL
61void gdk_drop_finish (GdkDrop *self,
62 GdkDragAction action);
63
64GDK_AVAILABLE_IN_ALL
65void gdk_drop_read_async (GdkDrop *self,
66 const char **mime_types,
67 int io_priority,
68 GCancellable *cancellable,
69 GAsyncReadyCallback callback,
70 gpointer user_data);
71GDK_AVAILABLE_IN_ALL
72GInputStream * gdk_drop_read_finish (GdkDrop *self,
73 GAsyncResult *result,
74 const char **out_mime_type,
75 GError **error);
76GDK_AVAILABLE_IN_ALL
77void gdk_drop_read_value_async (GdkDrop *self,
78 GType type,
79 int io_priority,
80 GCancellable *cancellable,
81 GAsyncReadyCallback callback,
82 gpointer user_data);
83GDK_AVAILABLE_IN_ALL
84const GValue * gdk_drop_read_value_finish (GdkDrop *self,
85 GAsyncResult *result,
86 GError **error);
87
88G_END_DECLS
89
90#endif /* __GDK_DROP_H__ */
91

source code of gtk/gdk/gdkdrop.h