QWaylandCompositorExtensionTemplate Class
template <typename T> class QWaylandCompositorExtensionTemplateQWaylandCompositorExtensionTemplate은 QWaylandCompositorExtension 을 서브클래싱하기 위한 편의 클래스입니다. 더 보기...
Header: | #include <QWaylandCompositorExtensionTemplate> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake: | QT += waylandcompositor |
상속합니다: | QWaylandCompositorExtension |
상속받는 사람: | QWaylandIdleInhibitManagerV1, QWaylandIviApplication, QWaylandPresentationTime, QWaylandQtTextInputMethodManager, QWaylandTextInputManager, QWaylandViewporter, QWaylandXdgDecorationManagerV1, 그리고 QWaylandXdgOutputManagerV1 |
정적 공개 멤버
T * | findIn(QWaylandObject *container) |
상세 설명
QWaylandCompositorExtensionTemplate은 QWaylandCompositorExtension 를 상속하는 템플릿 클래스로, Qt로 사용자 정의 Wayland 확장을 빌드하는 데 편리합니다.
이 클래스는 확장 프로토콜의 XML 설명을 기반으로 Qt Wayland Compositor 와 qtwaylandscanner
에서 생성된 클래스 사이의 연결을 제공합니다.
두 가지 구체적인 편의 기능을 제공합니다:
- QWaylandCompositorExtension::extensionInterface()의 재구현으로 qtwaylandscanner에서 생성된 베이스 클래스에 대한
wl_interface
포인터를 반환합니다. - 제공된 컨테이너에서 확장 인스턴스를 검색하고 발견되면 이를 반환하는 정적 findIn() 함수.
일반적으로 새 확장은 QWaylandCompositorExtensionTemplate와 qtwaylandscanner
에서 생성된 클래스를 이중 상속합니다.
QWaylandCompositorExtensionTemplate은 서브클래스 자체로 파라미터화해야 합니다:
class MyExtension : public QWaylandCompositorExtensionTemplate<MyExtension> , QtWaylandServer::my_extension
이 예제에서 MyExtension
는 생성된 인터페이스 my_extension
의 구현입니다.
커스텀 셸도참조하십시오 .
멤버 함수 문서
[static]
T *QWaylandCompositorExtensionTemplate::findIn(QWaylandObject *container)
인터페이스의 인스턴스가 container 에 등록되어 있으면 이 값이 반환됩니다. 그렇지 않으면 null이 반환됩니다. 조회는 프로토콜 설명의 인터페이스 이름과 일치하는 생성된 interfaceName()
을 기반으로 합니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.