tags:

views:

113

answers:

3

Are there any high-level, cross-platform, and abstracted (simple to use) widget toolkits for C that are either very lightweight and fast or can be compiled for other toolkits, such as Qt and GTK+?

EDIT: Most C++ libraries lack C bindings, so they will be of little (or no) help.

A: 

My choice is FLTK (http://www.fltk.org) but neither it nor the aforementioned wxWidgets are for C. They're C++ libraries.

+1  A: 

enlightenment enables real cross platform from Windows CE to WIndows 7, from Linux to embedded Linux, Mac OS to Mac OS X and it is leightwieght

www.enlightenment.org

penguinpower
looks to be c++ though
cobbal
hmm.. I never used it, though it seems there are no C bidnings :/ though maybe there are no bindings needed for C (as itself maybe writte in C) you should investigate on your onw on that...
penguinpower
Enlightenment Foundation Libraries are written in C, but I was looking for something more portable.
Yktula
"More portable" in which way more portable? If you have further restictions just tell us, so we don't need to stab in the dark...
penguinpower
EFL hasn't been fully ported to the Win* platform. See http://trac.enlightenment.org/e/wiki/EFLWindowsVS .
Yktula
+2  A: 

All GUI toolkits have their quirks and require some time to become familiar with.

If you mean pure C, then GTK+ is the most likely choice, any of the others I'm familiar with are written in C++, so C++ is their native language binding. I have written a simple application with GTK+ in C, and once you become accustom to the container methodology for layout control it becomes quite reasonable to use. It is licensed under GNU LGPL 2.1.

One additional factor that can influence choice are licensing requirements, typically whether your usage is open-source of a particular license or a proprietary application.

wxWidgets uses a LGPL-like license to allow open source and proprietary usage.

Qt is available under various licenses, GPL, LGPL, and a non-free (gratis) commercial license, and is natively C++ binding.

mctylr
It's likely that I'd be dynamically linking, so licensing requirements weren't a big concern of mine. I was looking for something more lightweight than any of the three listed.
Yktula
Can you be more specific in defining "lightweight" or "high-level"? Do you want a cross-platform GUI toolkit or a drawing library (I'm thinking of Cario, http://www.cairographics.org/ ). Cross-platform is basically never lightweight, as the portability costs. E.g. Java.
mctylr