diff -r 2fbb3cac05a5 -r f501f0efc9a8 ui/gtk/dnd.h --- a/ui/gtk/dnd.h Tue Nov 26 11:38:10 2024 +0100 +++ b/ui/gtk/dnd.h Wed Nov 27 13:27:30 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 }