[fpc-devel] FPC + Haiku: how good is it?
Matt Emson
memson.lists at googlemail.com
Wed May 12 12:34:20 CEST 2010
Graeme Geldenhuys wrote:
It's not often I get to actually have knowledge to give!
> Anyway, I saw that FPC 2.4.0 has a Haiku release (I was quite surprised -
> kudos to the FPC developers!).
FPC supported BeOS since FPC 2.0. I believe the first port was by Pavel
Kasselberger (sp?) for his Pixel image editor. I used to be involved in
the effort to port some kind of API mapping, so I can give a little info.
> How mature/stable is FPC on Haiku? Is it
> usable, or is it still very experimental?
>
The BeAPI (the API that Haiku has inherited) is C++ based and *heavily*
multithreaded. As such, it is (was) pretty laborious to get any GUI apps
working. I wrote some simple wrappers, which worked okay. They are
probably still available in the Be FPC Source Forge repo. The other guys
on the project started to write a real API wrapper, and at that point I
sort of dropped out of the loop, so I'm unsure exactly how far they got.
I remember the API having a lot of circular dependencies and modelling
it in the same way as the BeAPI layed out files was pretty impossible.
That was the last I spoke to them.
Your biggest issue is not C++, it is multithreading. In BeOS, every app
has a thread (as normal) and every window has a separate Thread
(actually, more than one, as there is one or more in the app_server for
every one in the executable, but at the simplest level, the one per
window is fairly accurate.) BeOS used B as a prefix, much like
Borland's T. So you get a BLooper (a "thread"), then BMessenger
(Postbox/message sender) and BHandler (a "message" handler), a BWindow
inherits from both (IIRC) and IPC is done via an object based system
comprising of BMessages that contain lists of values (basic data types,
instances of class/structures, pointers etc.) The whole system is
extremely client/server. Sending a message between two applications is
trivial. This is all pretty easy to wrap with a little thought. However,
some controls need to be created in the right thread context, so it
starts getting messy.
Anyway, I'm working on 10 year old information, but Haiku is modelled
very much after the original BeOS. Mind you, Haiku now has a QT 4.x
port, so you might find that is simpler to get going?
M
More information about the fpc-devel
mailing list