GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Emulating OOP

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
PCSpectra.com



Joined: 07 Oct 2006
Posts: 1

PostPosted: Sat Oct 07, 2006 6:07 pm    Post subject: Emulating OOP Reply with quote

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: 385
Location: Fairfax, Virginia

PostPosted: Sun Oct 08, 2006 3:05 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP