Concatenative topics
Concatenative meta
Other languages
Meta
The Factor UI on Unix platforms uses raw Xlib to interface with the window system. While this has the benefit of minimizing the Factor UI's dependencies, Xlib is a much lower-level and more limited API than the Win32 and Cocoa libraries Factor uses on Windows and OS X, so the X11 backend doesn't support some UI features (such as native message boxes, file dialogs, and window decoration controls) that Factor provides for Windows and OS X. The X11 backend is also flaky and interacts poorly with tiling window managers, among other things. Most modern Unix workstations use either GNOME or KDE, so Factor's X11 backend should be replaced with a more robust and featureful UI backend built on GTK+ or Qt.
Of the two, GTK+ will currently be the easiest to bind, since it has a raw C API that Factor's FFI can bind to directly. There has been some work done with Glib-based library bindings to make them easy to use with Factor.
Binding to Qt would require either writing a small C shim around Smoke (which is the approach used by CommonQt) or a C++ FFI (which is being worked on by Jeremy Hughes).
The UI backends are relatively simple and self-contained. The existing x11 backend lives in ui.backend.x11
in the Factor repository. The cocoa backend (ui.backend.cocoa
) is also worth looking at to see how a UI backend can be written using a higher-level API.
This revision created on Wed, 3 Mar 2010 18:46:09 by jckarter