이 페이지에서

QWaylandView Class

QWaylandView 클래스는 출력 장치의 표면을 나타내는 뷰를 나타냅니다. 더 보기...

헤더: #include <QWaylandView>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
상속: QObject

속성

공개 함수

QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr)
virtual ~QWaylandView() override
virtual bool advance()
bool allowDiscardFrontBuffer() const
virtual void bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage)
virtual QWaylandBufferRef currentBuffer()
virtual QRegion currentDamage()
virtual void discardCurrentBuffer()
bool isBufferLocked() const
bool isPrimary() const
QWaylandOutput *output() const
void setAllowDiscardFrontBuffer(bool discard)
void setBufferLocked(bool locked)
void setOutput(QWaylandOutput *output)
void setPrimary()
void setSurface(QWaylandSurface *surface)
QWaylandSurface *surface() const
struct wl_resource *surfaceResource() const

신호

상세 설명

QWaylandView는 특정 출력 장치에 표면을 표시하는 역할을 하며, 렌더링될 내용을 포함하는 버퍼를 관리합니다. 동일한 표면에 대해 여러 개의 뷰를 가질 수 있습니다.

속성 설명

allowDiscardFrontBuffer : bool

기본적으로 뷰는 ` advance()`가 호출될 때까지 현재 버퍼를 잠급니다. 이 속성을 ` true `로 설정하면, 주 뷰가 더 이상 버퍼를 사용하지 않을 때 Qt가 버퍼를 해제할 수 있습니다.

이를 통해 업데이트 빈도가 낮은 보조 뷰로 인해 클라이언트 애플리케이션의 프레임 속도가 저하되는 상황을 방지할 수 있습니다.

액세스 함수:

bool allowDiscardFrontBuffer() const
void setAllowDiscardFrontBuffer(bool discard)

Notifier 신호:

void allowDiscardFrontBufferChanged()

bufferLocked : bool

이 속성은 뷰의 버퍼가 현재 잠겨 있는지 여부를 나타냅니다. 버퍼가 잠겨 있으면 ` advance()`는 다음 버퍼로 넘어가지 않고 ` false`를 반환합니다.

기본값은 ` false`입니다.

액세스 함수:

bool isBufferLocked() const
void setBufferLocked(bool locked)

알림 신호:

void bufferLockedChanged()

output : QWaylandOutput*

이 속성은 이 뷰가 표면을 표시하는 데 사용하는 출력을 나타냅니다.

액세스 함수:

QWaylandOutput *output() const
void setOutput(QWaylandOutput *output)

알림 신호:

void outputChanged()

surface : QWaylandSurface*

이 속성은 이 QWaylandView 에서 표시되는 표면을 담고 있습니다.

액세스 함수:

QWaylandSurface *surface() const
void setSurface(QWaylandSurface *surface)

알림 신호:

void surfaceChanged()

멤버 함수 설명서

QWaylandView::QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr)

지정된 ` renderObject ` 및 ` parent`을 사용하여 `QWaylandView`를 생성합니다.

[override virtual noexcept] QWaylandView::~QWaylandView()

QWaylandView 를 삭제합니다.

[virtual] bool QWaylandView::advance()

현재 버퍼와 데미지 영역을 클라이언트가 커밋한 최신 버전으로 업데이트합니다. 이전 advance() 호출 이후 새로운 콘텐츠가 커밋된 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

currentBuffer() 및 currentDamage()도 참조하십시오 .

[virtual] void QWaylandView::bufferCommitted(const QWaylandBufferRef &buffer, const QRegion &damage)

이 함수는 새로운 ‘ buffer ’가 이 뷰의 표면에 커밋될 때 호출됩니다. ‘ damage ’에는 현재 버퍼와 다른 영역, 즉 업데이트가 필요한 영역이 포함되어 있습니다. 새로운 ‘ buffer ’는 다음에 ‘ advance()’를 호출할 때 현재 버퍼로 설정됩니다.

이 함수를 재구현하는 하위 클래스는 기본 구현을 호출해야 합니다.

[virtual] QWaylandBufferRef QWaylandView::currentBuffer()

이 뷰의 현재 버퍼에 대한 참조를 반환합니다.

[virtual] QRegion QWaylandView::currentDamage()

이 뷰의 현재 데미지 영역을 반환합니다.

[virtual] void QWaylandView::discardCurrentBuffer()

뷰가 현재 버퍼를 강제로 버리도록 하여, 클라이언트 측에서 해당 버퍼를 재사용할 수 있게 합니다.

bool QWaylandView::isPrimary() const

이 QWaylandView 가 해당 QWaylandSurface

QWaylandSurface::primaryView도 참조하십시오 .

void QWaylandView::setPrimary()

이 QWaylandView 를 서피스의 기본 뷰로 설정합니다.

이 QWaylandView 에 데이터가 저장되어 있지 않은 경우 이 설정은 아무런 효과가 없습니다. QWaylandSurface

isPrimary() 및 QWaylandSurface::primaryView도 참조하십시오 .

struct wl_resource *QWaylandView::surfaceResource() const

이 QWaylandView 에 대한 Wayland 표면 리소스를 반환합니다.

© 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.