Joined: Apr 21, 2006 Posts: 95 Location: Utah, USA
Posted: Wed Jun 07, 2006 6:02 am Post subject: How does NeoOffice work?
Yes, I've read the FAQ, and I understand at a very high level how it works, but I'm kind of wondering how it works on a lower level.
That is - I see two main parts to NeoOffice:
1 - Displaying X11 windows Native in Mac OS (without X11 running)
2 - Tweaking the UI so it looks more Mac-like
I know that Java is mainly used for these things - (and patches to the OpenOffice codebase) - but I'm wondering more specifically how #1 is accomplished. That is, is there a place in the NeoOffice code that you could direct me to so that I can understand a little better how this is happening?
I'd really like to investigate the possiblity of Mac-ifying other X11 applications in the same manner...Not that I don't have a lot of things to do already.
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Wed Jun 07, 2006 9:36 am Post subject:
OOo doesn't actually use X11 directly...it uses its own internal graphics layer, event handling abstraction, and widget frameworks built on top of that abstraction. The abstraction is named "VCL" and is in the corresponding module of the same name. OOo has two primary implementations of VCL, one for X11 and another for GDI (Win32).
The main goal of Neo is to make a fully functional third implementation of VCL, one specifically tuned for Mac OS X. Our VCL implementation uses a mixture of Java, some Cocoa, and some Carbon, but it's what's been debugged over the last five years to the point where it's nearly as solid as the X11 and GDI implementations.
At one point in the mid to late late 90s StarDivision sold a cross platform widget toolkit named StarView for developing cross-platform C++ software, similar to Qt. VCL is an evolution of that StarView GUI framework. Unfortunately, it's quite limiting and poorly designed particularly when compared with newer cross-platform frameworks that were developed as standalone tools by actual development companies (e.g. Qt, Swing, GTK, the Eclipse SWT). VCL/StarView have really been relegated to a single large project that, so there's no incentive to modernize the design, provide good documentation, provide graphical layout tools, etc.
The unfortunate thing is that there's reams of spaghetti code that all depends on the VCL style frameworks so a rewrite to a more modern framework is a daunting task and definitly not one that'd be feasible in a reasonable time frame without quite a bit of developers and capital investment.
Joined: Apr 25, 2006 Posts: 2315 Location: Montpellier, France
Posted: Wed Jun 07, 2006 9:47 am Post subject:
Quote:
1 - Displaying X11 windows Native in Mac OS (without X11 running)
[...]
I know that Java is mainly used for these things - (and patches to the OpenOffice codebase) - but I'm wondering more specifically how #1 is accomplished.
[...]
I'd really like to investigate the possiblity of Mac-ifying other X11 applications in the same manner...
I don't know how NeoOffice works under the hood, but I seriously doubt that they are simply using Java to display X11 windows. While the Neo build requires X11, it does not specifically depend on the X11 build of OpenOffice for Mac OS X (or so I have read somewhere on the boards).
My best understanding of it is that Patrick and Ed have replaced the X11 code with Java and a bit of Cocoa, just like the Linux and ("official") Mac version of OpenOffice have replaced whatever is used to display menus & widgets and interacting with the rest of the OS under Windows by X11 ...
Edit : I see this is a popular topic (two posts between the time I clicked reply and hit preview). Ed's explanation is far better than mine, but still, I think we're both trying to say that there's no magical "NeoOffice way" to turn X11 apps into Mac-native ones.
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Wed Jun 07, 2006 9:52 am Post subject:
Samwise wrote:
I think we're both trying to say that there's no magical "NeoOffice way" to turn X11 apps into Mac-native ones.
Bingo. Our method will only work for appilcations built on top of VCL, of which there are none besides OOo/StarOffice. We're doing framework porting, not a full user interface port nor a generic toolkit.
For moving other X11 applications, the easiest thing is to first see if you can move them onto a framework that's supported on Mac OS X, such as Qt or SWT. Native OS X GTK support was being worked on a while ago, but I'm not sure if it ever got a lot of traction.
If you can't do that, then you'll need to try to refactor the app so the user interface is separate from the backend code and then write multiple user interfaces for each platform. This is how Mozilla worked (or at least used to...I don't think it's changed but haven't looked at its UI code in a few years).
Joined: Nov 21, 2005 Posts: 1285 Location: Witless Protection Program
Posted: Wed Jun 07, 2006 9:26 pm Post subject: Using NeoOffice makes you SMARTER!
Since hanging around these Fora, I have been learning more about Sam Adams.
I did so research and it looks like I have b
een missing something ... GOOD (OK, I don't drink, much ). Thanks to all for teaching me something ... useful/vital/necessary. "Man can not live by bread(code) alone".
Sam's Summer Ale sounds like something I would much enjoy!
Philip (See How using NeoOffice make you ... smarter! )
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 vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum