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 /* Flags for the GtkTargetEntry on the destination side
41 GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
42 GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
45 /* Destination side */
47 void gtk_drag_get_data (GtkWidget *widget,
48 GdkDragContext *context,
51 void gtk_drag_finish (GdkDragContext *context,
56 GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context);
58 void gtk_drag_highlight (GtkWidget *widget);
59 void gtk_drag_unhighlight (GtkWidget *widget);
61 void gtk_drag_dest_set (GtkWidget *widget,
62 GtkDestDefaults flags,
63 const GtkTargetEntry *targets,
65 GdkDragAction actions);
67 void gtk_drag_dest_set_proxy (GtkWidget *widget,
68 GdkWindow *proxy_window,
69 GdkDragProtocol protocol,
70 gboolean use_coordinates);
72 /* There probably should be functions for setting the targets
76 void gtk_drag_dest_unset (GtkWidget *widget);
80 void gtk_drag_source_set (GtkWidget *widget,
81 GdkModifierType start_button_mask,
82 const GtkTargetEntry *targets,
84 GdkDragAction actions);
86 void gtk_drag_source_unset (GtkWidget *widget);
88 void gtk_drag_source_set_icon (GtkWidget *widget,
89 GdkColormap *colormap,
93 /* There probably should be functions for setting the targets
97 GdkDragContext *gtk_drag_begin (GtkWidget *widget,
98 GtkTargetList *targets,
99 GdkDragAction actions,
103 /* Set the image being dragged around
105 void gtk_drag_set_icon_widget (GdkDragContext *context,
110 void gtk_drag_set_icon_pixmap (GdkDragContext *context,
111 GdkColormap *colormap,
117 void gtk_drag_set_icon_default (GdkDragContext *context);
119 void gtk_drag_set_default_icon (GdkColormap *colormap,
126 /* Internal functions */
127 void gtk_drag_source_handle_event (GtkWidget *widget,
129 void gtk_drag_dest_handle_event (GtkWidget *toplevel,
134 #endif /* __cplusplus */
136 #endif /* __GTK_DND_H__ */