GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • GUI

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — libui Alternatives - C++ GUI | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

libui

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

andlabs logo
Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
8.9
Declining
Activity
0.0
Stable
Stars 10,894
Watchers 315
Forks 613
Last Commit over 2 years ago

Programming language: C
License: GNU General Public License v3.0 or later
Tags: GUI    

libui alternatives and similar libraries

Based on the "GUI" category.
Alternatively, view libui alternatives based on common mentions on social networks and blogs.

  • imgui

    9.9 9.7 L1 libui VS imgui
    Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
    ocornut logo
  • Modern C++ Programming

    9.3 6.6 libui VS Modern C++ Programming
    Modern C++ Programming Course (C++03/11/14/17/20/23/26)
    federico-busato logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • webview

    9.2 4.7 libui VS webview
    Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).
    webview logo
  • xmake

    9.0 9.8 libui VS xmake
    🔥 A cross-platform build utility based on Lua
    xmake-io logo
  • nuklear

    8.9 8.2 libui VS nuklear
    A single-header ANSI C immediate mode cross-platform GUI library
    Immediate-Mode-UI logo
  • FTXUI

    8.8 9.1 libui VS FTXUI
    Features: - Functional style. Inspired by [1] and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clang
    ArthurSonzogni logo
  • wxWidgets

    8.8 9.9 L1 libui VS wxWidgets
    Cross-Platform C++ GUI Library
    wxWidgets logo
  • Duilib

    8.7 0.0 libui VS Duilib
    GUI
    duilib logo
  • Stacer

    8.7 3.4 libui VS Stacer
    Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web
    oguzhaninan logo
  • NanoGUI

    8.0 0.0 libui VS NanoGUI
    Minimalistic GUI library for OpenGL
    wjakob logo
  • RmlUi

    7.8 8.7 libui VS RmlUi
    RmlUi - The HTML/CSS User Interface library evolved
    mikke89 logo
  • Elements C++ GUI library

    7.5 9.4 libui VS Elements C++ GUI library
    Elements C++ GUI library
    cycfi logo
  • SixtyFPS

    7.3 9.9 libui VS SixtyFPS
    DISCONTINUED. Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint]
    sixtyfpsui logo
  • Yue

    7.3 6.6 libui VS Yue
    A library for creating native cross-platform GUI apps
    yue logo
  • Turbo Vision

    7.2 7.6 libui VS Turbo Vision
    A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
    magiblot logo
  • GacUI

    7.2 9.9 L1 libui VS GacUI
    Native C++ UI library, cross-platform, MVVM and data binding, XML description, multi-language, core/renderer cross-process separation, etc
    vczh-libraries logo
  • nana

    7.1 0.0 L1 libui VS nana
    a modern C++ GUI library
    cnjinhao logo
  • Sciter

    7.1 0.0 libui VS Sciter
    Sciter: the Embeddable HTML/CSS/JS engine for modern UI development
    sciter-sdk logo
  • FLTK

    6.9 9.6 libui VS FLTK
    FLTK - Fast Light Tool Kit - https://github.com/fltk/fltk - cross platform GUI development
    fltk logo
  • GTK+

    6.6 9.9 L3 libui VS GTK+
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
    GNOME logo
  • libRocket

    5.9 0.0 L2 libui VS libRocket
    libRocket - The HTML/CSS User Interface library
    libRocket logo
  • copperspice

    5.7 8.5 libui VS copperspice
    Set of cross platform C++ libraries (Core, Gui, Network, Multimedia, SQL, Vulkan, etc)
    copperspice logo
  • PDCurses

    5.7 2.4 L3 libui VS PDCurses
    A curses library for environments that don't fit the termcap/terminfo model.
    wmcbrine logo
  • SOUI

    5.5 2.1 libui VS SOUI
    SOUI是目前为数不多的轻量级可快速开发window桌面程序开源DirectUI库.其前身为Duiengine,更早期则是源自于金山卫士开源版本UI库Bkwin.经过多年持续更新方得此库
    SOUI2 logo
  • MyGUI

    5.4 9.7 L2 libui VS MyGUI
    Fast, flexible and simple GUI.
    MyGUI logo
  • FINAL CUT

    5.3 8.5 libui VS FINAL CUT
    A Modern C++ Text-Based Widget Toolkit (TUI)
    gansm logo
  • xtd

    5.3 9.9 libui VS xtd
    Free open-source modern C++20/23 framework to create console (CLI), forms (GUI like WinForms) and unit test (xUnit) applications and libraries on Windows, macOS, Linux, iOS, Android, FreeBSD, Haiku, and SerenityOS.
    gammasoft71 logo
  • MeshLib

    4.9 9.9 libui VS MeshLib
    3D geometry processing SDK: fast mesh boolean, mesh repair, decimation, remeshing, offset, point cloud triangulation and ICP registration. C++ with Python, C#, C and JavaScript bindings.
    MeshInspector logo
  • cuda-api-wrappers

    4.9 4.7 libui VS cuda-api-wrappers
    Thin C++-flavored header-only wrappers for core CUDA APIs: Runtime, Driver, NVRTC, NVTX.
    eyalroz logo
  • saucer

    4.9 7.7 libui VS saucer
    🛸 A modern, cross-platform C++ webview library
    saucer logo
  • CEGUI

    4.7 - libui VS CEGUI
    Flexible, cross-platform GUI library.
  • neoGFX

    4.1 9.6 libui VS neoGFX
    Cross-platform GPU-oriented C++ application/game framework
    i42output logo
  • CTPG

    3.8 3.9 libui VS CTPG
    Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.
    peter-winter logo
  • Brisk

    3.5 8.3 libui VS Brisk
    Cross-platform C++20 GUI framework featuring MVVM architecture, reactive capabilities, and scalable, accelerated GPU rendering.
    brisklib logo
  • eventbus

    3.1 4.7 libui VS eventbus
    A simple, header only event bus library written in modern C++17.
    ptsouchlos logo
  • Refureku

    3.1 0.0 libui VS Refureku
    Cross-platform C++17 Runtime Reflection Library
    jsoysouvanh logo
  • gtkmm

    3.0 7.8 libui VS gtkmm
    Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm
    GNOME logo
  • ncurses

    2.6 7.6 libui VS ncurses
    snapshots of ncurses - see https://invisible-island.net/personal/git-exports.html (no pull requests are accepted)
    ThomasDickey logo
  • Vaca

    2.6 3.8 libui VS Vaca
    C++ Win32 wrapper to develop GUI apps
    dacap logo
  • newt

    2.1 3.1 libui VS newt
    Mirror of https://gitlab.com/newt-ui/newt
    mlichvar logo
  • Clip Library

    2.0 6.3 L3 libui VS Clip Library
    Cross-platform C++ library to copy/paste clipboard content
    aseprite logo
  • sling

    1.8 3.8 libui VS sling
    Lightweight C++ Signals and Slots implementation
    adrg logo
  • Ultra App Kit

    1.5 9.6 libui VS Ultra App Kit
    Documentation contents for Leadwerks Game Engine 5
    Leadwerks logo
  • NeoQCP

    1.5 9.7 libui VS NeoQCP
    A modernized fork of QCustomPlot: Qt6-only, QRhi rendering, Meson build, zero-copy plotting
    SciQLop logo
  • fox-toolkit

    1.4 0.0 libui VS fox-toolkit
    DISCONTINUED. Unofficial Zenotech specific mirror of fox-toolkit; please refer to upstream site for latest version
    zenotech logo
  • QCustomPlot

    1.4 - libui VS QCustomPlot
    Qt plotting widget without further dependencies. [GPLv3]
  • genetic

    1.4 1.9 libui VS genetic
    A performant and flexible genetic algorithm implemented in C++20/23.
    ptsouchlos logo
  • Omnirefl

    1.3 8.7 libui VS Omnirefl
    Seamless C++ reflection for a focused feature set, without macros or UB (before C++26).
    sergio-eld logo
  • static_string

    1.3 2.7 libui VS static_string
    Experimental compile-time string manipulation C++17 library
    ChristianPanov logo
  • MiniOAuth2

    1.3 5.9 libui VS MiniOAuth2
    A lightweight, header-only C++20 library for OAuth 2.0 Authorization Code Flow with PKCE . built for Crow, usable anywhere.
    Mhr1375 logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of libui or a related project?

Add another 'GUI' Library

Popular Comparisons

  • libui
    vs
    nuklear
  • libui
    vs
    imgui
  • libui
    vs
    wxWidgets
  • libui
    vs
    nana
  • libui
    vs
    GTK+

README

libui: a portable GUI library for C

This README is being written. Build Status, Azure Pipelines Build Status, AppVeyor

Status

It has come to my attention that I have not been particularly clear about how usable or feature-complete libui is, and that this has fooled many people into expecting more from libui right this moment than I have explicitly promised to make available. I apologize for not doing this sooner.

libui is currently mid-alpha software. Much of what is currently present runs stabily enough for the examples and perhaps some small programs to work, but the stability is still a work-in-progress, much of what is already there is not feature-complete, some of it will be buggy on certain platforms, and there's a lot of stuff missing. In short, here's a list of features that I would like to add to libui, but that aren't in yet:

  • trees
  • clipboard support, including drag and drop
  • more and better dialogs
  • printing
  • accessibility for uiArea and custom controls
  • document-based programs
  • tighter OS integration (especially for document-based programs), to allow programs to fully feel native, rather than merely look and act native
  • better support for standard dialogs and features (search bars, etc.)
  • OpenGL support

In addition, here is a list of issues generalizing existing problems.

Furthermore, libui is not properly fully documented yet. This is mainly due to the fact that the API was initially unstable enough so as to result in rewriting documentation multiple times, in addition to me not being happy with really any existing C code documentation tool. That being said, I have started to pin down my ideal code documentation style in parts of ui.h, most notably in the uiAttributedString APIs. Over time, I plan on extending this to the rest of the headers. You can also use the documentation for libui's Go bindings as a reference, though it is somewhat stale and not optimally written.

But libui is not dead; I am working on it whenever I can, and I hope to get it to a point of real quality soon!

News

Note that today's entry (Eastern Time) may be updated later today.

  • 7 April 2019

    • The build system has been switched to Meson. See below for instructions. This change was made because the previous build system, CMake, caused countless headaches over trivial issues. Meson was chosen due to how unproblematic setting up libui's build just right was, as well as having design goals that are by coincidence closely aligned with what libui wants.
    • Travis CI has been replaced with Azure Pipelines and much of the AppVeyor CI configuration was integrated into the Azure Pipelines configuration. This shouldn't affect most developers.
  • 1 September 2018

    • Alpha 4.1 is here. This is an emergency fix to Alpha 4 to fix uiImageAppend() not working as documented. It now works properly, with one important difference you'll need to care about: it now requires image data to be alpha-premultiplied. In addition, uiImage also is implemented slightly more nicely now, and ui.h has minor documentation typo fixes.
    • Alpha 4.1 also tries to make everything properly PIC-enabled.
  • 10 August 2018

    • Alpha 4 is finally here. Everything from Alpha 3.5 and what's listed below is in this release; the two biggest changes are still the new text drawing API and new uiTable control. In between all that is a whole bunch of bugfixes, and hopefully more stability too. Thanks to everybody who helped contribute!
    • Alpha 4 should hopefully also include automated binary releases via CI. Thanks to those who helped set that up!
  • 8 August 2018

    • Finally introduced an API for loading images, uiImage, and a new control, uiTable, for displaying tabular data. These provide enough basic functionality for now, but will be improved over time. You can read the documentation for the new features as they are here. Thanks to everyone who helped get to this point, in particular @bcampbell for the initial Windows code, and to everyone else for their patience!
  • 30 May 2018

    • Merged the previous Announcements and Updates section of this README into a single News section, and merged the respective archive files into a single NEWS.md file.
  • 16 May 2018

    • Thanks to @parro-it and @msink, libui now has better CI, including AppVeyor for Windows CI, and automated creation of binary releases when I make a tagged release.
  • 13 May 2018

    • Added new functions to work with uiDateTimePickers: uiDateTimePickerTime(), uiDateTimePickerSetTime(), and uiDateTimePickerOnChanged(). These operate on standard <time.h> struct tms. Thanks @cody271!
    • Release builds on Windows with MSVC should be fixed now; thanks @l0calh05t, @slahn, @mischnic, and @zentner-kyle.
  • 12 May 2018

    • GTK+ and OS X now have a cleaner build process for static libraries which no longer has intermediate files and differing configurations. As a result, certain issues should no longer be present. New naming rules for internal symbols of libui have also started being drafted; runtime symbols and edge cases still need to be handled (and the rules applied to Windows) before this can become a regular thing.
  • 2 May 2018

    • On Windows, you no longer need to carry around a libui.res file with static builds. You do need to link in the appropriate manifest file, such as the one in the windows/ folder (I still need to figure out exactly what is needed apart from the Common Controls v6 dependency, or at least to create a complete-ish template), or at least include it alongside your executables. This also means you should no longer see random cmake errors when building the static libraries.
  • 18 April 2018

    • Introduced a new uiTimer() function for running code on a timer on the main thread. (Thanks to @cody271.)
    • Migrated all code in the common/ directory to use uipriv prefixes for everything that isn't static. This is the first step toward fixing static library oddities within libui, allowing libui to truly be safely used as either a static library or a shared library.
  • 18 March 2018

    • Introduced an all-new formatted text API that allows you to process formatted text in ways that the old API wouldn't allow. You can read on the whole API here. There is also a new examples for it: drawtext, which shows the whole API at a glance. It doesn't yet support measuring or manipulating text, nor does it currently support functions that would be necessary for things like text editors; all of this will be added back later.
    • libui also now uses my utf library for UTF-8 and UTF-16 processing, to allow consistent behavior across platforms. This usage is not completely propagated throughout libui, but the Windows port uses it in most places now, and eventually this will become what libui will use throughout.
    • Also introduced a formal set of contribution guidelines, see CONTRIBUTING.md for details. They are still WIP.
  • 17 February 2018

    • The longstanding Enter+Escape crashes on Windows have finally been fixed (thanks to @lxn).
    • Alpha 3.5 is now here. This is a quickie release primiarly intended to deploy the above fix to package ui itself. It is a partial binary release; sorry! More new things will come in the next release, which will also introduce semver (so it will be called v0.4.0 instead).
    • Alpha 3.5 also includes a new control gallery example. The screenshots below have not been updated yet.

Old announcements can be found in the NEWS.md file.

Runtime Requirements

  • Windows: Windows Vista SP2 with Platform Update or newer
  • Unix: GTK+ 3.10 or newer
  • Mac OS X: OS X 10.8 or newer

Build Requirements

  • All platforms:
    • Meson 0.48.0 or newer
    • Any of Meson's backends; this section assumes you are using Ninja, but there is no reason the other backends shouldn't work.
  • Windows: either
    • Microsoft Visual Studio 2013 or newer (2013 is needed for va_copy()) — you can build either a static or a shared library
    • MinGW-w64 (other flavors of MinGW may not work) — you can only build a static library; shared library support will be re-added once the following features come in:
      • Isolation awareness, which is how you get themed controls from a DLL without needing a manifest
  • Unix: nothing else specific
  • Mac OS X: nothing else specific, so long as you can build Cocoa programs

Building

libui uses only the standard Meson build options, so a libui build can be set up just like any other:

$ # you must be in the top-level libui directory, otherwise this won't work
$ meson setup build [options]
$ ninja -C build

Once this completes, everything will be under build/meson-out/. (Note that unlike the previous build processes, everything is built by default, including tests and examples.)

The most important options are:

  • --buildtype=(debug|release|...) controls the type of build made; the default is debug. For a full list of valid values, consult the Meson documentation.
  • --default-library=(shared|static) controls whether libui is built as a shared library or a static library; the default is shared. You currently cannot specify both, as the build process changes depending on the target type (though I am willing to look into changing things if at all possible).
  • -Db_sanitize=which allows enabling the chosen sanitizer on a system that supports sanitizers. The list of supported values is in the Meson documentation.
  • --backend=backend allows using the specified backend for builds instead of ninja (the default). A list of supported values is in the Meson documentation.

Most other built-in options will work, though keep in mind there are a handful of options that cannot be overridden because libui depends on them holding a specific value; if you do override these, though, libui will warn you when you run meson.

The Meson website and documentation has more in-depth usage instructions.

For the sake of completeness, I should note that the default value of --layout is flat, not the usual mirror. This is done both to make creating the release archives easier as well as to reduce the chance that shared library builds will fail to start on Windows because the DLL is in another directory. You can always specify this manually if you want.

Backends other than ninja should work, but are untested by me.

Installation

Meson also supports installing from source; if you use Ninja, just do

$ ninja -C build install

When running meson, the --prefix option will set the installation prefix. The Meson documentation has more information, and even lists more fine-grained options that you can use to control the installation.

Arch Linux

Can be built from AUR: https://aur.archlinux.org/packages/libui-git/

Documentation

Needs to be written. Consult ui.h and the examples for details for now.

Language Bindings

libui was originally written as part of my package ui for Go. Now that libui is separate, package ui has become a binding to libui. As such, package ui is the only official binding.

Other people have made bindings to other languages:

Language Bindings
C++ libui-cpp, cpp-libui-qtlike
C# / .NET Framework LibUI.Binding
C# / .NET Core DevZH.UI, SharpUI, TCD.UI
CHICKEN Scheme wasamasa/libui
Common Lisp jinwoo/cl-ui
Crystal libui.cr, hedron
D DerelictLibui (flat API), libuid (object-oriented)
Euphoria libui-euphoria
Harbour hbui
Haskell haskell-libui
JavaScript/Node.js libui-node, libui.js (merged into libui-node?), proton-native, vuido
Julia Libui.jl
Kotlin kotlin-libui
Lua libuilua, libui-lua, lui, lui
Nim ui
Perl6 perl6-libui
PHP ui
Python pylibui
Ruby libui-ruby, libui
Rust libui-rs
Scala scalaui
Swift libui-swift

Frequently Asked Questions

Why does my program start in the background on OS X if I run from the command line?

OS X normally does not start program executables directly; instead, it uses Launch Services to coordinate the launching of the program between the various parts of the system and the loading of info from an .app bundle. One of these coordination tasks is responsible for bringing a newly launched app into the foreground. This is called "activation".

When you run a binary directly from the Terminal, however, you are running it directly, not through Launch Services. Therefore, the program starts in the background, because no one told it to activate! Now, it turns out there is an API that we can use to force our app to be activated. But if we use it, then we'd be trampling over Launch Services, which already knows whether it should activate or not. Therefore, libui does not step over Launch Services, at the cost of requiring an extra user step if running directly from the command line.

See also this and this.

Contributing

See CONTRIBUTING.md.

Screenshots

From examples/controlgallery:

[Windows](examples/controlgallery/windows.png)

[Unix](examples/controlgallery/unix.png)

[OS X](examples/controlgallery/darwin.png)

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.