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.htmAllegro
https://www.allegro.cc/aboutAGG
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_GeometryNano-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/microwindowshttps://github.com/georgp24/microwindows-android-binhttps://github.com/ghaerr/nxlibOpenGL
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/PDCursesTinyWidgets
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/TinyWidgetsnuklear
This looks promising. Has several backends including GLFW, SDL, Win32, X11, SFML, allegro, nanovg.
https://github.com/Immediate-Mode-UI/Nuklearhttps://github.com/vurtun/nuklearhttps://github.com/vurtun/nuklear/issues/202There are also projects that combines nuklear and raylib:
https://github.com/RobLoach/raylib-nuklearhttps://github.com/tcfunk/raylib-nuklearraygui
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/rayguic_ugui
Immediate mode GUI using Raylib.
https://github.com/Aurumaker72/c_uguinanovg
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/nanovghttps://bitbucket.org/duangle/oui-blendish/srcGTK+
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/gtkhttps://github.com/tindzk/GTKAnother interesting GTK+ based option, there were some ports of GTK+ that use the ncurses backend.
https://atrey.karlin.mff.cuni.cz/~pavel/cursed/cursed.htmlhttps://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/gtk2https://github.com/stefan11111/atkXForms Toolkit
http://xforms-toolkit.org/LessTif
https://sourceforge.net/projects/lesstif/Kiss_sdl
GUI toolkit for SDL.
https://github.com/actsl/kiss_sdlkiss-nanovg-sdl
Based on kiss-sdl but modified to support svg using nanovg.
https://gitlab.com/Mis012/kiss-nanovg-sdlKiWi
GUI toolkit for SDL.
https://github.com/mobius3/KiWiRetroGui
Minimalistic GUI library based on SDL.
https://gitlab.com/Pix3l/RetroGuirouziclib
Works with SDL and other libraries.
https://github.com/Photosounder/rouziclibGreen-GUI
GUI for SDL 1.2 written in C99.
https://github.com/Laurefinwe/Green-GUIswk
Minimalist widget kit for SDL.
https://oldgit.suckless.org/swk/files.htmlWidgetSDL2
C99/SDL2 Cross-platform GUI using include headers.
https://github.com/nuchida7727/WidgetSDL2uGI
Micro Graphical User interface. Needs SDL2.
https://github.com/wernsey/uGISDL GUI
Simple SDL GUI libraries, mainly targeted toward Windows.
https://github.com/David-H-Bolton/sdlguiCGUI
GUI toolkit using allegro.
http://cgui.sourceforge.net/index.htmlWin32
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/LCUIsgui
https://github.com/AgentD/sguilibui
https://github.com/andlabs/libuilibui-ng
https://github.com/libui-ng/libui-ngGraphApp
http://enchantia.com/software/graphapp/Microraptor GUI
https://github.com/hodefoting/mrgMicro-GUI (ugui)
https://github.com/ryankurte/micro-guimicroui
https://github.com/rxi/microuiFTK
https://github.com/xianjimli/ftkEasyGui for embedded systems
https://github.com/MaJerle/EasyGUIm2klib
https://github.com/olikraus/m2tklibMilkymist Gui Toolkit
https://github.com/m-labs/mtkmGui
http://web.tiscali.it/morello/MGui/index.htmlRGFW
https://github.com/ColleagueRiley/RGFWRSGL
https://github.com/ColleagueRiley/RSGLYzone
http://lifesoft.chat.ru/yzone/GUISlice
https://github.com/ImpulseAdventure/GUIslicenewt
https://pagure.io/newtnotcurses
https://github.com/dankamongmen/notcursesvtk
https://github.com/vktec/vtkAgar
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.htmlWidget Curses ToolKit
Ncurses TUI widget toolkit library.
https://github.com/stfsux/libwctkThis 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.