Re: Why do constructors return GtkWidget?
- From: Sven Herzberg <herzi gnome-de org>
- To: Javier Jardón <javierjc1982 gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Why do constructors return GtkWidget?
- Date: Wed, 04 Nov 2009 12:30:26 +0100
Hi,
Am Mittwoch, den 04.11.2009, 06:23 +0100 schrieb Javier Jardón:
> The question: why is it normal for GTK widget "constructors" to return
> GtkWidget and not their real type?
Cody perfectly replied to that already.
> 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
> ABI.
This change wouldn't break ABI (unless applications use). But it is a
serious API impact (just think of all the warnings about "wrong" types
in assignments.
In my opinion the GTK+ way is really nice (just compare it to GStreamers
element factory, which behaves essentially the same way, just as
GnomeCanvas' gnome_canvas_item_new() function). It's really nice to get
those items returned as the generic type (but Cody told you already).
Regards,
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]