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
31G_BEGIN_DECLS
32
33typedef 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
43typedef struct _GtkDropTargetClass GtkDropTargetClass;
44
45GDK_AVAILABLE_IN_ALL
46GType gtk_drop_target_get_type (void) G_GNUC_CONST;
47
48GDK_AVAILABLE_IN_ALL
49GtkDropTarget * gtk_drop_target_new (GType type,
50 GdkDragAction actions);
51
52GDK_AVAILABLE_IN_ALL
53void gtk_drop_target_set_gtypes (GtkDropTarget *self,
54 GType *types,
55 gsize n_types);
56GDK_AVAILABLE_IN_ALL
57const GType * gtk_drop_target_get_gtypes (GtkDropTarget *self,
58 gsize *n_types);
59GDK_AVAILABLE_IN_ALL
60GdkContentFormats * gtk_drop_target_get_formats (GtkDropTarget *self);
61
62GDK_AVAILABLE_IN_ALL
63void gtk_drop_target_set_actions (GtkDropTarget *self,
64 GdkDragAction actions);
65GDK_AVAILABLE_IN_ALL
66GdkDragAction gtk_drop_target_get_actions (GtkDropTarget *self);
67
68GDK_AVAILABLE_IN_ALL
69void gtk_drop_target_set_preload (GtkDropTarget *self,
70 gboolean preload);
71GDK_AVAILABLE_IN_ALL
72gboolean gtk_drop_target_get_preload (GtkDropTarget *self);
73
74GDK_DEPRECATED_IN_4_4_FOR(gtk_drop_target_get_current_drop)
75GdkDrop * gtk_drop_target_get_drop (GtkDropTarget *self);
76
77GDK_AVAILABLE_IN_4_4
78GdkDrop * gtk_drop_target_get_current_drop (GtkDropTarget *self);
79
80GDK_AVAILABLE_IN_ALL
81const GValue * gtk_drop_target_get_value (GtkDropTarget *self);
82
83GDK_AVAILABLE_IN_ALL
84void gtk_drop_target_reject (GtkDropTarget *self);
85
86
87G_END_DECLS
88
89#endif /* __GTK_DROP_TARGET_H__ */
90

source code of gtk/gtk/gtkdroptarget.h