简体   繁体   中英

Is XCB ready for production use? Should I use Xlib instead?

If one needs low level access to X11 events, windowing and input without using GTK, QT et al., should one use Xlib or XCB ? What are the pros and cons of each?

You can use both of them. XCB is simpler to use, has a better response to a multithread environment but lacks documentation, while Xlib is a more dated/complex tool, better documented and fully implemented.

I'm currently studying the XCB API and the hardest thing to do is to find docs and good API references..

In the end: if you aim to faster development, you should use Xlib, otherwise XCB is meant to be the future (but it's still far from being such).

What helps when learning XCB is to look at X11 specification, for example here https://www.x.org/releases/X11R7.5/doc/x11proto/proto.pdf

Most XCB calls map directly to X11 requests. The same is true for extensions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM