LWXGL (Lightweight X11 Graphics Library) is a small, self-contained shared library that lets you open X11 windows, draw UI widgets, handle input events, and render pixel-level graphics — all through a clean, flat C API. Link any C or C++ project againstDocumentation 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.
libLWXGL.so and include libLWXGL.h to get started.
Installation
Build from source and install the shared library and header on your system.
Quickstart
Open your first window and render a button in under 20 lines of C.
Core Concepts
Understand the window lifecycle, color palette, and element system.
API Reference
Complete reference for every function exposed by LWXGL.
What LWXGL provides
LWXGL covers the full lifecycle of a simple GUI application or game on Linux:Window Management
Create a fixed-size X11 window with a background color and run a frame-capped event loop.
UI Widgets
Buttons, text labels, input fields, checkboxes, rectangles, and scrollable consoles.
Image Canvas & Primitives
Direct pixel-array canvases with built-in rect, circle, line, and RLE sprite drawing.
Events & Input
Keyboard, mouse, and window-close callbacks plus polled keyboard and mouse state.
Get started in three steps
Build and install the library
Clone the repo, then run
make build && make install to compile libLWXGL.so and copy it and the header to /usr/local/.Include the header and link
Add
#include <libLWXGL.h> to your C or C++ file and compile with -lLWXGL.LWXGL requires a running X11 display server. It does not support Wayland natively — use XWayland if you are on a Wayland compositor.