diff -r 3099bf907e21 -r bedd499b640d ui/gtk/dnd.h --- a/ui/gtk/dnd.h Tue Nov 26 15:53:57 2024 +0100 +++ b/ui/gtk/dnd.h Wed Nov 27 13:28:21 2024 +0100 @@ -32,12 +32,37 @@ #include "../ui/dnd.h" #include "toolkit.h" +#include + #ifdef __cplusplus extern "C" { #endif +#if GTK_MAJOR_VERSION >= 4 + +struct UiDnD { + GtkDropTarget *target; + const GValue *value; + CxList *providers; + GdkDragAction selected_action; + gboolean delete; + gboolean accept; +}; + +#else + +struct UiDnD { + GdkDragContext *context; + GtkSelectionData *data; + GdkDragAction selected_action; + gboolean delete; + gboolean accept; +}; +#endif +UiDnD* ui_create_dnd(void); +void ui_dnd_free(UiDnD *dnd); #ifdef __cplusplus }