summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.h
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-08-07 05:10:42 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2013-08-14 07:12:52 -0400
commit030b62d122d825c3f043116bca29dd6cc7896210 (patch)
tree4c6a293dbbcac954cf9fe99f9d8408c1185c4843 /gtk/gtkdnd.h
parente80d1f0523d8e47deff687b3aa6877a152507d0d (diff)
downloadgtk+-030b62d122d825c3f043116bca29dd6cc7896210.tar.gz
gtkdnd: Introduce a new API for more accurate drag origin data
When trying to drag, we currently the position of the first motion event to determine where the drag came from. This might be alright in the case of the old animation, but the data will be inaccurate if the user has moved the pointer quite a bit since pressing the cursor to start dragging. While we could monkey patch the GdkEvent at the widget layer, this is unintuitive and strange. Add a new API that takes a set of pointer coordinates describing the origin of the drag. Additionally, adapt most widgets to use it and use it with correct coordinates. https://bugzilla.gnome.org/show_bug.cgi?id=705605
Diffstat (limited to 'gtk/gtkdnd.h')
-rw-r--r--gtk/gtkdnd.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h
index 3ac12cd08a..c3fc90f13a 100644
--- a/gtk/gtkdnd.h
+++ b/gtk/gtkdnd.h
@@ -187,7 +187,16 @@ void gtk_drag_source_set_icon_gicon (GtkWidget *widget,
* as a GtkTargetList
*/
-GDK_AVAILABLE_IN_ALL
+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)
GdkDragContext *gtk_drag_begin (GtkWidget *widget,
GtkTargetList *targets,
GdkDragAction actions,