matthiasm on Sat, 19 Jun 2004 09:25:03 +0200

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

Re: Mac OS X + PARI + FLTK

I am not sure if you guys still follow the thread, but I stumbled across the mail. I am the developer who ported FLTK to OS X. The solution is very simple: OS X requires that your program has a resource fork. FLTK provides a default resource fork in FL/mac.r . Simply attach the resource via

/Developer/Tools/Rez -t APPL -o myappname FL/mac.r

This should make your window responsive and top-level. If threading is a problem (FLTK prefers to be the main thread, and only one FLTK thread can run per application, unless you dive into the depth of Fl::lock() and Fl::unlock()), you can simply use FLTK in the main thread to run PARI as the second thread. Some communication to open windows, etc. is probably required.

For more help, feel free to drop by on the FLTK mailing list.

On Friday, November 7, 2003, at 10:46 AM, Karim BELABAS wrote:

> Hi,
>   I have ported gp hi-res graphics to the MacOS X platform, using the
> lightweight fltk library ( Provided, fltk is installed,
> this is enabled by
>     Configure --with-fltk
> There are two problems:

I built fltk (downloaded source from and installed on
10.3.  I rebuilt (--with-fltk) gp, with the BROKEN_FORK macro commented
out.  When I run gp and type
? ploth(x=-2,2,x^2-2)

I get a pretty picture in a nice brushed-metal window labled "PARI/GP".
  The window departs the scene nicely when I click in the pane, but I
can't do any "window-like-things" to that window (e.g., drag, grow,
...).  The "x/-/+" buttons are live and do what they should.