User: Password:
|
|
Subscribe / Log in / New account

GTK+ 3.8.0 released

GTK+ 3.8.0 released

Posted Mar 27, 2013 18:05 UTC (Wed) by HelloWorld (guest, #56129)
In reply to: GTK+ 3.8.0 released by boudewijn
Parent article: GTK+ 3.8.0 released

> Erm... I would hesitate to say that C++ is just some sort of C with classes, just like GTK uses. It's quite a bit more, and makes life quite a bit easier and high-level for the developer.
It isn't quite as simple. GObject offers quite a few things that the C++ object model doesn't: signals, introspection and an all-encompassing type hierarchy (GType/GValue) that, unlike the C++ object model, includes primitive types.

Of course it's a horrible pain to use all that from C, but that's why Vala exists.


(Log in to post comments)

GTK+ 3.8.0 released

Posted Mar 27, 2013 19:41 UTC (Wed) by boudewijn (subscriber, #14185) [Link]

"Some sort of C with classes" is a quote from the original poster. I know that gobject offers stuff that has been available to Java developers from the start and to C++ developers since Qt appeared -- but that doesn't make the original claim that C++ or Objective C is "just some sort of C with classes, comparable to GTK" sensible.

GTK+ 3.8.0 released

Posted Mar 28, 2013 2:27 UTC (Thu) by tetley80 (guest, #88691) [Link]

    It isn't quite as simple. GObject offers quite a few things that the C++ object model doesn't: signals, introspection and an all-encompassing type hierarchy (GType/GValue) that, unlike the C++ object model, includes primitive types. Of course it's a horrible pain to use all that from C, but that's why Vala exists.

On a related note, there seems to be a decent C++ wrapper for GTK+, called gtkmm (which also has signals).

Does anybody have experience with it? How does it compare to using Vala, or Qt ?

GTK+ 3.8.0 released

Posted Mar 28, 2013 4:43 UTC (Thu) by talisein (subscriber, #31829) [Link]

I've made a few toy apps with it. It works very well in my experience. Where Glib or Gtk give something like a GList, Gtkmm transforms it into a standard library object such as a std::vector, and also accepts standard objects where expected. So its much more of a standard C++ experience than you would get with Qt. If some C library, like say libchamplain, isn't wrapped, you can just access it with C functions; you always have access to the underlying C GObject. You can also directly subclass Glib::Object and give it properties and such.

I can't really say how it compares to Vala, other than I suspect it is more straightforward to use a non-GObject C or C++ library in Gtkmm than it is with Vala.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds