Coming from GTK

GTK 4 already thinks in boxes that grow and align, so the layout will feel familiar. What changes is the ownership: there is no widget to g_object_unref, no property to bind, and no CSS file — the theme is a value in the program, and one value in force.

GTKkeal-view
gtk_label_new("Hi")label("Hi")
g_signal_connect(btn, "clicked", …)button("Go", { -> … })
GtkBox, orientation verticalcolumn([…])
gtk_widget_set_hexpand.grows()
GtkDrawingArea + draw funccustom({ p -> … })
GtkCssProvider, style.cssuseTheme(darkTheme())
GtkPopover / GtkPopoverMenuopenMenu(x, y, […])

What will surprise you

The theme is one value, not a cascade

GTK's CSS is powerful and it is also a second language with its own selectors and specificity. Here there is one Theme: a surface ramp, an accent and three status hues, read by every widget including the ones you write. Changing it is one call, and it cannot half-apply.

There is no main loop to integrate with

runApp owns the loop, and between frames it blocks in kvWait. There is no GMainContext to attach a source to. If you need to wake the interface from elsewhere, you write a Cell; if you need it woken on a clock, you ask for the next frame in so many milliseconds.

You lose the platform's accessibility

GTK hands ATK a real tree of real widgets, and a screen reader reads it. keal-view draws pixels; there is no accessibility tree behind them yet. This is the largest single thing GTK gives you that this does not.

← All the toolkits