The XCB library provides an interface to the X
Window System protocol, designed to replace the
Xlib interface. It has several advantages over
Xlib, including size (small library and lower
memory footprint), latency hiding (batch several
requests and wait for the replies later), direct
protocol access (one-to-one mapping between
interface and protocol), thread support (access
XCB from multiple threads, with no explicit
locking), and easy creation of new extensions
(automatically generates its interface from
machine-parsable XML protocol descriptions). Xlib
can also use XCB as a transport layer, allowing
software to make requests and receive responses
with both, which eases porting to XCB. However,
client programs, libraries, and toolkits will gain
the most benefit from a native XCB port.