mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
gdk: Add gdk_drag_drop_done
This will allow us to move the drag cancel animation to GDK. For now, it does nothing.
This commit is contained in:
parent
ed89e5f62a
commit
c590b83397
24
gdk/gdkdnd.c
24
gdk/gdkdnd.c
@ -503,3 +503,27 @@ gdk_drag_context_set_hotspot (GdkDragContext *context,
|
||||
if (GDK_DRAG_CONTEXT_GET_CLASS (context)->set_hotspot)
|
||||
GDK_DRAG_CONTEXT_GET_CLASS (context)->set_hotspot (context, hot_x, hot_y);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drag_drop_done:
|
||||
* @context: a #GdkDragContext
|
||||
* @success: whether the drag was ultimatively successful
|
||||
*
|
||||
* Inform GDK if the drop ended successfully. Passing %FALSE
|
||||
* for @success may trigger a drag cancellation animation.
|
||||
*
|
||||
* This function is called by the drag source, and should
|
||||
* be the last call before dropping the reference to the
|
||||
* @context.
|
||||
*
|
||||
* Since: 3.20
|
||||
*/
|
||||
void
|
||||
gdk_drag_drop_done (GdkDragContext *context,
|
||||
gboolean success)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
|
||||
|
||||
if (GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_done)
|
||||
GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_done (context, success);
|
||||
}
|
||||
|
@ -178,6 +178,10 @@ void gdk_drag_abort (GdkDragContext *context,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_drag_drop_succeeded (GdkDragContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_3_20
|
||||
void gdk_drag_drop_done (GdkDragContext *context,
|
||||
gboolean success);
|
||||
|
||||
GDK_AVAILABLE_IN_3_20
|
||||
GdkWindow *gdk_drag_context_get_drag_window (GdkDragContext *context);
|
||||
|
||||
|
@ -66,6 +66,8 @@ struct _GdkDragContextClass {
|
||||
void (*set_hotspot) (GdkDragContext *context,
|
||||
gint hot_x,
|
||||
gint hot_y);
|
||||
void (*drop_done) (GdkDragContext *context,
|
||||
gboolean success);
|
||||
};
|
||||
|
||||
struct _GdkDragContext {
|
||||
|
Loading…
Reference in New Issue
Block a user