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>
29 #endif /* __cplusplus */
32 GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */
33 GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */
34 GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */
35 GTK_DEST_DEFAULT_ALL = 0x07
38 /* Destination side */
40 void gtk_drag_get_data (GtkWidget *widget,
41 GdkDragContext *context,
44 void gtk_drag_finish (GdkDragContext *context,
49 void gtk_drag_highlight (GtkWidget *widget);
50 void gtk_drag_unhighlight (GtkWidget *widget);
52 void gtk_drag_dest_set (GtkWidget *widget,
53 GtkDestDefaults flags,
54 GtkTargetEntry *targets,
56 GdkDragAction actions);
58 void gtk_drag_dest_set_proxy (GtkWidget *widget,
59 GdkWindow *proxy_window,
60 GdkDragProtocol protocol,
61 gboolean use_coordinates);
63 /* There probably should be functions for setting the targets
67 void gtk_drag_dest_unset (GtkWidget *widget);
71 void gtk_drag_source_set (GtkWidget *widget,
72 GdkModifierType start_button_mask,
73 GtkTargetEntry *targets,
75 GdkDragAction actions);
77 void gtk_drag_source_set_icon (GtkWidget *widget,
78 GdkColormap *colormap,
82 /* There probably should be functions for setting the targets
86 GdkDragContext *gtk_drag_begin (GtkWidget *widget,
87 GtkTargetList *targets,
88 GdkDragAction actions,
92 /* Set the image being dragged around
94 void gtk_drag_set_icon_widget (GdkDragContext *context,
99 void gtk_drag_set_icon_pixmap (GdkDragContext *context,
100 GdkColormap *colormap,
106 void gtk_drag_set_icon_default (GdkDragContext *context);
108 void gtk_drag_set_default_icon (GdkColormap *colormap,
115 /* Internal functions */
116 void gtk_drag_source_handle_event (GtkWidget *widget,
118 void gtk_drag_dest_handle_event (GtkWidget *toplevel,
123 #endif /* __cplusplus */
125 #endif /* __GTK_DND_H__ */