On 21.01.2008, at 10:14, MacArthur, Ian (SELEX) (UK) wrote: > You were trying to port fltk to another platform I think? If so, the > Apple port may not be the easiest to copy? I'm not sure, but I thought > Matthias struggled a fair bit to get the Mac stuff working right, it > is > tricky... Matthias would probably have a view on this!
I do ;-) . The Mac Port was quite a drag: the original port was on MacOS 8 which uses Quickdraw and the Classic windowing and messaging system. When OX X came out, a quick port was done usining X11 on OS X. To get a native OS X platform again, I merged the MacOS 8 fork back into the main release and changed the message handling to be Carbon/ Quickdraw compatible. By now, Quickdraw is only an emulation layer on top of Quartz, so I decided to support the faster and better Quartz API, gaining much cleaner font rendering and atialiased lines and line styles. The resulting code is not as clean as I would like it to be because it has to differentiate between Apple Quickdraw for backward compatibility and Apple Quartz for the more modern implementation (which unfortunatly is still not entirely free of Quickdraw/Carbon). But to make a long story short, the original FLTK code was X11, so that may be the best starting point. The MSWindows port by now isn't bad at all either and uses some nifty tricks to get around WIN32 weirdness. But whichever code you take as an example depends on your target system and how familiar you are with the API that you will be porting from. Oh, and btw, there seems to be a fully(?) functional AmigaOS version out there as well... . Matthias PS: CG stands for Apple's "Core Graphics" ---- http://robowerk.com/ _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

