 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
PCSpectra.com
Joined: 07 Oct 2006 Posts: 1
|
Posted: Sat Oct 07, 2006 6:07 pm Post subject: Emulating OOP |
|
|
I'm totally new to the world of GTK+ coming from Windows and MFC...
Why does GTK+ appear to use a C style approach to supporting OOP??? It's fine and all (although i prefer actual objects) what was the reasoning?
Speed? Compiler support? what...?
Just curious...I'm reading the very well written docs on the entire system and how glib, gdk, GTK+, etc all work togather...although it's not exactly clearn how everything works...it sounds quite impressive and interesting...
Cheers :) |
|
| Back to top |
|
 |
openldev Never Seen the Sunlight
Joined: 21 Sep 2005 Posts: 372 Location: State College, Pennsylvania
|
Posted: Sun Oct 08, 2006 3:05 am Post subject: |
|
|
It would take a long time to explain that, but the short answer is that one of the goals was to be able to wrap GTK+ and its supporting libraries easily with other languages. GObject is very convoluted, but it is an extensible system.
The other thing is that the system supports true object orientation in C, including polymorphism, data hiding (to the extent allowed by the language), inheritance, etc. And yes, it is very fast. I would recommend you check out an excellent tutorial by Mathieu Lacage, located at http://le-hacker.org/papers/gobject/. It's long and involved, but it is very informative.
If you have any questions as you go along working with GTK+, I try and keep up with these forums, even though they are not very active.
Also, I would like to shamelessly plug my book, [i]Foundations of GTK+ Development[i]. More information can be found at http://book.andrewkrause.net. Unfortunately, it will not be available until March 5, 2007, but it is available for preorder from Amazon.com. I am also willing to answer any questions you might have if I can. Good luck! :) |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|