1 | /* |
2 | * Copyright © 2020 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 __GTK_DROP_TARGET_H__ |
21 | #define __GTK_DROP_TARGET_H__ |
22 | |
23 | |
24 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
25 | #error "Only <gtk/gtk.h> can be included directly." |
26 | #endif |
27 | |
28 | #include <gtk/gtktypes.h> |
29 | |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | typedef struct _GtkDropTarget GtkDropTarget; |
34 | |
35 | |
36 | #define GTK_TYPE_DROP_TARGET (gtk_drop_target_get_type ()) |
37 | #define GTK_DROP_TARGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_DROP_TARGET, GtkDropTarget)) |
38 | #define GTK_DROP_TARGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_DROP_TARGET, GtkDropTargetClass)) |
39 | #define GTK_IS_DROP_TARGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_DROP_TARGET)) |
40 | #define GTK_IS_DROP_TARGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_DROP_TARGET)) |
41 | #define GTK_DROP_TARGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_DROP_TARGET, GtkDropTargetClass)) |
42 | |
43 | typedef struct _GtkDropTargetClass GtkDropTargetClass; |
44 | |
45 | GDK_AVAILABLE_IN_ALL |
46 | GType gtk_drop_target_get_type (void) G_GNUC_CONST; |
47 | |
48 | GDK_AVAILABLE_IN_ALL |
49 | GtkDropTarget * gtk_drop_target_new (GType type, |
50 | GdkDragAction actions); |
51 | |
52 | GDK_AVAILABLE_IN_ALL |
53 | void gtk_drop_target_set_gtypes (GtkDropTarget *self, |
54 | GType *types, |
55 | gsize n_types); |
56 | GDK_AVAILABLE_IN_ALL |
57 | const GType * gtk_drop_target_get_gtypes (GtkDropTarget *self, |
58 | gsize *n_types); |
59 | GDK_AVAILABLE_IN_ALL |
60 | GdkContentFormats * gtk_drop_target_get_formats (GtkDropTarget *self); |
61 | |
62 | GDK_AVAILABLE_IN_ALL |
63 | void gtk_drop_target_set_actions (GtkDropTarget *self, |
64 | GdkDragAction actions); |
65 | GDK_AVAILABLE_IN_ALL |
66 | GdkDragAction gtk_drop_target_get_actions (GtkDropTarget *self); |
67 | |
68 | GDK_AVAILABLE_IN_ALL |
69 | void gtk_drop_target_set_preload (GtkDropTarget *self, |
70 | gboolean preload); |
71 | GDK_AVAILABLE_IN_ALL |
72 | gboolean gtk_drop_target_get_preload (GtkDropTarget *self); |
73 | |
74 | GDK_DEPRECATED_IN_4_4_FOR(gtk_drop_target_get_current_drop) |
75 | GdkDrop * gtk_drop_target_get_drop (GtkDropTarget *self); |
76 | |
77 | GDK_AVAILABLE_IN_4_4 |
78 | GdkDrop * gtk_drop_target_get_current_drop (GtkDropTarget *self); |
79 | |
80 | GDK_AVAILABLE_IN_ALL |
81 | const GValue * gtk_drop_target_get_value (GtkDropTarget *self); |
82 | |
83 | GDK_AVAILABLE_IN_ALL |
84 | void gtk_drop_target_reject (GtkDropTarget *self); |
85 | |
86 | |
87 | G_END_DECLS |
88 | |
89 | #endif /* __GTK_DROP_TARGET_H__ */ |
90 | |