Question

I have stubbornly decided to learn Xlib programming for Linux GUIs, just for fun & the gained experience. I'm young and have lots of time to read useless stuff. Nobody seems to want people to learn this, though, as everywhere I look, askers are being bombarded with suggestions of using a toolset instead - usually Qt or wxWidgets. This is kind of sad, if nobody learns Xlib, who will continue development of e.g. wxWidgets? I will learn wxWidgets too, though, when I feel comfortable with Xlib.

So - with that out of the way - my question is: Is there a recommended book (or other resources) for learning Xlib programming, preferably with C++, but C is OK too. Windows programming has its Petzold, I was wondering if Xlib had some sort of equivalent.

Was it helpful?

Solution

There used to be a whole series of books on X programming (they actually worked their way up to Xlib!) but the one you probably want is Xlib Programming Manual

Over a year later I ran across a "retro UNIX" imgur album which has a picture of it! Keeping good company with the Red Book (the Postscript Language Reference Manual) and another in the O'Reilly X series.

OTHER TIPS

I liked one by Levi Reiss and Joseph Radin, I think it was "X Window inside and out" (I read a translated version). Of course, it's really outdated, and predates Xutf8* functions, XRender, XFt and client side fonts, XCB, XRandr, Composite, etc...

I found this on amazon: Fundamentals of X Programming

Also found these books myself:

http://www.amazon.com/Introduction-Window-System-Oliver-Jones/dp/0134999975/ref=sr_1_4?s=books&ie=UTF8&qid=1288651669&sr=1-4 (old and expensive, but it's something)

http://www.amazon.com/Window-Programming-Scratch-Jesse-Libertys/dp/0789723727/ref=sr_1_25?s=books&ie=UTF8&qid=1288651711&sr=1-25 (this one is quite recent, compared to most other resources I could find, but it's got some bad reviews. Maybe worth the read)

http://www.amazon.com/Window-Toolkit-Complete-Programmers-Specification/dp/1555581781/ref=sr_1_44?s=books&ie=UTF8&qid=1288651754&sr=1-44 (supposedly good, actually on Xt, but I guess it might be worth the read)

And this website which seems to at least contain something usable: http://manuals.itc.virginia.edu/unixdocs/u014.xwindows.html

If anyone has read any of these, please leave a comment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top