Re: learning X programming



Allan Adler wrote:
I have the following documents:

(1) Xlib - C Language X Interface
X Consortium Standard
X Version 11, Release 6.4
(2) X Toolkit Intrinsics -- C Language Interface
X Window System
X Version 11, Release 6.4
First Revision - April 1994

The former is 466 pages, the latter about 291 pages. Which of them
should I read first?

If there is something I should read before either of them, which is
probably likely, that would be good to know. Also, neither of them
seems to spend any time on programming examples. A source that shows
how to get started with X programming under Linux would also be welcome.

Most likely I would be doing this in C, but I also have my eye on the
following document:
(3) Xlibscm
SCM Language X Interface
Version 5d8

The answer to this question depends on what you are trying to do. If you want to use X to write applications, then I agree that Gtk, as suggested by other respondents, is the way to go. But if you want to have a deeper understanding of X, and in particular how the X protocol operates to achieve the graphics, then Xlib, using the references that you mention is the way to go.

I have written X applications in Gtk, and when time permits, are exploring the X protocol by programming in Xlib only, using none of the higher level toolkits. This I hope to eventually give me a much better appreciation of what X is capable of, without the filtering affects of the toolkits. This approach, more of a research tool, leads to programs that are a little longer in source code length than if using the toolkits. I have seen nothing that I like at this level, so I have gone my own way. As I have programmed I have written each program up: although the programs work the write-up could have some bugs in it. If you would like a copy of what I have, which are all in LaTeX format, drop me a line.

Ross
.



Relevant Pages

  • Re: A taxonomy of types
    ... (I do not see why inheritance is required here.) ... without an »object-oriented programming language«, for example, ... in the programming language used. ... indirectly) implements an interface IA whose declaration ...
    (comp.lang.misc)
  • Re: Forth Frustrations
    ... I was working on an interface to my new window system in Ficl. ... I found it extremely frustrating to juggle around data on the stack, such as 2 RGBA color components when building a gradient. ... I've been accused of programming C in Forth, as if that's somehow terrible, but I digress... ... I was thinking that indexed keyed arrays might be an approach, or a completely different language. ...
    (comp.lang.forth)
  • Re: Announce: Alpha release of BDB-BASIC
    ... those early BASICs, and are still most comfortable with them. ... language will be the most used to program microcomputers five years ... But as soon as you remove them you make the interface more ... programming language that's as easy to use as RPL (The programming ...
    (comp.lang.basic.misc)
  • Re: Programming Languages / IDEs
    ... I am not a professional by any means the Language I am most familiar ... How did you learn your programming skills? ... IMHO - an IDE does not really add that much. ... prototype interface in less time than the folks using visual studio on MS. ...
    (alt.linux)
  • Re: object system...
    ... for that you need machine language. ... isn't even as fast as other systems programming languages. ... Stroustrup's stated design goal was to enable ... all manner of elegance or abstraction can be sacrificed for speed, ...
    (comp.object)