News for hackers. Stuff that matters.
Re:Libui: a portable GUI library for C by sametmax on Sunday May 20, 2018 @02:28AM (#17111508)
I wish more projects lile this existed. Most of the tools don't need a huge UI but something simple to install and well integrated is very much needed.

I like the toga project in python : https://pybee.org/project/projects/libraries/toga/

Tkinter is terribly integrated and QT hard to install so toga hits a sweet spot. But it's very immature.

My favorite toolkit is still wx, however it just reached V3 compat so it's considered unstable. You can pip install it (well, linux support is so so yet) and all the UI looks native, including the file dialogs.

Re:Libui: a portable GUI library for C by terminalcommand on Sunday May 20, 2018 @02:50AM (#17111577)
I think GTK is an excellent library for C. If you use Glade and GTKBuilder, you don't have to write the boilerplate either. You design you UI in Glade visually, add your signals, set your id's etc. Then you save your design as an XML file. In your C code you load that design with a simple function, then assign the function names for the signals you've created in the visual designer. Then you're all set to go.

The library (GTK) feels the same in every language, whether it's C, Python, Go, etc.

I admit, it can be a hassle to get the library up and running, but once you do that, it is surprisingly simple to code in.

Re:Libui: a portable GUI library for C by sametmax on Sunday May 20, 2018 @03:19AM (#17111641)
The problem is it's not well integrated on anything else than Gnome. If you are on KDE, Windows or Mac, stuff like the file picker will make the experience painful.

Even electron apps don't try to reinvent this one and pop the OS widget.

Re:Libui: a portable GUI library for C by floatboth on Sunday May 20, 2018 @09:45AM (#17112632)
Native file pickers on Mac and Windows (and maybe KDE via org.freedesktop.portal.FileChooser) can be used since 3.20: https://developer.gnome.org/gtk3/stable/gtk3-GtkFileChooserN...
Re:Libui: a portable GUI library for C by rapsey on Sunday May 20, 2018 @03:02AM (#17111602)
The UI's look like garbage on anything non linux though.
Re:Libui: a portable GUI library for C by terminalcommand on Sunday May 20, 2018 @10:46AM (#17112908)
Well, GIMP uses GTK and it looks really sharp on all platforms. It all comes down to theming.

I wouldn't say it looks like garbage, but if you want a more native look and feel you could certainly set it up in the settings.

(For example: you could look at https://stackoverflow.com/questions/37035936/how-to-get-nati... )

As a library purely coded in C, I still believe that GTK and GNOME lay a solid foundation for easy development in C.

Before downvoting you might want to give GTK another chance. Even this libui library uses GTK under the hood for linux.

Re:Libui: a portable GUI library for C by Vogtinator on Sunday May 20, 2018 @05:14AM (#17111940)
It looks like garbage on anything not GNOME 3 with default settings.