Return type question ...



Why do the gtk_XXXXXX_new() functions return a pointer to GtkWidget instead
of a pointer to XXXXXX?

I presume this was a design decision made somewhere, but is this being carried
solely for backward compatibility?  Or is there a really important reason
that I should be making everything a GtkWidget rather than casting it
immediately like:

button = GTK_BUTTON(gtk_button_new_with_label("button));

Or is this just a religious war?

Andy L.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]