Is XCB ready for production use? Should I use Xlib instead?
Asked Answered
V

2

19

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?

Vertigo answered 26/1, 2012 at 22:0 Comment(2)
qt5.5.0 use XCB rather than xlib. So I assume xcb is ready for production use.Livvy
Use XCB if you want high performance... and a reasonable dose of pain due to lack of documentation (I love XCB, btw!). Also, a good source for information on XCB seems to be the X protocol itself, since XCB is a fairly thin layer, as far as I can tellFleabite
O
21

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).

Omeara answered 27/1, 2012 at 20:27 Comment(2)
...the hardest thing to do is to find docs and good API references... Very true. Some of the official tutorials are riddled with errors and won't even compile. ExampleVertigo
2 years later and I still have a hard time with xcb...Rigobertorigor
L
7

What helps when learning XCB is to look at X11 specification, for example here https://www.x.org/releases/current/doc/xproto/x11protocol.pdf

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

Lytta answered 28/4, 2018 at 19:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.