XPCE on SDL+Cairo+Pango outline - SWI-Prolog/packages-xpce GitHub Wiki
XPCE currently has two backends, one for X11 and one for the good old Win32 GDI interface. Both are getting outdated. In addition, we have the swipl-win with two implementations, one for Windows -again- implemented on top of Win32 GDI and one for MacOS and Linux implemented on top of Qt. The first is getting outdated and the second is far too heavy weight.
The overall plan is to rebase XPCE on a portable library. For this purpose we selected three libraries:
- SDL3 provides a widely available and highly portable interface to managing windows, multi-media, selection, etc.
- Cairo provides a widely available and highly portable interface to draw 2D graphics.
- Pango is used for international text rendering.
The original plan was to make a 3rd backend implementation based on SDL3+Cairo+Pango. But, XPCE is too bloated with old concepts such as colormaps, bit- and pixmaps in too many variations, outdated font support and selection, support for monochrome displays, X11 connections, etc. On the other hand it lacks support for device independent scaling, transformations, transparency, etc. As a result, the plan is no longer to merely add SDL+Cairo as a 3rd option, but make SDL+Cairo replace the x11 and win32 backends and gradually remove outdated code.
- Support for bitmaps (1-bit pixels) for backgrounds will be removed. All use of (grey) patterns is replaced by colours. All images are 32-bits RGBA.
- Class
colour_mapwill be removed. It is still unsure what will happen to classcolour. As all colours are 32-bit RBGA tuples, as class is not strictly needed any more. On the other hand, it allows for naming colours and doing some transformations to the colour space. - Class
colourchanges RGB values from 16 bit to 8 bit and adds an Alpha channel (RGBA). - Multiple monitors will probably be represented by instances of class
display, removing classmonitor. Before, adisplayrepresented an X11 display connection that could manage multiple monitors as sub-areas of a big virtual screen. That notion is gone in SDL. - Get rid of
swipl-winby adding a classterminalto xpce, probably based on theswipl-win.exesource, ported to SDL3+Cairo.- Implement the terminal, now called Epilog
- Make Epilog work as primary console