QWaylandCompositorExtensionTemplate Class
template <typename T> class QWaylandCompositorExtensionTemplateQWaylandCompositorExtensionTemplate은 QWaylandCompositorExtension 을 상속할 때 편의를 위해 제공되는 클래스입니다. 더 보기...
| 헤더: | #include <QWaylandCompositorExtensionTemplate> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
| 상속: | QWaylandCompositorExtension |
| 상속받는 클래스: | QWaylandIdleInhibitManagerV1, QWaylandIviApplication, 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은 T 을 하위 클래스 자체로 매개변수화해야 합니다:
class MyExtension
: public QWaylandCompositorExtensionTemplate<MyExtension>
, QtWaylandServer::my_extension이 예제에서 MyExtension 는 생성된 인터페이스 my_extension 의 구현체입니다.
‘사용자 정의 셸’항목도 참조하십시오 .
멤버 함수 문서
[static] T *QWaylandCompositorExtensionTemplate::findIn(QWaylandObject *container)
해당 인터페이스의 인스턴스가 container 에 등록되어 있는 경우, 해당 인스턴스가 반환됩니다. 그렇지 않은 경우 null이 반환됩니다. 조회는 프로토콜 설명에 있는 인터페이스 이름과 일치하는, 생성된 interfaceName() 를 기반으로 수행됩니다.
© 2026 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.