fab6a60459eb9389fb29b21013cbfff3a3f43c1d
libgemui
libgemui is a lightweight C11 X11, Cairo, and Pango/HarfBuzz UI toolkit designed for the ANODE desktop environment and standalone X11 utilities. It can be built as either a shared library (libgemui.so) or a static archive (libgemui.a) with live .Xresources / .xth theming and fractional DPI scaling.
Features
- Double-buffered X11 + Cairo + Pango rendering: Smooth redraws with XRandR/Xinerama monitor awareness, Pango/HarfBuzz font fallback (
theme.fontFace+theme.iconFontFace), and automatic luminance-aware dark/light control contrast. - Fractional DPI scaling & touch sizing: Reads
Xft.dpi,theme.scale/anode.scale,theme.touchMode/anode.touchMode,~/.Xresources, rootXA_RESOURCE_MANAGER,GEMUI_SCALE/ANODE_SCALE, and primary monitor EDID DPI (0.50xto4.00x), with live theme reload viaSIGUSR1or property updates. - Standalone theming fallback: Ships built-in
Anodizedtheme defaults so applications work cleanly on any X11 desktop even when no ANODE theme files or.Xresourcesentries are present. - Immediate-mode helpers & hit tracking: Rect/rounded primitives, text/icon drawing, headers, buttons, toggles, sliders, text inputs, toasts, clipboard retrieval (
gemui_clipboard_get), non-blockingpoll()loop for X11 + custom fds + timers, and optionalWM_DELETE_WINDOWinterception (gemui_set_close_handler). - Standardized File Open / Save dialog: Built-in modal directory browser (
gemui_open_file_dialog,gemui_save_file_dialog,gemui_file_dialog_run) with extension filters, dotfile toggle, UTF-8 filename input, overwrite confirmation, and automatic compact scaling down to tiny screens (<= 320x360).
Dependencies
- POSIX
make, C11 compiler (cc),ar, andpkg-config - X11, Cairo, Pango, HarfBuzz, Fontconfig, and FreeType development libraries:
x11,xext,xft,xinerama,xrandr,cairo,pangocairo,pango,harfbuzz,fontconfig,freetype2
Build & Install
make # Build build/libgemui.so, build/libgemui.a, and build/gemui.pc
sudo make install # Install libraries, gemui.h, and gemui.pc (default PREFIX=/usr/local)
Targets and options:
make shared/make static: Build onlybuild/libgemui.soorbuild/libgemui.a.make rebuild/make clean/make help: Clean rebuild or inspect build variables (PREFIX,ANODE_PREFIX,DESTDIR,CC,AR,CFLAGS,LDFLAGS).
Using as a Git Submodule / Static Library
When embedding libgemui in another repository:
make static
Compile with -I<path-to-libgemui> (#include <gemui.h>) and link <path-to-libgemui>/build/libgemui.a followed by:
pkg-config --libs x11 xext xft xinerama xrandr cairo pangocairo pango harfbuzz fontconfig freetype2
and -lm.
Credits
Created by Luxferre in 2026, released into the public domain with no warranties.
Description
The X11 UI library that powers ANODE
https://anode-desk.top
Readme
94 KiB
0 Stars
1 Watchers
0 Forks
Languages
C
96.5%
Makefile
3.5%