Why do constructors return GtkWidget?
- From: Javier Jardón <javierjc1982 gmail com>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Why do constructors return GtkWidget?
- Date: Wed, 4 Nov 2009 06:23:30 +0100
I'd like to continue the discussion here of thread  from gtk-app-devel-list:
The question: why is it normal for GTK widget "constructors" to return
GtkWidget and not their real type?
For instance I would expect:
To return GtkMenuItem*. But it doesn't, it returns GtkWidget*.
IMHO is much clear that constructors return their real type, instead
GtkWidget. But maybe there is a technical reason for this.
Can someone give me some light about this?
Thank you for your responses,
PD: If there is not technical reasons, maybe we can change this for
GTK+ 3 (or 4 ;)), as I think a change like this will break the 2.x
Javier Jardón Cabezas
] [Thread Prev