1/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
2/* GTK - The GIMP Toolkit
3 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/*
20 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
21 * file for a list of people on the GTK+ Team. See the ChangeLog
22 * files for a list of changes. These files are distributed with
23 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
24 */
25
26#ifndef __GTK_DND_H__
27#define __GTK_DND_H__
28
29
30#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
31#error "Only <gtk/gtk.h> can be included directly."
32#endif
33
34#include <gtk/gtkwidget.h>
35#include <gtk/gtkselection.h>
36
37
38G_BEGIN_DECLS
39
40/* Destination side */
41
42GDK_AVAILABLE_IN_ALL
43void gtk_drag_get_data (GtkWidget *widget,
44 GdkDragContext *context,
45 GdkAtom target,
46 guint32 time_);
47GDK_AVAILABLE_IN_ALL
48void gtk_drag_finish (GdkDragContext *context,
49 gboolean success,
50 gboolean del,
51 guint32 time_);
52
53GDK_AVAILABLE_IN_ALL
54GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context);
55
56GDK_AVAILABLE_IN_ALL
57void gtk_drag_highlight (GtkWidget *widget);
58GDK_AVAILABLE_IN_ALL
59void gtk_drag_unhighlight (GtkWidget *widget);
60
61/* Source side */
62
63GDK_AVAILABLE_IN_3_10
64GdkDragContext *gtk_drag_begin_with_coordinates (GtkWidget *widget,
65 GtkTargetList *targets,
66 GdkDragAction actions,
67 gint button,
68 GdkEvent *event,
69 gint x,
70 gint y);
71
72GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_begin_with_coordinates)
73GdkDragContext *gtk_drag_begin (GtkWidget *widget,
74 GtkTargetList *targets,
75 GdkDragAction actions,
76 gint button,
77 GdkEvent *event);
78
79GDK_AVAILABLE_IN_3_16
80void gtk_drag_cancel (GdkDragContext *context);
81
82GDK_AVAILABLE_IN_ALL
83void gtk_drag_set_icon_widget (GdkDragContext *context,
84 GtkWidget *widget,
85 gint hot_x,
86 gint hot_y);
87GDK_AVAILABLE_IN_ALL
88void gtk_drag_set_icon_pixbuf (GdkDragContext *context,
89 GdkPixbuf *pixbuf,
90 gint hot_x,
91 gint hot_y);
92GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_set_icon_name)
93void gtk_drag_set_icon_stock (GdkDragContext *context,
94 const gchar *stock_id,
95 gint hot_x,
96 gint hot_y);
97GDK_AVAILABLE_IN_ALL
98void gtk_drag_set_icon_surface(GdkDragContext *context,
99 cairo_surface_t *surface);
100GDK_AVAILABLE_IN_ALL
101void gtk_drag_set_icon_name (GdkDragContext *context,
102 const gchar *icon_name,
103 gint hot_x,
104 gint hot_y);
105GDK_AVAILABLE_IN_3_2
106void gtk_drag_set_icon_gicon (GdkDragContext *context,
107 GIcon *icon,
108 gint hot_x,
109 gint hot_y);
110
111GDK_AVAILABLE_IN_ALL
112void gtk_drag_set_icon_default (GdkDragContext *context);
113
114GDK_AVAILABLE_IN_ALL
115gboolean gtk_drag_check_threshold (GtkWidget *widget,
116 gint start_x,
117 gint start_y,
118 gint current_x,
119 gint current_y);
120
121
122G_END_DECLS
123
124#endif /* __GTK_DND_H__ */
125

source code of include/gtk-3.0/gtk/gtkdnd.h