QWaylandBufferRef Class
QWaylandBufferRef 클래스는 서피스 버퍼에 대한 참조를 보관합니다. 더 보기...
| 헤더: | #include <QWaylandBufferRef> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
| qmake: | QT += waylandcompositor |
공개 함수
| QWaylandBufferRef() | |
| QWaylandBufferRef(const QWaylandBufferRef &ref) | |
| ~QWaylandBufferRef() | |
| bool | hasBuffer() const |
| bool | hasContent() const |
(since 6.2) bool | hasProtectedContent() const |
| QImage | image() const |
| bool | isDestroyed() const |
| bool | isNull() const |
| bool | isSharedMemory() const |
| quintptr | lockNativeBuffer() |
| QWaylandSurface::Origin | origin() const |
| QSize | size() const |
| QOpenGLTexture * | toOpenGLTexture(int plane = 0) const |
| void | unlockNativeBuffer(quintptr handle) |
| struct wl_resource * | wl_buffer() const |
| QWaylandBufferRef & | operator=(const QWaylandBufferRef &ref) |
관련 비멤버
| bool | operator!=(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs) |
| bool | operator==(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs) |
멤버 함수 설명
QWaylandBufferRef::QWaylandBufferRef()
null 버퍼 참조를 생성합니다.
QWaylandBufferRef::QWaylandBufferRef(const QWaylandBufferRef &ref)
ref 가 가리키는 버퍼에 대한 새로운 참조를 생성합니다.
[noexcept] QWaylandBufferRef::~QWaylandBufferRef()
버퍼의 참조를 해제합니다.
bool QWaylandBufferRef::hasBuffer() const
이 ` QWaylandBufferRef `가 버퍼를 참조하는 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.
isNull() 및 hasContent()도 참조하십시오 .
bool QWaylandBufferRef::hasContent() const
이 QWaylandBufferRef 가 내용이 포함된 버퍼를 참조하는 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.
isNull() 및 hasBuffer()도 참조하십시오 .
[since 6.2] bool QWaylandBufferRef::hasProtectedContent() const
이 ` QWaylandBufferRef `가 보호된 콘텐츠가 포함된 버퍼를 참조하는 경우 `true`를 반환합니다. 그렇지 않은 경우 `false`를 반환합니다.
참고: 이 기능은 클라이언트 버퍼 통합에서 해당 기능을 지원한다고 가정하는 활성화 기능입니다. 현재 Qt에 포함된 클라이언트 버퍼 통합 중 보호된 콘텐츠 버퍼를 지원하는 것은 없습니다.
이 함수는 Qt 6.2에서 도입되었습니다.
hasContent()도 참조하십시오 .
QImage QWaylandBufferRef::image() const
버퍼의 내용을 담은 이미지를 반환합니다.
bool QWaylandBufferRef::isDestroyed() const
이 ` QWaylandBufferRef `가 이미 소멸된 버퍼를 참조하는 경우 `true`를 반환합니다. 그렇지 않은 경우 `false`를 반환합니다.
bool QWaylandBufferRef::isNull() const
이 QWaylandBufferRef 가 버퍼를 참조하지 않는 경우 true를 반환합니다. 그렇지 않은 경우 false를 반환합니다.
hasBuffer() 및 hasContent()도 참조하십시오 .
bool QWaylandBufferRef::isSharedMemory() const
버퍼가 공유 메모리 버퍼인 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.
quintptr QWaylandBufferRef::lockNativeBuffer()
이 버퍼에 대한 네이티브 핸들을 반환하고, unlockNativeBuffer()이 호출될 때까지 해제되지 않도록 잠금 상태로 표시합니다.
이 버퍼에 대한 네이티브 핸들이 없거나 잠금에 실패한 경우 0을 반환합니다.
QWaylandSurface::Origin QWaylandBufferRef::origin() const
버퍼의 원점을 반환합니다. 참조된 버퍼가 null인 경우, ` QWaylandSurface::OriginBottomLeft `가 반환됩니다.
QSize QWaylandBufferRef::size() const
버퍼의 크기를 반환합니다. 참조된 버퍼가 null인 경우, 유효하지 않은 QSize() 값이 반환됩니다.
QOpenGLTexture *QWaylandBufferRef::toOpenGLTexture(int plane = 0) const
버퍼에 대한 OpenGL 텍스처를 반환합니다. ` plane `는 YUV와 같은 다중 평면 형식의 인덱스입니다.
반환된 텍스처는 버퍼가 소유합니다. 이 텍스처는 버퍼 참조가 존재하는 동안에만 유효합니다. 이 함수를 호출한 쪽은 텍스처를 삭제해서는 안 되며, 텍스처가 사용되는 동안에는 버퍼에 대한 참조를 유지해야 합니다.
유효한 버퍼가 없거나 텍스처를 생성할 수 없는 경우 nullptr 를 반환합니다.
void QWaylandBufferRef::unlockNativeBuffer(quintptr handle)
네이티브 버퍼를 더 이상 사용되지 않는 것으로 표시합니다. ` handle `는 이전에 ` lockNativeBuffer()`를 호출했을 때 반환된 값과 일치해야 합니다.
struct wl_resource *QWaylandBufferRef::wl_buffer() const
해당 버퍼에 대한 Wayland 리소스를 반환합니다.
QWaylandBufferRef &QWaylandBufferRef::operator=(const QWaylandBufferRef &ref)
이 버퍼에 ` ref `을 할당하고, 해당 버퍼에 대한 참조를 추가합니다. 이전에 참조되었던 버퍼의 참조는 해제됩니다.
관련 비멤버 함수
[noexcept] bool operator!=(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)
lhs 가 rhs 과 동일한 버퍼를 참조하는 경우 false 를 반환합니다. 그렇지 않은 경우 true 를 반환합니다.
[noexcept] bool operator==(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)
lhs 가 rhs 와 동일한 버퍼를 참조하는 경우 true 를 반환합니다. 그렇지 않은 경우 false 를 반환합니다.
© 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.