Re: GTK+ brochure for FOSDEM



On Fri, Jan 23, 2015 at 09:00:53PM +0000, Chris Vine wrote:
You are looking at it from the perspective of a GTK+ developer and not
an application developer.

(I'm not a GTK+ developer, I just contribute a little)

Application developers not providing applications specifically for
the gnome stack almost never need to sub-class the library-provided GTK+
widgets.  For example, contrary to what you think, they do not sub-class
GtkWindow for their main window.  Instead they use the (generally)
perfectly adequate GTK+ container system to put things in GtkWindow
objects, or in library-provided sub-classes of GtkWindow.  If they want
to be particularly rigorous, they may provide a convenience factory
function for the purpose.  If that doesn't work they probably use
another toolkit, because OO with GObject is a pain for the application
developer writing in C (and as I say, normally completely unnecessary).
Nor for that matter would they normally sub-class GtkApplication: they
just connect to GApplication signals to customize behaviour.

Only in very specialized circumstances is derivation necessary in the
average application.

Yes, for a small application it's another possible code architecture.
But I would still recommend to write C code in object oriented style (if
the C language has been chosen).

Sébastien


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