Jan. 16th, 2019

I'm always on the look-out for a simple to use, lightweight, portable GUI library. I've put together several lists of available C/C++ GUI libraries. (For instance: http://www.distasis.com/cpp/scrlib.htm ) I've also tried out and experimented with several GUI and text user interface libraries. It's difficult to find one that will let you get a new application up and running or an old one ported to C/C++ quickly. Most GUIs seem to get in the way of development or complicate it.

I still keep debating whether to create my own GUI library in projects or use what's currently available. There's no point in creating your own if there's something better out there. That's the main reason I continue to look for interesting GUI libraries. However, I've yet to find that "something better" that I really enjoy working with.

With that in mind, here's another list of GUI libraries. This time I've limited the field to C only libraries that are highly portable. Since many lighter GUIs use various graphics libraries and other frameworks as backends, I'm including information on graphics libraries that can be used for GUI development as well.


Graphics libraries often used with GUIs:


Some lightweight GUI libraries use graphics libraries as backends to improve portability and decrease library code size. Popular graphics backends written in C include SDL (Simple DirectMedia Layer) and Allegro.

SDL

https://www.libsdl.org/
SDL2_ttf provides TrueType text support for SDL.
https://www.libsdl.org/projects/SDL_ttf/
SDL2_ttf provides internationalization support using a UCS-2 character set. I have patches to support the UTF-32 character set.
http://www.distasis.com/cpp/lmports.htm

Allegro

https://www.allegro.cc/about

AGG

Anti-Grain Geometry library is also used as a graphics backend. Some projects stick with the older version of AGG 2.4 which has a BSD license.
https://en.wikipedia.org/wiki/Anti-Grain_Geometry

Nano-X/Microwindows

Nano-X is highly portable and can work on a wide variety of platforms including DOS and embedded systems. It makes it easier to port X11 and Win32 applications by providing a subset of those APIs (with nano-x/NX11 or microwindows).
https://github.com/ghaerr/microwindows
https://github.com/georgp24/microwindows-android-bin
https://github.com/ghaerr/nxlib

OpenGL

I've seen several lightweight GUI and screen libraries designed for OpenGL. However there are issues with portability to different versions of OpenGL or OpenGLES. Projects like freeglut and GLFW try to make OpenGL easier to use for cross-platform development. There are also several libraries that work with the freetype library and add TrueType font support including ftgl, ftgles, GLTT, freetype-gl, OGFLT
http://freeglut.sourceforge.net/
https://www.glfw.org/

PicoGL

I like PicoGL (a fork of tinyGL) for OpenGL development. It's a subset of OpenGL. It supports several backends including SDL, nano-x, X11 and vesa framebuffer. Since it's software based, it ports well to hand-held devices and other systems that may not have rich hardware support for graphics.
http://people.openmoko.org/jserv/graphics/

I've made several updates and additions to PicoGL including adding some missing OpenGL functionality, SDL 2.x support, bug fixes including a fix for lighting bug in the gears demo. It includes enough OpenGL support to port Emilia pinball. I haven't uploaded my changes to the Internet yet, but if anyone's interested, feel free to contact me about it.


GUI and text user interface options:


PDCurses with SDL backend

This is an option I really like. I've been experimenting with using this for development. I have BSD libmenu and libform working with it too. PDCurses can be used to create a text user interface and SDL can add graphics capabilities.
https://github.com/wmcbrine/PDCurses

TinyWidgets

Lightweight GUI with graphical screen designer. Uses nano-x as a backend. While the original project is dated, there's been some recent development by some of the nano-x developers.
http://tinywidgets.sourceforge.net/
https://github.com/ghaerr/microwindows/tree/master/src/contrib/TinyWidgets

nuklear

This looks promising. Has several backends including GLFW, SDL, Win32, X11, SFML, allegro, nanovg.
https://github.com/Immediate-Mode-UI/Nuklear
https://github.com/vurtun/nuklear
https://github.com/vurtun/nuklear/issues/202
There are also projects that combines nuklear and raylib:
https://github.com/RobLoach/raylib-nuklear
https://github.com/tcfunk/raylib-nuklear

raygui

Another promising cross-platform option. It has support tools to help create layouts. It works on a variety of systems including mobile devices. There's also raylib (a graphics/video game library used by raygui) and raudio (for audio support). The raylib library uses OpenGL/GLFW for graphics support.
https://github.com/raysan5/raygui

c_ugui

Immediate mode GUI using Raylib.
https://github.com/Aurumaker72/c_ugui

nanovg

nanovg is a 2D vector drawing library by the developer of nanosvg (popular svg parsing library). The examples show GUI elements. Other GUI libraries (including nuklear and oui-blendish) also use this as a backend option.
https://github.com/memononen/nanovg
https://bitbucket.org/duangle/oui-blendish/src

GTK+

GTK+ is one of the more popular GUI libraries. However, while each new major version came with added features, it also came with a lot of added complexity. Some distributions use older versions of GTK+ (no longer in development) in order to cut down on complexity. While there were several applications written with this library, it's hard to find up-to-date, supported applications that still use an older version of GTK+.

Amigo Linux is still using GTK 1.2 and has patched some applications to keep them working.
ftp://distro.ibiblio.org/amigolinux/misc/Amigo%20Linux%20Project.html

I've also seen some patches to GTK 1.2 to keep it more up-to-date.
https://github.com/dimkr/gtk
https://github.com/tindzk/GTK

Another interesting GTK+ based option, there were some ports of GTK+ that use the ncurses backend.
https://atrey.karlin.mff.cuni.cz/~pavel/cursed/cursed.html
https://sourceforge.net/projects/zemljanka/files/

If you're interested in more up-to-date GTK+ versions that try to avoid some of the bloat and unneeded dependencies, check out these forks for GTK 2 and a minimal ATK to use with GTK 3:
https://github.com/stefan11111/gtk2
https://github.com/stefan11111/atk


XForms Toolkit

http://xforms-toolkit.org/

LessTif

https://sourceforge.net/projects/lesstif/

Kiss_sdl

GUI toolkit for SDL.
https://github.com/actsl/kiss_sdl

kiss-nanovg-sdl

Based on kiss-sdl but modified to support svg using nanovg.
https://gitlab.com/Mis012/kiss-nanovg-sdl

KiWi

GUI toolkit for SDL.
https://github.com/mobius3/KiWi

RetroGui

Minimalistic GUI library based on SDL.
https://gitlab.com/Pix3l/RetroGui

rouziclib

Works with SDL and other libraries.
https://github.com/Photosounder/rouziclib

Green-GUI

GUI for SDL 1.2 written in C99.
https://github.com/Laurefinwe/Green-GUI

swk

Minimalist widget kit for SDL.
https://oldgit.suckless.org/swk/files.html

WidgetSDL2

C99/SDL2 Cross-platform GUI using include headers.
https://github.com/nuchida7727/WidgetSDL2

uGI

Micro Graphical User interface. Needs SDL2.
https://github.com/wernsey/uGI

SDL GUI

Simple SDL GUI libraries, mainly targeted toward Windows.
https://github.com/David-H-Bolton/sdlgui

CGUI

GUI toolkit using allegro.
http://cgui.sourceforge.net/index.html

Win32

I've seen several C applications written with the Win32 API. That might not sound very portable for platforms other than Windows. However, keep in mind that X11 users have access to winelib and Microwindows offers some Win32 API compatibility. I have been able to get some programs written using a Win32 backend to port and run fine on Microwindows/nano-x.

Otk (Open Tool Kit)

C and OpenGL GUI.
https://sourceforge.net/projects/otk/

IUP

https://sourceforge.net/projects/iup/

LCUI

https://github.com/lc-soft/LCUI

sgui

https://github.com/AgentD/sgui

libui

https://github.com/andlabs/libui

libui-ng
https://github.com/libui-ng/libui-ng

GraphApp

http://enchantia.com/software/graphapp/

Microraptor GUI

https://github.com/hodefoting/mrg

Micro-GUI (ugui)

https://github.com/ryankurte/micro-gui

microui

https://github.com/rxi/microui

FTK

https://github.com/xianjimli/ftk

EasyGui for embedded systems

https://github.com/MaJerle/EasyGUI

m2klib

https://github.com/olikraus/m2tklib

Milkymist Gui Toolkit

https://github.com/m-labs/mtk

mGui

http://web.tiscali.it/morello/MGui/index.html

RGFW

https://github.com/ColleagueRiley/RGFW

RSGL

https://github.com/ColleagueRiley/RSGL

Yzone

http://lifesoft.chat.ru/yzone/

GUISlice

https://github.com/ImpulseAdventure/GUIslice

newt

https://pagure.io/newt

notcurses

https://github.com/dankamongmen/notcurses

vtk

https://github.com/vktec/vtk

Agar

GUI toolkit using SDL. I've read several posts about it being buggy and not well supported. I've personally had no luck porting it to certain platforms.

STFL

Use with PDCurses, ncurses or similar libraries to provide common controls and widgets.
http://www.clifford.at/stfl/

CDK

Curses Development Kit.
https://invisible-island.net/cdk/cdk.html

Widget Curses ToolKit

Ncurses TUI widget toolkit library.
https://github.com/stfsux/libwctk



This list is in no way comprehensive. If you know of other highly portable, strictly C GUI or text user interface libraries, please mention them. If you're working on your own GUI library, would like to discuss C/C++ GUI libraries and development or other C/C++ related topics, feel free to continue the conversation on the CppDesign mailing list.

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 23rd, 2025 11:34 pm
Powered by Dreamwidth Studios