Xlib Programming Basics
Appearance
Xlib is an application programming interface (API) for X Window. A program which uses Xlib can be broken down into 4 parts:
- Opening a connection to a X Window server, using the default display or specifying a specific screen and display to use.
- Create windows for the user interface and map them so they are shown to the user
- Respond to events received from the X Window server, by drawing on windows or taking other actions. This includes the initial event to draw the content of each window for the first time.
- Close a connection to a X Window server in response to a user's action when the time is right. Like for example when clicking quit from a menu.