windowmaker-wl/wrlib
Levi Neely a486329b52 Wayland backend abstraction: WMBackend vtable (Phases 0–30)
Introduce a display-system-agnostic WMBackend vtable that routes all
display operations through function pointers, making the WM policy
layer independent of X11.  The X11 implementation is preserved in
src/backend/x11/ and behaviour is unchanged.

Key structural changes
──────────────────────
• src/backend/backend_types.h — backend-neutral type definitions:
    WNativeWindow, WKeyCode, WContextKey, WBackendScreen,
    WBackendEvent (+typed fields), WNormalHints, WWMHints,
    WNETWindowType, WHeadGeometry, WClientAttributes, WClientVisual,
    WSegment, WPoint, WM_KEY_* keysym constants, WA_* atom IDs,
    WKB_GROUP*_INDEX, WCUR_NONE

• src/backend/backend.h — WMBackend vtable (~100 function-pointer
    slots) covering: frame/context lifecycle, stacking, focus, grabs,
    pointer, keyboard, overlays, properties, ICCCM, EWMH/NETWM,
    monitors, screen setup, cursors, extensions, error handlers.
    No <X11/> headers remain in this file after Phase 30.

• src/backend/x11/ — X11 backend implementation:
    x11_backend.c  full vtable; all display calls confined here
    x11_props.c    WM_NORMAL_HINTS / WM_HINTS translation
    x11_event.c    XEvent → WBackendEvent translation
    x11_monitor.c  Xinerama / RandR monitor query

Policy files cleaned
────────────────────
All 47 files in WM_POLICY_CLEAN_FILES pass check-no-x11-policy
(no direct #include <X11/> anywhere).  X11 types that still appear
in policy structs (Visual*, Colormap, Window, Atom …) arrive only
transitively via WINGs.h; the vtable boundary itself is X11-free.

Tests
─────
• tests/smoke-test.sh — full Xvfb lifecycle test (PASS)
• tests/test_geom.c   — geometry / constraint unit tests
• tests/test_x11_event.c — WBackendEvent field extraction tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 19:20:00 +01:00
..
po Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
tests Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
AUTHORS WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
COPYING WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
ChangeLog WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
INSTALL WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
Makefile.am WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
Makefile.in Wayland backend abstraction: WMBackend vtable (Phases 0–30) 2026-03-27 19:20:00 +01:00
NEWS WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
README WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
TODO WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
alpha_combine.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
color.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
context.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
convert.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
convert.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
convolve.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
draw.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
flip.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
gradient.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
imgformat.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_gif.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_jpeg.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_magick.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_png.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_ppm.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_tiff.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_webp.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_xpm.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
load_xpm_normalized.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
misc.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
raster.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
rotate.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
rotate.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
save.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
save_jpeg.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
save_png.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
save_xpm.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
scale.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
scale.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wr_i18n.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
wraster.h.in WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
xpixmap.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
xutil.c WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00
xutil.h WindowMaker 0.96.0 upstream source 2026-03-26 15:38:49 +01:00

README

WindowMaker raster graphics library

This library is used to manipulate images and convert them to
a format that can be displayed through the X window system.
Read the wraster.h header for an idea of what is available


This Library is LGPL and
Copyright (c) Alfredo K. Kojima <kojima@inf.ufrgs.br>


The following environment variables control some parameters:

RIMAGE_CACHE <integer>

Is the maximum number of images to store in the internal cache.
Default is 8

RIMAGE_CACHE_SIZE <integer>

Is the size of the biggest image to store in the cache.
Default is 4k (64x64)



Porting
=======

It should be fairly easy to port it to other environments
(svgalib, libggi etc), probably only requiring wraster.h,
context.c and convert.c to be changed. Note that the X specific
code should be disabled in that case, including support for libXpm.