Re: What is GNOME office?

Miguel wrote:
Even if you use those libraries, that does not mean that programmers
write code against those libraries.  Programmers have to write code
against your XP code base, or am I wrong?
This is a much more sensible question.

A lot of our code lies _solely_ in an XP layer. This applies to our piece-table code, formatting code, import/export code, and some other bits (we do conditionally use libxml2 in our generic XML import class though).

Then we have a layer that is a mix between X-Platform and Platform-specific code. The XP code is extended by platform-specific code. The platform-specific code handles the actual display of dialogs, widgets, signals/callbacks, and the like. Its callbacks marshall the interesting data obtained from the p-specific code back to the XP layer. The XP layer then handles the result accordingly. An example could be obtaining a filename from a file-selector control. The p-specific code would pop up a GtkFileSelector on unix and get a file's name. Then it would pass the filename back to XP code which would then do the equivalent of this:


The platform-specific code utilizes the gdk, gal, gtk, etc... libraries on Gnome for example. Somewhere in XP code, we say "I want a FileSelector, make me one." We then create the proper platform-specific dialog (which C++ extends its XP base-class). So our XP layer acts as an "insulator" to the p-specific code. In XP code, no one ever says "go make me a gal color combo." Instead the question is more generic - "go get me a color combo box." So yes, in XP code, programmers only make calls against the XP code base.

But in the plaform specific code (which there is a lot of), it's perfectly legal to say "get me a gal color combo" beacuse the gal color combo fulfills the requirement of a "color combo box."

Think of it as C++ wrapper like wxWindows or a GDK backend if you'd like - you say: w = gdk_window_new(); On X, that call creates a new X-Window. On Win32, a new HWND. Plus there's usually some work needed to get the X-Window or HWND to conform to the definition/spec of a GdkWindow. You don't really care how gdk_window_new() does its business, just that you get a GDK window to draw to. If what you get conforms to the GdkWindow spec, you're perfectly happy. This is what our C++ platform-specific does by subclassing our XP layer. By separating things into a base gdk library, GTK is much more portable and easy to port. The same applies to Abi. Try to think of how Abi does its business as something like that.

So no, not all programmers write code against the XP code base. In certain portions of our source tree, this *is* true. In other portions, we write p-specific code to implement our base-class' spec.


Get Your Private, Free E-mail from MSN Hotmail at

Share information about yourself, create your own public profile at

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]