x11lite.h, a minimalist C library designed to simplify window creation, input handling, and basic graphics operations on X11 systems.
- Basic window management
- Keyboard input handling
Ensure you have the X11 development libraries installed on your system. On Debian-based systems:
sudo apt-get install libx11-devOn Arch Linux:
sudo pacman -S libx11Compile the example using gcc:
gcc -o x11lite_example example.c -lX11x11lite.h: The minimalist header library for X11.input_showcase.c: Demonstrates window creation, input handling, and basic rendering.
if (!x11lite_init()) {
fprintf(stderr, "Failed to initialize X11Lite\n");
return 1;
}
X11LiteWindow win = x11lite_create_window(800, 600, "X11Lite Input Showcase");if (event.type == X11LITE_EVENT_KEY_PRESS) {
if (keysym == XK_BackSpace) { /* Handle backspace */ }
else if (keysym == XK_Return) { /* Handle new line */ }
else { /* Handle printable characters */ }
}- Xlib (X11 development library)
Feel free to fork the repository, make changes, and submit pull requests.
This project is licensed under the MIT License.
- Inspired by
stb-style single-header libraries.