GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 23, 2014 6:40 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Emulating OOP
PostPosted: Sat Oct 07, 2006 6:07 pm 
Offline

Joined: Sat Oct 07, 2006 6:04 pm
Posts: 1
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 :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 08, 2006 3:05 am 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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! :)

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group