June 2018
Intermediate to advanced
348 pages
8h 45m
English
The X Windows programming model is a cross-platform API, is mostly supported on POSIX systems, and has even been ported to Microsoft Windows. In fact, X is a network windowing protocol, which required a Window manager to manage the Windows stack. The screen contents are managed by the X server and the client library will pull the contents and display them on the local machine. In desktop environments, the server runs locally on the same machine. The following program will help the reader understand the gist of the XLib programming model and how events are handled in the platform:
#include <X11/Xlib.h>#include <stdio.h>#include <stdlib.h>#include <string.h>int main(void){ Display *display; Window window; ...