Home

Awesome

libui: a portable GUI library for C

This fork contains some extra things that I thought useful. uiImage, uiImageBox, uiDrawImage and uiTimeout.<br> Apparently, some of those might be coming in a later version of libui. When that happens I will rebase on that.

This README is being written.<br> Build Status

Announcements

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

Updates

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

Old updates can be found in the Changelog.md file.

Runtime Requirements

Build Requirements

Building

Out-of-tree builds typical of cmake are preferred:

$ # you must be in the top-level libui directory, otherwise this won't work
$ mkdir build
$ cd build
$ cmake ..

Pass -DBUILD_SHARED_LIBS=OFF to cmake to build a static library. The standard cmake build configurations are provided; if none is specified, Debug is used.

If you use a makefile generator with cmake, then

$ make
$ make tester         # for the test program
$ make examples       # for examples

and pass VERBOSE=1 to see build commands. Build targets will be in the build/out folder.

Project file generators should work, but are untested by me.

On Windows, I use the Unix Makefiles generator and GNU make (built using the build_w32.bat script included in the source and run in the Visual Studio command line). In this state, if MinGW-w64 (either 32-bit or 64-bit) is not in your %PATH%, cmake will use MSVC by default; otherwise, cmake will use with whatever MinGW-w64 is in your path. set PATH=%PATH%;c:\msys2\mingw(32/64)\bin should be enough to temporarily change to a MinGW-w64 build for the current command line session only if you installed MinGW-w64 through MSYS2; no need to change global environment variables constantly.

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:

LanguageBindings
C#/.netLibUI.Binding, SharpUI
Crystallibui.cr
DDerelictLibui, libuid (complete oo interface)
Euphorialibui-euphoria
Haskelllibui-haskell
JavaScriptlibui.js (merged into libui-node?)
JuliaLibui.jl
Lualibuilua, libui-lua
Nimui
Node.jslibui-node
Pythonpylibui
Rubylibui-ruby
Rustlibui-rs

Screenshots

From examples/controlgallery:

Windows

Unix

OS X