wio is a window system abstraction library.
wio follows the Mach nominated Zig version.
The public API can be browsed in src/wio.zig. The example directory contains a test program covering most features.
By default, wio embeds an application manifest for proper functionality.
When using a custom manifest, set the win32_manifest build option to false.
If audio is enabled, wio initializes COM with options COINIT_MULTITHREADED
and COINIT_DISABLE_OLE1DDE.
Versions 10.15 and above are supported.
The example directory contains an application bundle, which can be adapted by
changing the CFBundleExecutable and CFBundleName values in Info.plist.
Unix-like systems support different backends in the same executable, with the
most appropriate being chosen at runtime. To restrict the available choices,
set the unix_backends build option to a comma-separated list.
For X11, the following libraries are loaded:
libX11.so.6libXcursor.so.1libGL.so.1(if OpenGL is enabled)
For Wayland, the following libraries are loaded:
libwayland-client.so.0libxkbcommon.so.0libdecor-0.so.0libwayland-egl.so.1(if OpenGL is enabled)libEGL.so.1(if OpenGL is enabled)
Additionally, the following libraries are loaded for Linux:
libudev.so.1(if joysticks are enabled)libpulse.so.0(if audio is enabled)
The following variables and fields may be considered part of the public API when targeting a given platform:
Window.backend.windowis the Win32HWND
Window.backend.windowis the AppKitNSWindow*
wio.backend.active is an enum describing the backend in use:
wio.backend.x11.displayis the Xlib displayWindow.backend.x11.windowis the Xlib window
wio.backend.wayland.displayis the Waylandwl_display*Window.backend.wayland.surfaceis the Waylandwl_surface*