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 directly call out to. There has also 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
) probably provides a better model for what a GTK+/Qt based backend would look like: windows would consist of a single GL widget filling the entire client area, with callbacks set up to convert UI events into Factor UI "gestures".
This revision created on Wed, 3 Mar 2010 18:53:29 by jckarter