Closer to the X Protocol
Up to this point in this book, all graphics handling has been done by calls to library functions provided in the X Window System. This is a practical approach when writing programs. But X Window is a client–server relationship. Those programs are client programs. The graphic behaviour which appears is a result of the server. In which, graphics are used to determine by the client program sending messages to the server. If input is received by the server from a keyboard or mouse, the server sends this data as messages to the client program for its interpretation and use. There is only a finite number of such messages which the client and server can understand. Data, which do change, are embedded in such messages. Such messages are the building blocks of X Window. Every graphical interaction, whether it be drawing a window in various configurations, taking characters from a keyboard and displaying them in a window, or whatever, must be expressed in such messages. As an analogue, such messages are the machine language of X Window.