ui/gtk/dnd.h

changeset 90
f501f0efc9a8
parent 0
2483f517c562
--- 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 <cx/list.h>
+
 #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
 }

mercurial