Low-level X11 programming
Hrm. Not sure what I should do about this one. GUI systems programming is a concept that is new to me, at least in all of its low-level glory. Traditionally, I write things in C# because I really like that language. Eventually, I’d love to see the majority of the software out there using something like it (specifically, managed code) since that would mean that there would have the true possibility of actually writing code once and running it on any computer platform, with any operating system.
Obviously, we’re not there yet. Using managed code today is good for certain types of larger systems and eventually (IMHO) it’ll be good for smaller ones, after the majority of software is using it and there isn’t some extremely large overhead for small tools on the system.
In any case, that gets me to where I am going: I need to learn fairly low-level X11 programming. Why? As I am looking at AllTray, it currently seems that it operates at multiple levels of abstraction, depending on GTK+ and GDK to handle some things, and talking directly to X11 for others. Since AllTray is a program which should be suitable for running on all window managers/GUI toolkits/desktop environments, the core functionality of it should not carry a dependency on GTK.
Part of the work I am doing in AllTray in my current local branch is to refactor functionality, and part of that means fixing this in a decent way. The code base should operate at a consistent level of abstraction for the core (so as to make the code easier to understand and lower the dependencies it carries), while the user interface for AllTray should be native to the environment the user is working in. That is, if the user is running GNOME, AllTray should use GTK+ for presenting its user interface; if the user is running KDE3, AllTray should use KDE 3 for presenting its user interface. This would follow for every environment for which someone wants to submit code for—it’ll be modular, so at build-time you’d specify the interfaces you want to build support for (or, someone could in theory create a standalone library which follows the planned UI API which AllTray will work with) and those interfaces will be probed and queried at runtime; it’s possible that a similar system can be used to work around the quirks of various window managers/GUI toolkits/desktop environments. (I am thinking about a general-purpose plugin and hooking system for AllTray, but I can only think of two uses for it, so it may be better to just implement those special cases and generalize the idea later if it proves to be worth it.) The idea of a plugin system, of course, being so that people can more easily write code to extend AllTray in the ways in which it should be easily extended. Ahh, I digress.
In any case, does anybody know of a good book that will get a person started with X11 programming? Something new would of course be desirable, but (so far) I have only found really old books. Maybe enough hasn’t changed in X11 in the last several years to warrant books on programming directly for it, but I don’t know enough about it at that level to know…