Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel

Implement gtk_drag_cancel, made public in c160ba069 and 62616a71, in
gtkdnd-quartz.c.
This commit is contained in:
John Ralls 2015-05-31 11:52:35 -07:00
parent f5b245ff04
commit 13c303fec5

View File

@ -62,6 +62,8 @@ static void gtk_drag_source_site_destroy (gpointer data);
static GtkDragSourceInfo *gtk_drag_get_source_info (GdkDragContext *context, static GtkDragSourceInfo *gtk_drag_get_source_info (GdkDragContext *context,
gboolean create); gboolean create);
static void gtk_drag_drop_finished (GtkDragSourceInfo *info);
extern GdkDragContext *gdk_quartz_drag_source_context (); /* gdk/quartz/gdkdnd-quartz.c */ extern GdkDragContext *gdk_quartz_drag_source_context (); /* gdk/quartz/gdkdnd-quartz.c */
struct _GtkDragSourceSite struct _GtkDragSourceSite
@ -1383,6 +1385,23 @@ gtk_drag_begin (GtkWidget *widget,
} }
/**
* gtk_drag_cancel:
* @context: a #GdkDragContext, as e.g. returned by gtk_drag_begin_with_coordinates()
*
*/
void
gtk_drag_cancel (GdkDragContext *context)
{
GtkDragSourceInfo *info;
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
info = gtk_drag_get_source_info (context, FALSE);
if (info != NULL)
gtk_drag_drop_finished (info);
}
static gboolean static gboolean
gtk_drag_source_event_cb (GtkWidget *widget, gtk_drag_source_event_cb (GtkWidget *widget,
GdkEvent *event, GdkEvent *event,