forked from enlightenment/efl
Ecore: add DnD abort from source
This can be used to cancel a DnD drag operation in the middle.
This commit is contained in:
parent
0e902ffffe
commit
1ae7a4f5e2
|
@ -1401,6 +1401,7 @@ EAPI void ecore_x_dnd_send_finished(void);
|
|||
EAPI void ecore_x_dnd_source_action_set(Ecore_X_Atom action);
|
||||
EAPI Ecore_X_Atom ecore_x_dnd_source_action_get(void);
|
||||
EAPI void ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data), const void *data);
|
||||
EAPI Eina_Bool ecore_x_dnd_abort(Ecore_X_Window xwin_source); /**< @since 1.9 */
|
||||
|
||||
EAPI Ecore_X_Window ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h);
|
||||
EAPI Ecore_X_Window ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h);
|
||||
|
|
|
@ -712,3 +712,13 @@ _ecore_xcb_dnd_converter_copy(char *target EINA_UNUSED,
|
|||
}
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_x_dnd_abort(Ecore_X_Window xwin_source)
|
||||
{
|
||||
if (xwin_source == _source->win)
|
||||
{
|
||||
_source->will_accept = 0;
|
||||
return ecore_x_dnd_self_drop();
|
||||
}
|
||||
else return EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -757,4 +757,15 @@ _ecore_x_dnd_drag(Ecore_X_Window root,
|
|||
_source->dest = win;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
ecore_x_dnd_abort(Ecore_X_Window xwin_source)
|
||||
{
|
||||
if (xwin_source == _source->win)
|
||||
{
|
||||
_source->will_accept = 0;
|
||||
return ecore_x_dnd_self_drop();
|
||||
}
|
||||
else return EINA_FALSE;
|
||||
}
|
||||
|
||||
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
|
||||
|
|
Loading…
Reference in New Issue