4 ms·
"The best" is subjective. I have played around with libui (https://github.com/andlabs/libui https://github.com/andlabs/libui), which runs on Windows, Linux, and
by edko 10y ago
"The best" is subjective. I have played around with libui (https://github.com/andlabs/libui https://github.com/andlabs/libui), which runs on Windows, Linux, and macOS. A nice thing about it is that it is written in C, and therefore has bindings with several programming languages. I have experimented using it from Java (via JNA) and it works quite nicely.
- rer 10y agolibui is kind of neat. It wraps around GTK+. Why did libui have to do that? In other words, is GTK+ bad enough that the easiest way to use it is to wrap around it?
- barrkel 10y agoGTK+ is dreadful on Windows. I'd stay away. Personally I implement the UI in as thin a layer as can be architected and reimplement for every platform. It's the best way, and probably cheaper for most apps than trying to force some lowest common denominator library to express what you want in high fidelity.
- rer 10y agoOk, no GTK+! (Could this be fixed with GLib?) I didn't understand this. When you say you implement the UI as a thin layer do you mean you wrap only the few controls you need?
- andlabs 10y agolibui only wraps around GTK+ on Unix systems. On Windows, it uses the native Windows API directly. GLib is a utility library; it provides things like container types, filesystem access, networking utilities, threads, object-oriented programming with events and properties, and other similar functions in a platform-independent manner. GTK+ uses GLib. You can use GLib on its own as well. It won't solve the problem of GTK+ being clunky on Windows, though.
- rer 10y agoWhat I don't get is: which library lets you draw stuff on the screen. GLib or GTK+? I thought that was GLib, and GTK+ was using GLib to implement controls. Which library does one need to build their own controls?
- shoover 10y agoI saw this here a few months ago, with interest. Indeed, there is quite a list of language bindings growing there. It seems this could pair nicely with .NET Core and appeal to C# developers who may prefer to transition to a cross-platform UI library instead of UWP.