[gtkada] GTK and GTKAda

Andrew Carroll andrew at carroll-tech.net
Fri May 14 18:39:53 CEST 2004


Hello all.
I am a *newby*
I have a few questions.

I'll need to explain some background information before I ask my question(s).  Please, bear with me.
I am creating a day timer program and was thinking about Windows and portability.  I started thinking, what is a Window?  In reality it is nothing more than a bunch of pixels with their colors set in certain ways so that our eyes see what we believe is the image of a Window.  With that in mind I started thinking Where is 'class' Window defined for Windows?  How is the Frame of a window implemented on Windows.  What does the method that draws the Frame contain?  If I wanted to create my own "Windows" wouldn't it be a bunch of methods like OpenGL 2D (if there is such a thing)?

So I read a little about Windows 95 programming in the book Windows 95 A Developer's Guide by Jeffrey Richter and Jonathan Locke.  It talks a lot about how the OS is the caretaker of created windows and how you have to register a window and so on and so forth.  So then I asked myself How did the makers of GtkAda make GtkAda?  What about Java?  They both have to import functions and use an "interface" or "external" for native windowing.  After investigating that something dawned on me.

GtkAda has to do it twice.  It has to "interface" with the native windows for Gtk, and then again, with the Ada syntax it has to interface with Gtk to make GtkAda.  Would that make GtkAda slower than Java?  It's a pointer to a pointer that points to function right?  Each of those references has to be dereferenced before they can be used.  That's a lot of overhead.

Then I started thinking about the Java AWT toolkit.  It's not native, but they have the 'class' Window.  How do they do that?  Is a window just a bitmap with layers of other bitmaps and transparent bitmaps with text?  How does this all work?  More importantly, where do I find out?

Never the less, I chose GtkAda mainly because I can compile for both Windows and FreeBSD and will keep the benefits of Ada as a system.  but I am still curious as to how a Window is actually drawn.  Is it just like a curses window except with finer detail and control?

Well, thanks for letting me ramble and ask some questions.  If you understand anything I said and have some answers then hopefully you will not mind sending me some links or something so that I can learn more.
Thanks all!!!

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20040514/35182df6/attachment.htm 


More information about the gtkada mailing list