Qt Wayland Compositor

Qt Wayland Compositor 是提供用于开发自定义显示服务器,方便且强大的 QML 和 C++ API 模块,基于 Wayland 协议。显示服务器 (通常称为 Compositor 合成器) 显示来自支持 Wayland 协议的客户端应用程序的内容。

Wayland's design philosophy is to keep the core protocol simple and minimal. Developers can then expand on this core protocol with use-case-specific extensions. Qt Wayland Compositor supports many common extensions by default, and also has APIs to enable the creation of new, custom extensions.

Typically, a compositor written with Qt Wayland Compositor becomes a subsystem inside a larger application manager process. Qt Wayland Compositor provides the APIs to communicate with clients and display their content on the screen. The QML APIs contain high-level APIs that easily integrate with the rest of Qt, enabling convenient animations, effects, and UI through Qt Quick. There are also C++ APIs available - if you need more low-level access.

An application manager would typically implement additional features such as application life cycle, virtual keyboard input, security, and Inter-Process Communication (IPC). Qt provides the APIs that can be used to develop the remaining parts of an application manager in other modules. The Qt Automotive Suite 提供 Qt Application Manager , which is a complete application manager that includes a compositor developed using Qt Wayland Compositor.

有关 Wayland 的更多信息,见 Wayland and Qt .

Qt Wayland Compositor 的特征

The Qt Wayland Compositor includes features necessary to create a compositor:

  • A QML API to display and manipulate client content, fully integrated with all the features in Qt Quick.
  • A C++ API for low-level access and control.
  • Support for common extensions, including XDG Shell and IVI Application.
  • APIs to easily expand the support for custom extensions.

环境变量和命令行自变量

The Qt Wayland Compositor recognizes the following environment variables and command-line arguments:

  • 环境变量:
    • QT_WAYLAND_HARDWARE_INTEGRATION Selects the hardware integration plugin to use.
    • QT_WAYLAND_CLIENT_BUFFER_INTEGRATION Selects the client buffer integration plugin to use.
    • QT_WAYLAND_SERVER_BUFFER_INTEGRATION Selects the server integration plugin to use.
  • 命令行自变量:
    • --wayland-socket-name Overrides the default socket name used for communicating with clients.

范例

查看 Qt Wayland Compositor 范例 to learn how these APIs can be used to write custom compositors.

API 参考

可以使用 Qt Wayland Compositor,从 C++ 或 QML:

许可和归属

Qt Wayland Compositor 和 Qt Wayland 集成插件在商业许可下是可用的来自 Qt 公司 .

此外,Qt Wayland Compositor 是可用的在 GNU GPL (一般公共许可) 第 3 版 ,而 Qt Wayland 集成插件可用于 GNU LGPL (次一般公共许可) 第 3 版 GNU GPL (一般公共许可) 第 2 版 .

Qt 许可 进一步了解细节。

Qt Wayland Compositor 和 Qt Wayland 集成插件所用协议定义遵循以下准许许可:

Wayland EGLStream Controller Protocol, version 1.1.1

MIT 许可

Wayland Fullscreen Shell Protocol, version unstable v1

MIT 许可

Wayland IVI Extension Protocol, version 1.9.1

MIT 许可

Wayland Linux Dmabuf Unstable V1 Protocol, version unstable v1, version 3

MIT 许可

Wayland Primary Selection Protocol, version 1

MIT 许可

Wayland 协议第 1.16.0 版

MIT 许可

Wayland Scaler 协议第 2 版

MIT 许可

Wayland Tablet Protocol, version unstable v2, version 1

MIT 许可

Wayland Text Input Protocol, version unstable v2

HPND 许可

Wayland Viewporter Protocol, version 1

MIT 许可

Wayland XDG Output Protocol, version unstable v1, version 3

MIT 许可

Wayland XDG Shell Protocol, version 1.18

MIT 许可

Wayland xdg-decoration Protocol, version unstable v1, version 1

MIT 许可