Advertisement

XWindows programming

Started by March 26, 2005 03:02 PM
4 comments, last by Genjix 19 years, 8 months ago
What is the Linux/UNIX equivalent of the Windows API functions? I mean, to do graphics and such on Linux or UNIX, where should I start?
my siteGenius is 1% inspiration and 99% perspiration
Probably with the QT or GTK+ libraries.
Advertisement
The closest equivalent to the Windows API is probably kdelibs. It is quite nicely integrated into a suite of libraries to do things ranging from GUIs and HTML rendering to networking and printing. You can probably find everything you need to know about it from developer.kde.org . QT's licensing might be a problem though. AFAIK kdelibs is LGPL so you can link your app to it even if you decide to buy the commercial QT license.

Otherwise you will probably use diffrent libraries for diffrent tasks. I know of no other monolithic API suite for unix than kdelibs. You can use GTK+ (or its C++ wrapper gtkmm) for GUI widgets or SDL for custom rendering (via OpenGL or otherwise).
you forgot Xlibs, they're about as low level as you can get.
As someone in the process of making an X11 window manager, I sincerely recommend you stay as far away as possible from the horrible mess that is Xlib. Unless you need some advanced features, try to use a higher level library like the ones listed above. Of course, 'graphics and such' is a bit vague, but if you mean GUI stuff, Qt or GTK are your best bets. If you mean graphics such as OpenGL, strongly consider using something simple like SDL or GLFW. Anything to stay away from Xlib, unless you absolutely need it. :-)

Just my humble opinion.

-bodisiw
-bodisiw
I'm surprised none of you mentioned WxWindows, what with KDE support coming soon.

When that happens I can drop QT altogether and make apps that will work with gtk+ and QT.

This topic is closed to new replies.

Advertisement