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 | #ifndef __GDK_DROP_PRIVATE_H__ |
21 | #define __GDK_DROP_PRIVATE_H__ |
22 | |
23 | #include "gdkdrop.h" |
24 | |
25 | G_BEGIN_DECLS |
26 | |
27 | |
28 | #define GDK_DROP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DROP, GdkDropClass)) |
29 | #define GDK_IS_DROP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DROP)) |
30 | #define GDK_DROP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DROP, GdkDropClass)) |
31 | |
32 | typedef struct _GdkDropClass GdkDropClass; |
33 | |
34 | |
35 | struct _GdkDrop { |
36 | GObject parent_instance; |
37 | }; |
38 | |
39 | struct _GdkDropClass { |
40 | GObjectClass parent_class; |
41 | |
42 | void (* status) (GdkDrop *self, |
43 | GdkDragAction actions, |
44 | GdkDragAction preferred); |
45 | void (* finish) (GdkDrop *self, |
46 | GdkDragAction action); |
47 | |
48 | void (* read_async) (GdkDrop *self, |
49 | GdkContentFormats *formats, |
50 | int io_priority, |
51 | GCancellable *cancellable, |
52 | GAsyncReadyCallback callback, |
53 | gpointer user_data); |
54 | GInputStream * (* read_finish) (GdkDrop *self, |
55 | GAsyncResult *result, |
56 | const char **out_mime_type, |
57 | GError **error); |
58 | }; |
59 | |
60 | void gdk_drop_set_actions (GdkDrop *self, |
61 | GdkDragAction actions); |
62 | |
63 | void gdk_drop_emit_enter_event (GdkDrop *self, |
64 | gboolean dont_queue, |
65 | double x, |
66 | double y, |
67 | guint32 time); |
68 | void gdk_drop_emit_motion_event (GdkDrop *self, |
69 | gboolean dont_queue, |
70 | double x, |
71 | double y, |
72 | guint32 time); |
73 | void gdk_drop_emit_leave_event (GdkDrop *self, |
74 | gboolean dont_queue, |
75 | guint32 time); |
76 | void gdk_drop_emit_drop_event (GdkDrop *self, |
77 | gboolean dont_queue, |
78 | double x, |
79 | double y, |
80 | guint32 time); |
81 | |
82 | G_END_DECLS |
83 | |
84 | #endif |
85 | |