-
Notifications
You must be signed in to change notification settings - Fork 17
XPCE on SDL Cairo Pango compatibility
Jan Wielemaker edited this page Jul 28, 2025
·
3 revisions
- To fill an object with the foreground colour, the old system would fill with
@black_imageand set the colour. The new system uses the reserved namesforegroundandbackground. - Set
image->backgroundto@nilto create an image with transparent background. - SDL does not allow to specify the location if windows (XPCE frames). Positions are thus ignored. It does allow specifying the location of transient frames relative to the parent frame. The X,Y of a frame is handled as relative to the parent frame for transient frames.
- Several X11-specific methods on class
displayhave been removed. In particulardisplay->synchroniseanddisplay->flush. - Class
imageis seriously changed (but not yet cleaned). All images are not 32-bit RGBA Cairo surfaces that are loaded through the SDL image library. The supported image file formats depend on the how the SDL image library has been built. - There is a special mode for images with only white, black and fully transparent pixels. By default, these are assigned the
image<-kindbitmap. When displayed, white pixels are mapped to the current background and black pixels to the current foreground. - Class
colour_maphas been removed. - Class
colouris seriously modified. Colours are now always 32-bit RGBA (0..255 per channel). Named colours are still supported using the same X11/CSS based colour names. The implications should be minimal except for programs that specified the colour components explicitly as the range changed from 16-bits to 8 bits. - Class
fontis seriously modified. All X11 specific code is removed, fully concentrating on modern TrueType Pango fonts. A default triplefont(Family,Style,Points)is mapped as follows:- First, Family is mapped over
@font_families, which maps the generic namesmono,sansandserifto Pango family names. These are controlled by the resourcefont.font_familiesthat have platform specific defaults. For compatibility,screen,helveticaandtimesare accepted as synonyms formono,sansandserif. If Family does not appear in@font_familiesit is passed directly to Pango. The font specific resources have been moved from classdisplayto classfont(in X11, fonts are server properties and an XPCE display represented an X11 server). - Applications using the alias names should run unmodified. Applications using font(Family,Style,Points) should typically update the Family using
screen->mono,helvetica->sansandtimes->serif.courieris normally available, but compared to modern monospaced fonts it typically looks crude.
- First, Family is mapped over
- Class
monitorhas been removed. The system creates and destroys instances of classdisplayto reflect the currently attached displays.@displayrefers to the initial primary display. Theframe<-displayproperty reflects the actual display used by the frame and is updated if a frame is moved to another display.