The foreach() function is now gone, there's now API to get GTypes and names from the position in the path.
GtkWidgetPath represents a widget path. It will mainly used by theming engines to know detail about the widget hierarchy without actually accessing the widget.