#GtkLayout is similar to #GtkDrawingArea in that it’s a “blank slate” and
doesn’t do anything except paint a blank background by default. It’s
different in that it supports scrolling natively due to implementing
#GtkScrollable, and can contain child widgets since it’s a #GtkContainer.
If you just want to draw, a #GtkDrawingArea is a better choice since it has
lower overhead. If you just need to position child widgets at specific
points, then #GtkFixed provides that functionality on its own.
#GtkLayout is similar to #GtkDrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default. It’s different in that it supports scrolling natively due to implementing #GtkScrollable, and can contain child widgets since it’s a #GtkContainer.
If you just want to draw, a #GtkDrawingArea is a better choice since it has lower overhead. If you just need to position child widgets at specific points, then #GtkFixed provides that functionality on its own.
When handling expose events on a #GtkLayout, you must draw to the #GdkWindow returned by gtk.layout.Layout.getBinWindow, rather than to the one returned by gtk.widget.Widget.getWindow as you would for a #GtkDrawingArea.