On Mon, Jun 30, 2003, Hetz Ben Hamo wrote about "Re: [Jog Offer] SGI is looking for a Xwindows hacker": > > I too used to hear horror stories about Xlib, now that I had a geuine > > encounter with it myself, I can tell you that everything you heared is > > completly true :-) > > XLib documentation is a great material to read if you're in the toilet - I can > attest that ;)
Wow, Xlib is certainly getting a bad rep here ;) Xlib (and the X11 protocol in general) is not as bad, boring, or hard as you might think. X11 was an amazingly advanced and interesting paradigm for its time (the 80s). Except for a few issues the current protocols (and ICCCM) failed to catch-up on, like fonts printing and sound, X11 is still a very good framework, and it is a damn shame that people that failed to understand it decided to work around it with unnecessary bloated replacements (like CORBA, etc.). Anyway, for people who don't know: Xlib is the most low-level X-Windows library, and it is basically the application's way to talk the X11 protocol to the server. It's no wonder that Xlib was never meant to actually write applications in - it has no widgets, no convenience features, and so on. For what Xlib was meant to do, it does it well, but don't go trashing it for how difficult it is to write an "hello world" program in Xlib. It was never supposed to be easy. Since Xlib is so low-level and you can do basically anything with it (like sniff keypresses from other applications, draw on other windows, etc.) there's the "ICCCM" (Inter-Client Communications Conventions Manual) which describes how "civilized" clients should communicate with each others (via Xlib's builtin communication mechanisms, like "atoms" and "properties"); The most important of these clients is the Window Manager, and the ICCCM explains how this works. The fact that the Window Manager can be (and is) "just another client" is one of the strongest sides of X-Windows, in my opinion. Another strong feature is that clients can transparently communicate through the X server, even if they're running on different machines. The object-oriented (in C) widget framework that the MIT people designed for X11 is called "Xt" (X toolkit). Xt is only a framework for widgets (and a quite complicated one, at that) but does not include any widgets. MIT produced the "Athena Widgets" (Xaw) as an example of a widget set - an extremely ugly, but working widget set (run "bitmap" for an example). A much better set of widgets for Xt is "Motif". Unfortunately writing in C+Xt+Motif is anything but easy. But certainly possible, and gives good results. Xt's complexity is probably what prompted later widget set developers (Tcl/Tk, Qt, Gtk) not to use it at all and provide their own widget framework. Documentation for all these components of the X11 API is available with the X11 sources. Some of this documentation is good (I was especially impressed by the ICCCM), for some of it you'd be better off reading one of the dozens books published on these issues. > God, I like X, but not the organization behind it. X11R6.6 purposal was given > 2 years ago, and not much has been done since then (ok, there's IPV6 > purposal.. yawn)... I'm more saddened by the fact that there hasn't been much progress since X11R4 which came out a decade ago. Well, there have been a few areas of progress (like the X keyboard extension, which is a real mess but basically works and beats the original protocol) but most problems that annoyed me a decade ago (like the lack of a printing "protocol" in the ICCCM) still remain. Note that X-Windows' speed was never a problem for me 10 years ago, and certainly isn't one now. Speed is only a problem for gaming (and there are workarounds for that) and when bloated widget frameworks (I shall not name names :)) take over your machine. -- Nadav Har'El | Monday, Jun 30 2003, 30 Sivan 5763 [EMAIL PROTECTED] |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |Red meat is not bad for you: fuzzy green http://nadav.harel.org.il |meat is bad for you. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]