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 | |
32 | G_BEGIN_DECLS |
33 | |
34 | G_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 | |
40 | GDK_AVAILABLE_IN_ALL |
41 | GType gdk_drop_get_type (void) G_GNUC_CONST; |
42 | |
43 | GDK_AVAILABLE_IN_ALL |
44 | GdkDisplay * gdk_drop_get_display (GdkDrop *self); |
45 | GDK_AVAILABLE_IN_ALL |
46 | GdkDevice * gdk_drop_get_device (GdkDrop *self); |
47 | GDK_AVAILABLE_IN_ALL |
48 | GdkSurface * gdk_drop_get_surface (GdkDrop *self); |
49 | GDK_AVAILABLE_IN_ALL |
50 | GdkContentFormats * gdk_drop_get_formats (GdkDrop *self); |
51 | GDK_AVAILABLE_IN_ALL |
52 | GdkDragAction gdk_drop_get_actions (GdkDrop *self); |
53 | GDK_AVAILABLE_IN_ALL |
54 | GdkDrag * gdk_drop_get_drag (GdkDrop *self); |
55 | |
56 | GDK_AVAILABLE_IN_ALL |
57 | void gdk_drop_status (GdkDrop *self, |
58 | GdkDragAction actions, |
59 | GdkDragAction preferred); |
60 | GDK_AVAILABLE_IN_ALL |
61 | void gdk_drop_finish (GdkDrop *self, |
62 | GdkDragAction action); |
63 | |
64 | GDK_AVAILABLE_IN_ALL |
65 | void 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); |
71 | GDK_AVAILABLE_IN_ALL |
72 | GInputStream * gdk_drop_read_finish (GdkDrop *self, |
73 | GAsyncResult *result, |
74 | const char **out_mime_type, |
75 | GError **error); |
76 | GDK_AVAILABLE_IN_ALL |
77 | void gdk_drop_read_value_async (GdkDrop *self, |
78 | GType type, |
79 | int io_priority, |
80 | GCancellable *cancellable, |
81 | GAsyncReadyCallback callback, |
82 | gpointer user_data); |
83 | GDK_AVAILABLE_IN_ALL |
84 | const GValue * gdk_drop_read_value_finish (GdkDrop *self, |
85 | GAsyncResult *result, |
86 | GError **error); |
87 | |
88 | G_END_DECLS |
89 | |
90 | #endif /* __GDK_DROP_H__ */ |
91 | |