gtkdnd.h 4.02 KB
Newer Older
1
/* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
Cody Russell's avatar
Cody Russell committed
2
/* GTK - The GIMP Toolkit
3
4
5
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
8
9
10
11
12
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 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
Javier Jardón's avatar
Javier Jardón committed
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
22
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
23
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
24
25
 */

26
27
28
#ifndef __GTK_DND_H__
#define __GTK_DND_H__

29

30
31
32
33
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif

34
35
36
#include <gtk/gtkwidget.h>
#include <gtk/gtkselection.h>

37

38
G_BEGIN_DECLS
39
40
41

/* Destination side */

42
GDK_AVAILABLE_IN_ALL
43
44
45
void gtk_drag_get_data (GtkWidget      *widget,
			GdkDragContext *context,
			GdkAtom         target,
46
			guint32         time_);
47
GDK_AVAILABLE_IN_ALL
48
49
void gtk_drag_finish   (GdkDragContext *context,
			gboolean        success,
50
			gboolean        del,
51
			guint32         time_);
52

53
GDK_AVAILABLE_IN_ALL
54
55
GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context);

56
GDK_AVAILABLE_IN_ALL
57
void gtk_drag_highlight   (GtkWidget  *widget);
58
GDK_AVAILABLE_IN_ALL
59
60
61
62
void gtk_drag_unhighlight (GtkWidget  *widget);

/* Source side */

63
64
65
66
67
68
69
70
71
72
GDK_AVAILABLE_IN_3_10
GdkDragContext *gtk_drag_begin_with_coordinates (GtkWidget         *widget,
                                                 GtkTargetList     *targets,
                                                 GdkDragAction      actions,
                                                 gint               button,
                                                 GdkEvent          *event,
                                                 gint               x,
                                                 gint               y);

GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_begin_with_coordinates)
73
74
75
76
77
78
GdkDragContext *gtk_drag_begin (GtkWidget         *widget,
				GtkTargetList     *targets,
				GdkDragAction      actions,
				gint               button,
				GdkEvent          *event);

79
80
81
GDK_AVAILABLE_IN_3_16
void gtk_drag_cancel           (GdkDragContext *context);

82
GDK_AVAILABLE_IN_ALL
83
84
85
86
void gtk_drag_set_icon_widget (GdkDragContext *context,
			       GtkWidget      *widget,
			       gint            hot_x,
			       gint            hot_y);
87
GDK_AVAILABLE_IN_ALL
88
89
90
91
void gtk_drag_set_icon_pixbuf (GdkDragContext *context,
			       GdkPixbuf      *pixbuf,
			       gint            hot_x,
			       gint            hot_y);
92
GDK_DEPRECATED_IN_3_10_FOR(gtk_drag_set_icon_name)
93
94
95
96
void gtk_drag_set_icon_stock  (GdkDragContext *context,
			       const gchar    *stock_id,
			       gint            hot_x,
			       gint            hot_y);
97
GDK_AVAILABLE_IN_ALL
98
99
void gtk_drag_set_icon_surface(GdkDragContext *context,
			       cairo_surface_t *surface);
100
GDK_AVAILABLE_IN_ALL
101
102
103
104
void gtk_drag_set_icon_name   (GdkDragContext *context,
			       const gchar    *icon_name,
			       gint            hot_x,
			       gint            hot_y);
105
GDK_AVAILABLE_IN_3_2
106
107
108
109
void gtk_drag_set_icon_gicon  (GdkDragContext *context,
			       GIcon          *icon,
			       gint            hot_x,
			       gint            hot_y);
110

111
GDK_AVAILABLE_IN_ALL
112
113
void gtk_drag_set_icon_default (GdkDragContext    *context);

114
GDK_AVAILABLE_IN_ALL
Owen Taylor's avatar
Owen Taylor committed
115
116
117
118
119
120
gboolean gtk_drag_check_threshold (GtkWidget *widget,
				   gint       start_x,
				   gint       start_y,
				   gint       current_x,
				   gint       current_y);

121

122
G_END_DECLS
123
124

#endif /* __GTK_DND_H__ */