void EZ_WidgetAddDnDDataEncoder(EZ_Widget *widget, Atom target, int tag, EZ_DnDEncoder encoder, void *edata, EZ_CallBack callback, void *cdata); void EZ_WidgetDeleteDnDDataEncoder(EZ_Widget *widget, EZ_DnDEncoder encoder, void *edata); void EZ_WidgetDeleteAllDnDDataEncoders(EZ_Widget *widget);
void EZ_ItemAddDnDDataEncoder(EZ_Item *item, Atom target, int tag, EZ_DnDEncoder encoder, void *edata, EZ_CallBack callback, void *cdata); void EZ_ItemDeleteDnDDataEncoder(EZ_Item *item, EZ_DnDEncoder encoder, void *edata); void EZ_ItemDeleteAllDnDDataEncoders(EZ_Item *item);
The tag argument used in
*Add*Encoder
is used to choose conversion
methods. It is useful for the following situations.
~0
is reserved for a special purpose: drop
at the root window of your display. Strictly speaking, the root
window is not a valid drop site because
it does not talk to the drag source.
Nevertheless, for applications like file managers, it is useful
to have a feature so a user can drop an item at the root window.
Since the root window is not an official drop site, there
will be no data transfers. The action is completely handled
by the drag source. If you want to use this feature. Here
are the tricks.
EZ_DND_SUCCESS
on success
and EZ_DND_FAILURE
on failure. The callbacks for
this special encoder behave exactly the same as that of a regular
encoder. It is invoked when the encoder returns
EZ_DND_SUCCESS
.
~0
.
void EZ_WidgetAddDnDDataDecoder(EZ_Widget *widget, Atom target, int tag, EZ_DnDDecoder decoder, void *edata, EZ_CallBack callback, void *cdata); void EZ_WidgetDeleteDnDDataDecoder(EZ_Widget *widget, EZ_DnDDecoder decoder, void *data); void EZ_WidgetDeleteAllDnDDataDecoders(EZ_Widget *widget);
void EZ_ItemAddDnDDataDecoder(EZ_Item *item, Atom target, int tag, EZ_DnDDecoder decoder, void *edata, EZ_CallBack callback, void *cdata); void EZ_ItemDeleteDnDDataDecoder(EZ_Item *item, EZ_DnDDecoder decoder, void *data); void EZ_ItemDeleteAllDnDDataDecoders(EZ_Item *item);
void EZ_GetDnDDropLocation(int *rootX, int *rootY, int *winX, int *winY);