[Top][All Lists]

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

Re: [Texmacs-dev] Cocoa backend

From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] Cocoa backend
Date: Sun, 17 Dec 2006 00:04:25 +0100

On 16 Dec 2006, at 15:34, Felix Breuer wrote:

On Sat, 2006-12-16 at 22:13 +0100, Massimiliano Gubinelli wrote:
  thank you all for the comments.


You mention replacing the UI widgets. How do you handle the drawing of
the actual document? AFAIK TeXmacs uses an abstract "PS-device" which
maps the drawing commands to X11 calls. Is it possible to reuse that one
on Cocoa? Or did you start implementing a Cocoa backend for the
PS-device? Would a OpenGL/Cairo backend serve you as well? I think the
implementation of such an OpenGL or Cairo backend would be a great
benefit for TeXmacs on all platforms.

Also I think it would be great if TeXmacs were decomposed into a set of reusable libraries. GUIs could then be implemented more easily on top of
these. This would not only increase the maintainability of the GUI but
also the maintainability of TeXmacs itself. (I have not tried to
undertake such a decomposition, because I do not have the necessary

Good luck with your port,

PS: There are numerous bugs in TeXmacs with regard to memory management as exemplified by the reports on the bug tracker about crashes. Any help
in fixing those would be greatly appreciated. I can't do much except
provide you with a number of test-cases.

Writing the MacOSX "PS-device" it has not been too difficult. It has been enough to map X11 calls to the analogous calls in Cocoa. To reimplement the device in Cairo or directly in OpenGL should be a matter of a week or less. Actually what is requiring a lot of work is to properly handle events since the Cocoa's event model is slightly different from X11's. (you can do a straight translation but the result is not good Cocoa coding).

I think that one of my remarks has not been properly appreciated: this "port" run ALSO on Linux if one is willing to use GNUstep libraries (and on Windows). If the community is pondering a common platform-independent API then GNUstep should be considered as a valuable candidate which would have the benefit of running "native" on MacOSX (via Cocoa which is Apple implementation of the NextStep/ OpenStep API on which also GNUstep is based). Moreover on Unix machines using Qt, GTK, GNUstep or whatever should be considered an equivalent choice (for what I understand).


PS: For the moment I'm not interested in memory management but on MacOSX there are also tools to detect memory leaks (MallocDebug, ObjAlloc...) so if somebody with a Mac would give them a try...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]