gitmyhub

libui

C ★ 11k updated 2y ago

Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

A C library for building desktop apps that look and behave natively on Windows, macOS, and Linux by using each OS's own built-in controls, buttons, menus, dialogs, and more, rather than drawing fake ones. Currently mid-alpha.

CMesonsetup: hardcomplexity 4/5

libui is a library that lets programmers build graphical user interfaces (windows, buttons, menus, text fields, and so on) in C, with the result looking and behaving natively on Windows, macOS, and Linux. Rather than drawing every pixel itself, the library calls each operating system's own built-in interface toolkit, so apps built with it use the same controls that users already see in their system's native applications. The goal is for programs to not just look native but to actually be native at the control level.

The library is written in C and is designed to be portable and straightforward to use. It supports a range of common controls: single-line and multi-line text inputs, buttons, checkboxes, radio buttons, dropdowns, sliders, progress bars, date and time pickers, tabs, menus, file and folder dialogs, and a drawing area for custom graphics. A formatted text API allows displaying styled text with different fonts, colors, and sizes.

As of the last update in the README, libui is in mid-alpha status. The author is clear that it is not yet feature-complete or fully stable. Several things are explicitly missing or incomplete, including clipboard and drag-and-drop support, printing, accessibility features for the drawing area, OpenGL rendering, and deeper OS integration for document-based applications. The API is still settling down and documentation is partial.

The build system is Meson (switched from CMake in April 2019). Bindings exist for other languages including Go, and the README points to the Go documentation as a partial reference. The project is still being actively worked on but has slowed; the README notes it is not dead, just progressing gradually.

Where it fits