Support de cours Overview of the X WindowSystem

Extrait du support de cours Overview of the X WindowSystem

Chapter 1 Introduction to Xlib
The X Window System is a network-transparent windowsystem that was designed at MIT .X display servers run on computers with either monochrome or color bitmap display hardware. The server distributes user input to and accepts output requests from various client programs located either on the same machine or elsewhere in the network. Xlib is a C subroutine library that appli-cation programs (clients) use to interface with the windowsystem by means of a stream connec-tion. Although aclient usually runs on the same machine as the X server it is talking to, this need not be the case.
1.1. Overview of the X WindowSystem
Some of the terms used in this book are unique to X, and other terms that are common to other windowsystems have different meanings in X. Youmay find it helpful to refer to the glossary ,which is located at the end of the book.
The X WindowSystem supports one or more screens containing overlapping windows or subwin-dows. A screen is a physical monitor and hardware that can be color,grayscale, or monochrome.
There can be multiple screens for each display or workstation. A single X server can provide dis-play services for anynumber of screens. Aset of screens for a single user with one keyboard and one pointer (usually a mouse) is called a display .
All the windows in an X server are arranged in strict hierarchies. At the top of each hierarchyisa root window, which covers each of the display screens. Each root windowispartially or com-pletely covered by child windows. All windows, except for root windows, have parents. There is usually at least one windowfor each application program. Child windows may in turn have their ownchildren. In this way ,anapplication program can create an arbitrarily deep tree on each screen. X provides graphics, text, and raster operations for windows.
1.2. Errors
Some functions return Status ,aninteger error indication. If the function fails, it returns a zero.
If the function returns a status of zero, it has not updated the return arguments. Because Cdoes not provide multiple return values, manyfunctions must return their results by writing into client-passed storage. By default, errors are handled either by a standard library function or by one thatyou provide. Functions that return pointers to strings return NULL pointers if the string does not exist.
The X server reports protocol errors at the time that it detects them. If more than one error could be generated for a givenrequest, the server can report anyofthem.
Because Xlib usually does not transmit requests to the server immediately (that is, it buffers them), errors can be reported much later than theyactually occur .For debugging purposes, how-ev er, Xlib provides a mechanism for forcing synchronous behavior (see section 11.8.1). Whensynchronization is enabled, errors are reported as theyare generated.When Xlib detects an error,itcalls an error handler,which your program can provide. If you do not provide an error handler,the error is printed, and your program terminates.
1.3. Standard Header Files
The following include files are part of the Xlib standard:
•<X11/Xlib.h>
This is the main header file for Xlib.The majority of all Xlib symbols are declared by including this file. This file also contains the preprocessor symbol XlibSpecificationRe-lease .This symbol is defined to have the 6 in this release of the standard. (Release 5 of Xlib was the first release to have this symbol.)
•<X11/X.h>
This file declares types and constants for the X protocol that are to be used by applications.
It is included automatically from <X11/Xlib.h>, so application code should neverneed to reference this file directly .
•<X11/Xcms.h>
This file contains symbols for much of the color management facilities described in chapter 6. All functions, types, and symbols with the prefix ‘ ‘Xcms’ ’, plus the Color Con version Contexts macros, are declared in this file. <X11/Xlib.h>must be included before including this file.
•<X11/Xutil.h>
This file declares various functions, types, and symbols used for inter-client communication and application utility functions, which are described in chapters 14 and 16. <X11/Xlib.h> must be included before including this file.

……..

Si le lien ne fonctionne pas correctement, veuillez nous contacter (mentionner le lien dans votre message)
Support de cours Overview of the X WindowSystem (2931 KO) (Cours PDF)
Overview of the X WindowSystem

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *