Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.


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


The UI's look like garbage on anything non linux though.


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.


It looks like garbage on anything not GNOME 3 with default settings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: