ui/gtk/graphics.h

changeset 112
c3f2f16fa4b8
parent 0
2483f517c562
--- a/ui/gtk/graphics.h	Sat Oct 04 14:54:25 2025 +0200
+++ b/ui/gtk/graphics.h	Sun Oct 19 21:20:08 2025 +0200
@@ -36,18 +36,24 @@
 extern "C" {
 #endif
 
-typedef struct UiDrawEvent {
-    ui_drawfunc callback;
-    UiObject    *obj;
-    void        *userdata;
-} UiDrawEvent;
+
+typedef struct UiDrawingArea {
+    UiObject *obj;
+    GtkWidget *widget;
+    ui_drawfunc draw;
+    void *drawdata;
+    ui_callback onclick;
+    void *onclickdata;
+    ui_callback onmotion;
+    void *onmotiondata;
+} UiDrawingArea;
 
 struct UiTextLayout {
     PangoLayout *layout;
 };
 
 // implemented in draw_*.h
-void ui_connect_draw_handler(GtkWidget *widget, UiDrawEvent *event);
+//void ui_connect_draw_handler(GtkWidget *widget, UiDrawEvent *event);
 PangoContext *ui_get_pango_context(UiGraphics *g);
 
 #ifdef	__cplusplus

mercurial