Windows, input, gamepads and platform services in C, for games, engines and editors.
A game or an editor needs the same things from every platform: a window that tells the truth about its size and scale, input that never leaves a key stuck, text from the user's input method, gamepads by where their buttons are, a clipboard, files dropped on it, a file dialog, and the handles to put a GPU surface on. Each platform answers differently, some at once and some much later, some on the program's thread and some only from inside a loop of their own.
Maul Window gives one contract over all of them:
Every change to a window is a request answered by exactly one completion, everything arrives in one ordered stream the program drains each frame, no library thread runs and no callback delivers an event. Memory is fixed when the context is created, and everything other programs hand over is validated. A headless test backend lets a program test its window logic on any machine.
It builds with CMake 3.25 or newer and GCC 14 or newer, Clang 19 or newer, or Apple Clang. Ubuntu 24.04's default compiler is GCC 13, which the build refuses, so there install GCC 14, with Git and CMake, and tell CMake to use it:
sudo apt install git cmake gcc-14 pkg-config libwayland-dev wayland-protocols libxkbcommon-dev \
libxkbcommon-x11-dev libxcb1-dev libxcb-randr0-dev libxcb-xkb-dev libxcb-cursor-dev \
libxcb-render0-dev libxcb-xinput-dev libxcb-xtest0-dev libxcb-xfixes0-dev xvfb weston
export CC=gcc-14
Then, on Linux and macOS:
git clone https://github.com/Rawframe-Project/maul-window.git
cd maul-window
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build
./build/sample_window
A build/ that GCC 13 already configured keeps that compiler and fails again ("GCC 14 or newer is required"). Remove it and configure again, with CC exported as above, then carry on with the rest of the block from cmake --build build:
rm -rf build && cmake -B build -DCMAKE_BUILD_TYPE=Release
On Windows the library builds with clang-cl, and on the web with Emscripten or Clang's wasm32-wasi; Getting started lists what each needs.
Install it with cmake --install build --prefix <prefix> and use it from CMake:
find_package(maul-window REQUIRED CONFIG)
target_link_libraries(app PRIVATE maul-window::maul-window)
or through pkg-config as maul-window. On Linux the build needs the Wayland and XCB development files, or -DMAUL_WINDOW_WAYLAND=OFF and -DMAUL_WINDOW_X11=OFF; Getting started lists them, with the build options and the model the API follows.
| Platform | Oldest supported | Built with |
|---|---|---|
| Windows | Windows 10 1703 | clang-cl |
| macOS | macOS 11 | Xcode 16 |
| iOS | iOS 15 | Xcode 16 |
| Android | Android 11 (API 30) | NDK r28 |
| Linux | Wayland and X11, chosen at run time | GCC 14 or Clang 19 |
| The web | current browsers | Emscripten, or Clang's wasm32-wasi |
CI builds and tests every platform: the desktops on their runners, iOS in the simulator, Android in the emulator, the web in headless Chrome. The public headers are C17 and C++17, so any C or C++ program can include them; the library itself is C23.
Maul Window belongs to the Maul family of standalone C libraries, which share one set of conventions; it depends on Maul Unicode.
Issues are welcome. Pull requests are accepted for issues a maintainer has approved; see CONTRIBUTING.md. The project is developed with AI coding agents, directed and reviewed by its maintainers; outside contributions follow the AI policy.
MIT; see LICENSE. The gamepad mappings in tools/gamepaddb/ are under the zlib license, Android's key layout in tools/androidkeys/ under the Apache License 2.0, and the Wayland protocols in protocols/ under their own MIT license.