LWXGL (Lightweight X11 Graphics Library) is a minimal C/C++ shared library that makes it straightforward to open an X11 window and populate it with interactive GUI elements — buttons, text labels, input fields, checkboxes, rectangles, and pixel-addressable image canvases — all through a flat C API backed by a single header file.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Dressedalarm184/lwxgl/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Open a window and render your first element in under five minutes.
Building & Installing
Compile the shared library and install it system-wide with Make.
UI Elements Guide
Create and manage buttons, inputs, text labels, and checkboxes.
API Reference
Full reference for every function exported by LWXGL.
What LWXGL provides
LWXGL is designed to be small and direct. The entire public surface lives inlibLWXGL.h, and the library compiles to a single .so file linked against libX11.
Window & Loop
Fixed-size window creation with a built-in FPS-capped render loop.
16-Color Palette
All colors are palette indices 0–15. The palette is modifiable at runtime.
Element System
Every widget is an integer-ID element that LWXGL renders automatically.
Event Handling
Callback and polling APIs for keyboard, mouse, and window-close events.
Image Canvases
Palette-indexed pixel buffers with rect, circle, line, and sprite primitives.
Modals
Blocking OK and OK/Cancel dialog overlays with confirm callbacks.
How it works
Build and install the library
Clone the repository and run
make build && make install to produce libLWXGL.so and copy it to /usr/local/lib.Create a window and elements
Call
GCreateWindow to open an X11 window, then create elements by ID using functions like GCreateButton or GCreateText.