1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
23 #include <gtk/gtkenums.h>
24 #include <gtk/gtkwidget.h>
25 #include <gtk/gtkselection.h>
30 #endif /* __cplusplus */
33 GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */
34 GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */
35 GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */
36 GTK_DEST_DEFAULT_ALL = 0x07
39 /* Destination side */
41 void gtk_drag_get_data (GtkWidget *widget,
42 GdkDragContext *context,
45 void gtk_drag_finish (GdkDragContext *context,
50 void gtk_drag_highlight (GtkWidget *widget);
51 void gtk_drag_unhighlight (GtkWidget *widget);
53 void gtk_drag_dest_set (GtkWidget *widget,
54 GtkDestDefaults flags,
55 GtkTargetEntry *targets,
57 GdkDragAction actions);
59 void gtk_drag_dest_set_proxy (GtkWidget *widget,
60 GdkWindow *proxy_window,
61 GdkDragProtocol protocol,
62 gboolean use_coordinates);
64 /* There probably should be functions for setting the targets
68 void gtk_drag_dest_unset (GtkWidget *widget);
72 void gtk_drag_source_set (GtkWidget *widget,
73 GdkModifierType start_button_mask,
74 GtkTargetEntry *targets,
76 GdkDragAction actions);
78 void gtk_drag_source_set_icon (GtkWidget *widget,
79 GdkColormap *colormap,
83 /* There probably should be functions for setting the targets
87 GdkDragContext *gtk_drag_begin (GtkWidget *widget,
88 GtkTargetList *targets,
89 GdkDragAction actions,
93 /* Set the image being dragged around
95 void gtk_drag_set_icon_widget (GdkDragContext *context,
100 void gtk_drag_set_icon_pixmap (GdkDragContext *context,
101 GdkColormap *colormap,
107 void gtk_drag_set_icon_default (GdkDragContext *context);
109 void gtk_drag_set_default_icon (GdkColormap *colormap,
116 /* Internal functions */
117 void gtk_drag_source_handle_event (GtkWidget *widget,
119 void gtk_drag_dest_handle_event (GtkWidget *toplevel,
124 #endif /* __cplusplus */
126 #endif /* __GTK_DND_H__ */