With the recent resurgence in using and maintaining legacy software with projects like XLibre and gtk2-ng, I started to rethink my own desktop strategy. Did I want to take the easy route and update a lot of legacy gtk2 software? There certainly are enough choices in software that work with gtk. I did build XLibre (on Debian with musl) and gtk2-ng (on Debian with musl and on Windows with original MinGW) from source. I haven't shared the build scripts for XLibre but I did upload some of my build scripts for gtk2-ng in case they may be of use: https://git.devuan.org/lmemsm/bldgtk After the experience, I found myself wanting a more lightweight alternative even more than before. So what would a more lightweight desktop environment look like? Glad you asked.

First, I should note that a lot of people enjoy collecting software that looks similar and going to great lengths to theme and give their computers a specific look. If that's your interest, check out projects like gtk2-ng and their growing themes collection. That just isn't a high priority for me. My personal preference is for something that's lightweight, with source code that's easy to understand and modify and that does one thing well. I prefer substance to flash. Portability is a priority since I want to use these programs at home or at work and not be locked into a particular operating system. I want applications and libraries on my system that can be understood and maintained by one person. That's especially important to me because I don't have a community to back up what I'm doing.

I maintain a comprehensive, curated list of GUI libraries written in C. I've searched for a GUI library that I would like for many years. I even wrote an article called "In Search of a Portable Screen Library" that appeared in the C/C++ Users Journal back in September, 1996. While I've never found that one elusive GUI I liked, I have found several useful options.

FLTK is pretty much the most lightweight, full featured GUI library I could find. It's not C, it's C++, but it has some nice applications that were created with it. It currently has 4 themes. One I helped to get added after a pen pal did a beautiful job creating it. I had to settle for a subset of his modifications to get it accepted, but it's still nice to have another choice. So, for now I'm using FLTK for any programs that require more extensive GUI functionality. I'm trying to resurrect and update legacy FLTK programs like APCStudio for audio editing and postoffice for email. FLTK already has some very helpful settings applications such as alsamixergui and flsynclient. Georg, creator of XFDOS and NanoLinux, took several FLTK programs and brought new life to them and even designed new ones to create a complete desktop. TinyCore Linux also uses FLTK for their desktop. Between these two sources and the apps that were listed at the FLTK site, one can piece together an entire desktop just of FLTK based programs. FLTK works on the major operating systems. However, if it's used with nano-x, it can be ported to Android, embedded systems and handheld devices. Later versions of FLTK have additions made to ease the creation of other backends without needing to rely on nano-x for portability. I've been working for a long time trying to get SDL to function as a viable backend.

However, I don't want to stop there. I've found several useful SDL applications including a SDL based PDF viewer, an ebook reader with text to speech capabilities using flite, a graphics viewer and a graphics slideshow program and font viewers. Another advantage of SDL is that it works on a wide range of systems from Linux and Windows to handheld devices and Android.

You can find a full range of applications for almost any need already written in curses. While it's fast and useful to run applications in console using options like BSDcurses, there is a port of pdcurses that works on top of SDL. So it can run anywhere that SDL does. While it looks like a text user interface instead of a GUI, using it with a SDL backend can make it function more like a standard GUI application. Most curses/ncurses based programs will work with pdcurses as well. I've been trying to update a nice curses based password manager that uses an earlier version of the keepass database format to work with a more up-to-date keepass format.

OpenGL is a great base for games and makes an interesting backend for developing a GUI. SDL and FLTK can integrate with OpenGL. SDL also uses OpenGL as a backend in some cases. Raylib is another very promising library that works on OpenGL. It was designed to make programming in C/C++ easy to learn. It can work with a GUI called RayGUI. Raylib and RayGUI are highly portable and work on a number of platforms. One other library I like that uses an OpenGL backend is otk. It's extremely lightweight (similar to single header projects). It has some very useful GUI controls and some useful example programs were created for it. OpenGL works on a number of platforms but what if you're on a platform where OpenGL drivers are not available? Mesa, the FOSS implementation of OpenGL, is another option. However, it can be a heavyweight library that's difficult if not impossible to build on many non-POSIX operating systems. There are several lighter implementations that tried to offer OpenGL 1.1 compatibility on handheld devices, older computer operating systems and devices that do not have OpenGL or OpenGLES drivers. One very well-known implementation is TinyGL. It provides a subset of OpenGL. It's been forked multiple times and many projects have added missing features. I've collected several patches and added even more missing features to one fork known as PicoGL. PicoGL has multiple backends including Nano-X, X11 and SDL. I've recently experimented with some success in trying to get otk to work with PicoGL and SDL as an alternative to OpenGL with X11 or Win32.

So while these various projects may all present different looks via their user interfaces and may even seem like random choices, I chose these options strategically with portability in mind. They can provide a coherent, unified porting strategy. OpenGL and/or SDL can be used as a base for many of these options providing portability to any of the operating systems that can support OpenGL or SDL. PicoGL can be used as a backend on systems where OpenGL is not an option. These three options run on multiple platforms. If X11, Wayland and Win32 aren't available on a system, they can work with nano-x or in framebuffer. If SDL works on a system, nano-x, pdcurses and PicoGL can work on that system since they all have SDL backends. I'm working on adding FLTK and otk to that list. If OpenGL is available on a system, SDL and Raylib work well with that. If nano-x works on a system such as FreeDOS or an embedded OS, FLTK and PicoGL can be ported using it. The goal is to make these components as portable as possible so they can be used on a wide variety of operating systems. They're also lightweight and fairly easy to build. They can run on more unusual operating systems and be more easily maintained. They may seem like a disparate group of libraries, but I think they could be pulled together and used to build on each other to improve portability and provide a way to run lightweight applications on a wide variety of platforms and operating systems.

I'm aware this type of project isn't going to be something of interest to the average user. It won't appeal to the person who prefers to use a package manager to install applications instantly or to the person who enjoys custom theming and making everything look coordinated on his or her system. I am primarily doing this for myself and will continue to work on these types of projects on my own. However, it would be fun to find others with similar interests to compare notes and possibly brainstorm, find new programs to port or share patches to bring new life to some older applications. Imagine running a set of lightweight applications on a very old laptop or computer or a handheld device. If it runs efficiently on older computers, it will run even faster on modern ones. It also gives one person the opportunity to know how to build and maintain the applications on his/her system. That person isn't stuck waiting for a patch from upstream or worrying about whether a favorite project will be abandoned. So, if anyone is interested in discussing a GUI landscape like this further, feel free to contact me on Mastodon (https://fosstodon.org/@lmemsm) or by email. Let's talk.

GTK2 fork

May. 7th, 2026 06:34 pm
I was very interested to hear about a GTK 2 fork. I have enough programs and libraries to build a portable desktop environment. However, I really miss SciTE and that requires GTK to build on most systems. I had considered trying to revive a GTK 1.2 build just to get a minimal version of SciTE working. Amigo Linux had an updated version of GTK 1.2. However, when I heard about the GTK 2 fork, I decided to give building it a try and see how portable it would be and if it would work on the systems I'd want to run it on.

I ran a quick test build on Debian and it worked well. Then, I spent several days trying to get this working with my legacy MinGW compiler. It works. I'm not thrilled with the Perl or Python requirements in the build systems for GTK and its dependencies. I'm also not thrilled about the hard-coded paths for finding assets and files. If I decide to go any further with it, I'd introduce my path library so locations aren't necessarily hard-coded. I'd also like to find a way to remove the Perl or Python dependencies from the build. I'm using configure and make, so I may not bother to create my own CDetect configure and GNU makefiles. If I was using later versions of the dependency libraries that required meson and Python, I'd consider it.

I already have applications that build using SDL, FLTK, pdcurses, otk and Raylib/RayGUI. That's enough GUI support to provide a comprehensive list of desktop applications. They're also easy portable and don't require a great deal of dependencies to build. So, I can build and maintain programs I run on my system from source code and patch them as needed. That is one of the major points Free Software, to give people the ability to build and modify the programs they use. I'm not sure whether I'll be adding GTK 2 to the list of GUI, TUI and graphics libraries I work with, but it's nice to know that it can be built from source and that it works. It's now an option if I need it.

If anyone is interested in the source code, the gtk2-ng project is here:
https://git.devuan.org/Daemonratte/gtk2-ng
I built it with glib 2.42.2, atk 2.14.0, pango 1.36.8, gdb-pixbuf 2.31.7 source code straight from the gnome.org site.

I'll be sharing some of my build scripts here:
https://git.devuan.org/lmemsm/bldgtk

Also saw mention of this project to run some of the programs that require GTK 3 with GTK 2:
https://github.com/stefan11111/gtk3-to-gtk2

Raylib

Jan. 20th, 2022 02:21 pm
I've covered programs designed with lightweight GUIs and text user interface libraries such as SDL, FLTK and pdcurses in previous posts. Another interesting and promising cross-platform lightweight screen library is raylib. There's a GUI for it called raygui. There's even a cross-platform audio library called raudio. Programs written with raylib have been ported to several computers including Linux, Windows and Mac. It can be used to write programs for mobile devices. The audio library works on multiple platforms including mobile devices as well.

You can find raylib and several helpful libraries you can use with it at:
https://github.com/raysan5

I haven't had a chance to check out many of the programs that are built with raylib. However, you can find a group of example games at:
https://github.com/raysan5/raylib-games
I've been trying to find a decent jigsaw puzzle game written in C. There is a photo puzzle game for raylib at:
https://github.com/klaytonkowalski/game-photo-puzzle

There's also an experimental GUI editor here:
https://github.com/Demizdor/experimental-raygui-editor

I'll add other interesting raylib examples as I find them. Feel free to share you're own as well.
Was looking for a cross-platform open file dialog for SDL that I could use to select files if one isn't provided via command line. There are lots of options but finding a solution isn't as easy as I would like.

There are SDL programs like Bard and Milkytracker that have this sort of functionality. The code for the file dialog functionality is integrated with the programs, so it would be hard to remove it and use it as a library for other programs.

One could integrate SDL with other GUI toolkits. There are some interesting articles on how to do just that. However, I'd like to avoid the overhead of the heavier toolkits.

Nuklear has a file browser example. The basic Nuklear backend uses OpenGL instead of SDL. One would need SDL_gpu or a similar solution to use Nuklear with a SDL backend.

otk has a file browser example ( http://otk.sourceforge.net/tutorials.html ). It also uses OpenGL instead of SDL, but it needs less dependencies than Nuklear to build. It's worth considering, but it's not quite as ergonomic as other options.

The dialog program which can be built with ncurses, pdcurses or other versions of curses has a directory selection dialog. Applications built with pdcurses can use a SDL backend. However, that would mean adding a pdcurses dependency to projects. Plus, dialog is a program and it's not really designed to be called as a library. There are other options that will build with pdcurses and are designed to be called as a library such as CDK.

A similar option to the dialog solution would be to use BSD libform and pdcurses. One would need to write the rest of the dialog functionality though.

Some small projects use tiny file dialogs ( https://sourceforge.net/projects/tinyfiledialogs/ ). It can use native Windows or conio options on Windows. However, on Linux systems it would need some help from tools like dialog or zenity or similar tools.

When searching for SDL file browsers, I ran across this code:
https://www.omnimaga.org/ti-nspire-projects/sdl-file-browser/
It has a GNU GPL 3 license. It's written for SDL 1.2.

There's also the Jlime project's fileselector code. It works well enough and it's fairly readable. It has a GNU GPL 2 license. It's written for SDL 1.2. So, a port for SDL 2.x would be needed. Plus, I needed to add some support on Windows to use the GetCurrentDirectory in place of getcwd in order to build it successfully.

Those are the options I've found so far. I'd love to track down some other possibilities. Have any other SDL based suggestions? Please share them.
Along the lines of investigating portable C GUI libraries, I started looking at cross-platform library options for font rendering in C. This area is particularly useful if you're investigating creating your own GUI library or game library. I was most interested in the TrueType font rendering libraries and techniques. It was rather surprising to read just how difficult it is to get simple internationalized text to the screen especially using graphics libraries like OpenGL.

Here's what I've located. If you have other recommendations for C font rendering libraries, please let me know.


GUI library options like nuklear and nanovg use stb_truetype.h:
https://github.com/nothings/stb
They also use some kind of font stash, such as this one used with nanovg:
https://github.com/memononen/fontstash


Other GUI libraries use FreeType2.
https://www.freetype.org/

For instance, SDL2_ttf uses FreeType2.
https://www.libsdl.org/projects/SDL_ttf/

Allegro also has font libraries available that are based on FreeType2.
http://opensnc.sourceforge.net/alfont/mirror/

Here's one that works with Allegro or SDL:
http://kirill-kryukov.com/glyph-keeper/files.shtml


There are several font libraries for OpenGL, but there aren't many options written in C. Some are for older versions of OpenGL and some only work with later versions. Here's what I found so far:

https://github.com/rougier/freetype-gl
https://github.com/jtsiomb/libdrawtext
http://quesoglc.sourceforge.net/


Here's another C option that works with FreeType2 and embeds fonts in C programs:
https://github.com/chrisy/fontem


The most recommended technique used by OpenGL developers seems to be texture mapping. A texture can be used like a hash table to store various characters and other pixmaps that need to be rendered. An OpenGL function can draw a piece of the texture or update/change parts of it in memory without affecting performance too much. While software renderers have no real trouble copying or blending a bitmap graphic or pixmap, the newer OpenGL versions send the textures to the GPU for rendering. So utilizing a texture instead of bitmaps/pixmaps and minimizing the number of textures one is working with can improve performance.

I personally find it easier to render text with SDL. It handles copying and blending bitmaps (as an SDL_Surface) and offers a useful library (SDL_ttf) to do most of the work. SDL 2.x does use OpenGL underneath on some platforms, so some of the texture concepts used by OpenGL programmers might improve font rendering performance on some versions of SDL as well.

Freetype seems to be the library for working with TrueType fonts. SDL_ttf uses freetype to interpret the Truetype font format and create bitmaps/pixmaps to represent characters (converting them from vector format to bitmap/pixmap format). I found working with SDL_ttf a lot more user-friendly than trying to use Freetype directly.

Another viable option is stb_truetype.h. The license for this software is definitely an advantage. However, from what I've read the rendering still isn't quite as good as Freetype. I look forward to testing this out on my own at some point.

At this point, I'm still investigating SDL_ttf, stb_truetype.h and OpenGL texture mapping. A combination of these might be just what's needed in a font rendering design for a cross-platform GUI library.

Know of some other font rendering options that work well for Truetype fonts or have a better way to get fonts to the screen, I'd love to hear about it?
Some of the C graphics libraries are great, but I've yet to find a simple GUI that makes it easy to port some older BASIC programs that I want to be able to keep working with. I've created several iterations of my own GUI library, but have never been satisfied with the results. That's the main reason I keep investigating cross-platform GUIs, to see if someone's found a better way to do it. Of the various designs, the ideas behind the immediate mode GUIs seem the most useful for the type of programs I'm targeting. However, I can't seem to find one GUI library that provides a simple way to do what I want. So, I've decided to revisit my old GUI library designs but eliminate some of the framework constraints and some of the object oriented elements. Instead, I'm looking at a more procedural approach that uses concepts from immediate mode GUIs.

Even though I'm avoiding popular C/C++ GUI libraries, I'm not starting completely from scratch and writing everything myself. There are plenty of good graphics libraries that are very portable and make a great basic starting point for a GUI. One of the libraries I've been very impressed with is SDL. It makes a great base for porting software. I've also done a lot of work with PicoGL (a TinyGL fork). It's a convenient way to make OpenGL more portable and avoid some of the version issues. It works on low resource platforms such as handheld devices that don't have high performance video driver support. I've often found OpenGL and Mesa slow on older computers and low resource systems. PicoGL provides very good performance on these types of systems. While using Win32 is not as portable as I would like, it's not that hard to get an OpenGL window up and running on Win32. That easily allows switching between Win32/OpenGL and SDL (1.2.15 or SDL 2.x)/PicoGL. SDL can work on a variety of platforms and PicoGL can work with SDL or with other options such as nano-x, X11 or vesa framebuffer. It shouldn't be too hard to take the output from PicoGL to use with the Android bitmap API either. Another possible option for a backend is Allegro. Like SDL, it works on a variety of platforms. It would be nice to switch between SDL and Allegro as backends depending on which works best for a particular platform without needing to redesign an entire application.

The PDCurses/ncurses API provides a standard way to create console based programs that work well on a variety of platforms from DOS to Windows to FreeBSD to Linux. However, it provides only text support and no real graphics support. While it's great for porting programs written to work with it, I don't think it's the best option to use as a GUI backend. I recently came across TinyCurses which provides a subset of the API and uses SDL as a backend. PDCurses also offers SDL as a backend option. I couldn't help thinking, once a decent GUI design was finalized, it wouldn't be too hard to provide a subset of functionality similar to PDCurses/ncurses. That would allow for easy porting of some PDCurses/ncurses based applications to any platform the GUI library works on.

So, why not just use OpenGL as the backend to design a GUI library? After considering the pros and cons, I decided I don't want to be tied specifically to OpenGL as an API for 2D graphics. While it's very popular and available on several platforms, the changes from a fixed function pipeline to a programmable pipeline with its own shading language make it hard to port programs from one version to another. PicoGL makes use of old fixed function pipeline concepts. Windows OpenGL also uses the older design. Mobile devices and WebGL make use of the newer concepts and the ability to harness the GPU to do more processing. Many developers seem to be abandoning the older concepts and embracing the new programmable pipeline design. However, that leaves some nice older applications that were designed for earlier versions of OpenGL that won't port easily to the newer versions. They might require a complete redesign and rewrite. Using PicoGL is one way to make it easier to port such applications. It can do software rendering to a bitmap which can then use more modern methods (including later versions of OpenGL or SDL 2.x) to transfer the bitmap to the screen. While the idea of using OpenGL as the portable backend for a GUI library sounds good, dealing with version differences and what versions may be available on which platforms does not make it the best option for a complete cross-platform portable solution. Instead, I prefer the concept of being able to switch out backends to use what works well on a particular platform. The GUI library should encapsulate the rendering as much as possible to avoid needing to rewrite applications in order to switch to another backend.

On the other hand, many GUI libraries and some other rendering libraries (such as SDL) offer ways to interoperate with a graphics library like OpenGL. While I want my GUI library code to be cross-platform, I don't want to limit a developer to using just that API. If a programmer wants to use OpenGL or SDL2_gfx or some other library to handle 2D/3D graphics, I'd like the GUI to be able to interoperate with that choice. It would mean that the resulting application would be less portable. However, if an application is already designed to utilize SDL2_gfx, OpenGL or some other library that could work compatibly with the GUI library, it could make adding some GUI functionality to an existing application much easier.

I definitely know what I'm looking for in a cross-platform GUI. I want a simple, portable way to get text, menus, forms, file/directory picker dialog functionality to the screen. I'd like to make use of Freetype fonts. I want an internationalized way to display text and for users to input text. The text strings will probably involve a library such as gettext. I want the options to use keyboard input for those of us who prefer keyboard commands to get their work done and mouse/touchscreen input for devices such as mobile phones where a real keyboard may not be available. I need to be able to access graphics and audio information from a file system or from a zipped file (such as .apk file on Android). I don't care if the look and feel matches what's in style for a particular device or operating system. I just want it to be user-friendly and ergonomically designed.

If you're interested in GUI design or working on a GUI or gaming library of your own, I'd love to compare notes on the subject. Have an idea for what C library might make a good backend for a portable, cross-platform C based GUI? Let me know. Feel free to discuss design issues or other C/C++ topics on the CppDesign mailing list or contact me to compare design notes and share ideas ( http://www.distasis.com/connect.htm ).
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

zraygui

Retained mode GUI based on raylib and raygui.
https://github.com/idircarlos/zraygui

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

I recently ran across some good news on the GTK+ front. There's been a new fork of GTK 2. There's even talk of integrating some of the other GTK 2 forks. I'm hoping this project will provide a less bloated but feature rich, C based GUI framework. I am also hoping this project will be more friendly to accepting bug reports and patches than the official GTK project.
https://git.devuan.org/Daemonratte/gtk2-ng


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

Clay
https://github.com/nicbarker/clay

CursedGL

OpenGL like library based on notcurses
https://github.com/saccharineboi/CursedGL

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
https://github.com/marionauta/microui-raylib

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.
GUI libraries

I've written articles on cross platform screen libraries including one for the C/C++ Users Journal. I've also done a lot of searching and evaluation of cross-platform GUI libraries. You can take a look at my comparison article on screen libraries at http://www.distasis.com/cpp/scrlib.htm

The following list does not cover every GUI library out there, but it gives a good sample of what's available. Most are C++ libraries but there are a few C libraries for those wanting to work only with C.

My personal preferences at this point are SDL (1 and 2), pdcurses and FLTK because they're lightweight and work on a large variety of systems including mobile devices.

URLs are accurate as of when this was posted. However, they can change over time. You can use a search engine or archive.org wayback tool to find pages that have been moved or backups of older versions of pages.

FLTK - Fast Light ToolKit (C++)
http://www.fltk.org/index.php

Fox Toolkit (C++)
http://www.fox-toolkit.org/

wxWidgets (C++)
http://www.wxwidgets.org/

SDL - SDL 1 and SDL 2
Simple DirectMedia Layer - C cross-platform multimedia library
https://www.libsdl.org/

SDL-widgets
C++ library
http://members.chello.nl/w.boeke/SDL-widgets/

SMFL - simple and fast multimedia library
http://www.sfml-dev.org/

pdcurses
C library
Works with Windows console, X11, SDL 1 and 2
http://pdcurses.sourceforge.net/

pdcurses win32a
C library
A PDCurses fork for Win32 (not console mode).
http://www.projectpluto.com/win32a.htm

Qt
Expansive C++ GUI toolkit - source includes many libraries including a browser example using Webkit.
https://www.qt.io/

NCurses
C console library. Works on POSIX systems and Windows.
http://invisible-island.net/ncurses/

Windows++
I learned a great deal about Win32 C++ programming from the book that created this framework:
https://web.archive.org/web/20070404043707/http://www.dilascia.com/wpp.htm

Owlnext
Borland's Object Windows C++ Library for the modern age
https://sourceforge.net/projects/owlnext/

Ultimate
C++ cross-platform rapid application development framework
http://www.ultimatepp.org/index.html

Poco
C++ library
https://pocoproject.org/

Nana
C++11 GUI library
https://github.com/cnjinhao/nana

GraphApp
Toolkit for platform-independent graphical user interface programming in the C language.
Works with Windows and X Windows
http://enchantia.com/graphapp/

Anti-Grain Geometry
C++ free graphics library for Windows and X11. Includes SVG viewer.
http://www.antigrain.com/about/index.html

CEGUI
Crazy Eddie's GUI System C++ library providing windowing and widgets for graphics APIs/engines
http://cegui.org.uk/wiki/Main_Page

Guichan
Portable C++ gaming library for Allegro, SDL and/or OpenGL
https://sourceforge.net/projects/guichan/

AntTweakBar
C/C++ GUI library for OpenGL and DirectX applications.
http://anttweakbar.sourceforge.net/doc/

Agar
C Cross-platform toolkit for graphical applications.
Difficult to build on some systems and some versions can be buggy.
http://libagar.org/

LibUFO
LibUFO Universal Form Objects, C++ core library for forms.
http://libufo.sourceforge.net/index.html

VGUI
C++ V GUI library and IDE (VIDE).
http://vgui.sourceforge.net/

IUP
Multi-platform toolkit for building graphical user interfaces. with API in three languages: C, Lua and LED.
http://webserver2.tecgraf.puc-rio.br/iup/

Milkymist GUI toolkit
C GUI library
https://github.com/m-labs/mtk

m2tklib
Mini Interative Interface Toolkit Library
https://code.google.com/archive/p/m2tklib/

ftk
Funny tool kit, a C cross-platform embedded GUI
https://github.com/xianjimli/ftk

September 2026

S M T W T F S
  1234 5
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 8th, 2026 05:01 pm
Powered by Dreamwidth Studios