On 18.09.2011, at 19:46, Jonathan Egstad wrote:

> (a big hi to all the old DD guys on this list)
> 
> So OSX 10.7 has finally ditched the old Quickdraw functions for good - no 
> surprise since they've been deprecated for years.
> 
> The latest alpha of 2.0 (fyi it's r8800 - r9042 isn't actually on the 
> download page) is not compiling on Lion.
> Is anyone touching 2.0 at all or should I look at the latest 1.3 to figure 
> out the replacements for the deprecated calls?
> 
> Here's a partial list of the problem calls:
>  NewRgn()
>  UnionRgn()
>  DisposeRgn()
>  DiffRgn()
>  RectInRgn()
>  CursPtr
>  SetCursor()
>  GetQDGlobalArrow()
>  GetFNum()
>  aglSetDrawable()
>  FMCreateFontFamilyIterator()
>  FMDisposeFontFamilyIterator()
>  PenMode()
>  GetPortBounds()
>  LocalToGlobal()
>  FlushEvents()

Hi Johnathan,

nice to read from you! This is Wonko.

OK, we are very aware of this problem and have been for a while. FLTK 1.3 has 
completely moved away from Carbon and hence QuickDraw. But since nobody 
maintains 2.x anymore, I doubt that anyone will go through the tremendous work 
and move the FLTK 1.3 core into FLTK 2.

There is a light at the end of the tunnel though, and it's shiny and bright. 
Here are your options for the DD tools on Mac:

1: move all code to FLTK 1.3. Half of it will be more or less a search and 
replace action, but there is one big difference that will bite: in FLTK1, all 
widgets are calculated in offset to the next Window, in FLTk2 however, the are 
offset to the next higher Group. So you will have to manually change all 
coordinates.

2: stick with FLTK 2, and then either replace all Carbon with Cocoa (take a 
month off work for that!) or compile FLTK 2 for X11 on OS X. You will then of 
course need the X server to run DD tools, but it is by far the quickest way to 
get back on the horse.

3: use FLTK 3. It's currently only in SVN, and it's far from complete, but it 
will have something very nice just for you (and all the others with FLTK 2 
source code :-). FLTK 3 has an API that is very similar to FLTK 2, but the core 
is actually based on FLTK 1.3, so Carbon is out, Cocoa is in (yay). It has an 
80% complete FLTK 1 compatibility layer that allows FLTK 1 programs to compile 
and link with FLTK 3 without changing much (or any) of the source code. 

Once this is done (I am actively porting things right now), I will start the 
FLTK 2 compatibility layer. This will be a bit trickier, but possible. Once the 
main widget types are wrapped, you should be able to compile most DD tools 
without much effort. As a bonus, you can intermix FLTK 2 and FLTK 3 and write 
all new code using the new shiny API.

So if you decide for 3, please let me know. Any input is very welcome, and 
knowing how you work, greatly appreciated.

Oh, and do they still serve Bitburger at the beach?

 - Matthias

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to