Developing applications using gobject-based libraries, I noticed too often I need container for my own types. While the UI problems are partially solved by GtkContainer, I ever messed a more generic way to do the same thing for no UI objects.

libgcontainer is a little library that provides the following types:

GChildable, an interface for object that can be child of another object;

GChild, a base class implementing GChildable;

GContainerable, an interface for object that can have children;

GContainer, a base class implementing GChildable and GContainerable managing children trought a GSList (similar to GtkContainer);

GBin, a base class implementing GChildable and GContainerable which can have only one child (similar to GtkBin).