fix gtk3 build newapi

Tue, 17 Sep 2024 22:07:57 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 17 Sep 2024 22:07:57 +0200
branch
newapi
changeset 300
2f924f7ca901
parent 299
48763a9d19a7
child 301
f9e7c57e1e2f

fix gtk3 build

ui/gtk/draw_cairo.c file | annotate | diff | comparison | revisions
ui/gtk/toolkit.h file | annotate | diff | comparison | revisions
--- a/ui/gtk/draw_cairo.c	Tue Sep 17 22:00:07 2024 +0200
+++ b/ui/gtk/draw_cairo.c	Tue Sep 17 22:07:57 2024 +0200
@@ -62,7 +62,7 @@
 gboolean ui_drawingarea_expose(GtkWidget *w, cairo_t *cr, void *data) {
     int width = gtk_widget_get_allocated_width(w);
     int height = gtk_widget_get_allocated_height(w);
-    ui_drawingarea_draw(w, cr, width, height, data);
+    ui_drawingarea_draw(GTK_DRAWING_AREA(w), cr, width, height, data);
     return FALSE;
 }
 #endif
--- a/ui/gtk/toolkit.h	Tue Sep 17 22:00:07 2024 +0200
+++ b/ui/gtk/toolkit.h	Tue Sep 17 22:07:57 2024 +0200
@@ -52,11 +52,11 @@
 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_scrolled_window_get_child(GTK_SCROLLED_WINDOW(sw))
 #else
 #define WINDOW_SHOW(window) gtk_widget_show_all(window)
-#define WINDOW_DESTROY(window) gtk_window_destroy(GTK_WINDOW(window))
+#define WINDOW_DESTROY(window) gtk_widget_destroy(window)
 #define WINDOW_SET_CONTENT(window, child) gtk_container_add(GTK_CONTAINER(window), child)
 #define BOX_ADD(box, child) gtk_box_pack_end(GTK_BOX(box), child, TRUE, TRUE, 0)
-#define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_EDITABLE(entry), text)
-#define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_EDITABLE(entry))
+#define ENTRY_SET_TEXT(entry, text) gtk_entry_set_text(GTK_ENTRY(entry), text)
+#define ENTRY_GET_TEXT(entry) gtk_entry_get_text(GTK_ENTRY(entry))
 #define SCROLLEDWINDOW_NEW() gtk_scrolled_window_new(NULL, NULL)
 #define SCROLLEDWINDOW_SET_CHILD(sw, child) gtk_container_add(GTK_CONTAINER(sw), child)
 #define SCROLLEDWINDOW_GET_CHILD(sw) gtk_bin_get_child(GTK_BIN(sw))

mercurial