Xlib 还在使用吗?
xlib还在用吗?我能找到的有用文档是 http://tronche.com/,在我看来,它非常过时。谁使用 Xlib? GTK+和QT是建立在它之上的吗?提前致谢,嗯。
Is xlib still used? The helpful documentation I can find is http://tronche.com/ which looks, to me, very outdated. Who uses Xlib? Is GTK+ and QT built on it? thanks in advance, ell.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,像 GTK+ 和 Qt 这样的工具包仍然是基于 Xlib 构建的。迁移到 xcb 正在进行中,但远未完成或普及。但应用程序实际上应该写入工具包 API,而不是 Xlib。
顺便说一句,您还可以直接从 X.Org 的源代码中找到 Xlib 文档: http://www .x.org/releases/current/doc/
Yes, toolkits like GTK+ and Qt are still built on Xlib. Migration to xcb is in progress, but far from complete or universal. Applications though really should be writing to the toolkit API's, not Xlib.
BTW, you can also find Xlib docs directly from the source at X.Org: http://www.x.org/releases/current/doc/
如今,使用了libxcb。还有一个 xlib 兼容层仍然可用 (xlib-xcb)。
These days, libxcb is used. There is also an xlib compatibility layer still available (xlib-xcb).
如果你想要硬件加速,根据 freedesktop.org 的说法:
X Windows 上的 OpenGL 应用程序必须使用 Xlib 和因此不能只使用 XCB 来完成。
如果你想要 opengl,即使你只使用 xcb,你也必须有 xlib。
Well if you want hardware acceleration, according to freedesktop.org:
an OpenGL application on the X Windows must use Xlib and thus can’t be done using only XCB.
You have to have xlib even if you're only using xcb if you want opengl.