In this case, "window" is a pointer to type GtkWidget... so I'm guessing the GTK_CONTAINER serves as some kind of cast (Java background.. forgive me) to convert the GtkWidget to a GtkContainer? My reasoning is since... GtkContainer is a GtkWidget, you need more specificity since the function wants a container, not just any old widget. Is this correct?
The first parameter is supposed to be a pointer to type GObject... what role does G_OBJECT play here? If this is a cast operation... I'm not used to seeing casts goes this direction. Since GObject is the ultimate superclass.. why would you cast any subclass of GOBject back to GObject?
HildonWindow *window;
window = HILDON_WINDOW (hildon_window_new());
and
GtkWidget *window;
window = (hildon_window_new());
Essentially.. I'm trying to figure out why there's a need to do the whole HILDON_WINDOW(...) or GTK_CONTAINER(...)?
What's the real purpose of these functions? HILDON_WINDOW or GTK_CONTAINER?
Consider:
Another example I don't quite get is this one...