QWaylandSurface Class

QWaylandSurface 클래스는 출력 장치의 직사각형 영역을 나타냅니다. 더 보기...

Header: #include <QWaylandSurface>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
QML에서: WaylandSurface
상속합니다: QWaylandObject

공용 유형

enum Origin { OriginTopLeft, OriginBottomLeft }

속성

공용 기능

QWaylandSurface()
QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
virtual ~QWaylandSurface() override
int bufferScale() const
QSize bufferSize() const
QWaylandClient *client() const
QWaylandCompositor *compositor() const
Qt::ScreenOrientation contentOrientation() const
QSize destinationSize() const
void destroy()
void frameStarted()
bool hasContent() const
bool inhibitsIdle() const
void initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
bool inputRegionContains(const QPoint &p) const
bool inputRegionContains(const QPointF &position) const
bool isCursorSurface() const
bool isDestroyed() const
bool isInitialized() const
bool isOpaque() const
void markAsCursorSurface(bool cursorSurface)
QWaylandSurface::Origin origin() const
QWaylandView *primaryView() const
struct wl_resource *resource() const
void sendFrameCallbacks()
void setPrimaryView(QWaylandView *view)
bool setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode)
QRectF sourceGeometry() const
QList<QWaylandView *> views() const
wl_client *waylandClient() const

공용 슬롯

신호

정적 공용 멤버

QWaylandSurface *fromResource(wl_resource *resource)

상세 설명

이 클래스는 출력 장치에 표시되는 직사각형 픽셀 영역을 캡슐화합니다. Wayland 프로토콜의 wl_surface 인터페이스에 해당합니다.

멤버 유형 문서

enum QWaylandSurface::Origin

이 열거형 유형은 QWaylandSurface 버퍼의 출처를 지정하는 데 사용됩니다.

Constant설명
QWaylandSurface::OriginTopLeft0원점은 버퍼의 왼쪽 상단 모서리입니다.
QWaylandSurface::OriginBottomLeft1원점은 버퍼의 왼쪽 하단 모서리입니다.

프로퍼티 문서

[read-only] bufferScale : const int

이 속성은 QWaylandSurface 의 버퍼 스케일을 보유합니다. 버퍼 스케일을 통해 클라이언트는 고해상도 출력에 사용할 고해상도 버퍼 데이터를 제공할 수 있습니다.

함수에 액세스합니다:

int bufferScale() const

알림 신호:

void bufferScaleChanged()

[read-only] bufferSize : const QSize

이 속성은 이 QWaylandSurface 의 현재 버퍼 크기를 표면 좌표가 아닌 픽셀 단위로 저장합니다.

표면 좌표로 크기를 표시하려면 destinationSize 대신 사용하세요.

함수에 액세스합니다:

QSize bufferSize() const

알림 신호:

void bufferSizeChanged()

destinationSizebufferScale참조하세요 .

[read-only] client : QWaylandClient* const

이 프로퍼티는 이 QWaylandSurface 를 사용하는 클라이언트를 보유합니다.

액세스 함수:

QWaylandClient *client() const

[read-only] contentOrientation : const Qt::ScreenOrientation

이 속성은 QWaylandSurface 콘텐츠의 방향을 보유합니다.

액세스 함수:

Qt::ScreenOrientation contentOrientation() const

알림 신호:

void contentOrientationChanged()

QWaylandOutput::transform참조하세요 .

cursorSurface : bool

이 속성은 QWaylandSurface 이 커서 표면인지 여부를 보유합니다.

액세스 함수:

bool isCursorSurface() const
void markAsCursorSurface(bool cursorSurface)

알림 신호:

void cursorSurfaceChanged()

[read-only] destinationSize : const QSize

이 프로퍼티는 표면 좌표로 WaylandSurface 의 크기를 보유합니다.

함수에 액세스합니다:

QSize destinationSize() const

알림 신호:

void destinationSizeChanged()

bufferScalebufferSize참조하세요 .

[read-only] hasContent : const bool

이 속성은 QWaylandSurface 에 콘텐츠가 있는지 여부를 보유합니다.

액세스 기능:

bool hasContent() const

알림 신호:

void hasContentChanged()

[read-only] inhibitsIdle : const bool

이 속성은 화면 블랭킹, 잠금 및 화면 저장과 같은 컴포저의 유휴 동작을 억제하기 위한 표면인지 여부를 보유합니다.

액세스 기능:

bool inhibitsIdle() const

알림 신호:

void inhibitsIdleChanged()

QWaylandIdleInhibitManagerV1참조하세요 .

[read-only, since 6.4] isOpaque : const bool

이 프로퍼티는 클라이언트가 set_opaque_region 요청을 통해 보고한 대로 표면이 완전히 불투명한지 여부를 저장합니다.

이 프로퍼티는 Qt 6.4에 도입되었습니다.

액세스 함수:

bool isOpaque() const

알림 신호:

void isOpaqueChanged()

[read-only] origin : const QWaylandSurface::Origin

이 속성은 QWaylandSurface 의 버퍼의 원점을 보유하며, 서페이스에 버퍼가 없는 경우 QWaylandSurface::OriginTopLeft 을 보유합니다.

함수에 액세스합니다:

QWaylandSurface::Origin origin() const

알림 신호:

void originChanged()

[read-only] sourceGeometry : const QRectF

이 프로퍼티는 화면에 그려야 하는 첨부된 QWaylandBuffer의 부분을 설명합니다. 좌표는 버퍼의 모서리에서 시작하며 bufferScale 에 의해 스케일링됩니다.

액세스 함수:

QRectF sourceGeometry() const

알림 신호:

void sourceGeometryChanged()

bufferScale, bufferSize, destinationSize참조하십시오 .

멤버 함수 문서

QWaylandSurface::QWaylandSurface()

초기화되지 않은 QWaylandSurface를 생성합니다.

QWaylandSurface::QWaylandSurface(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)

주어진 compositorclient, 그리고 주어진 idversion 에 대한 QWaylandSurface 를 구성하고 초기화합니다.

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

QWaylandSurface 를 파괴합니다.

[signal] void QWaylandSurface::childAdded(QWaylandSurface *child)

이 신호는 서페이스에 wl_subsurface( child)가 추가되었을 때 방출됩니다.

QWaylandCompositor *QWaylandSurface::compositor() const

QWaylandSurface 에 대한 컴포지터를 반환합니다.

[invokable] void QWaylandSurface::destroy()

QWaylandSurface 을 파괴합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

[signal] void QWaylandSurface::dragStarted(QWaylandDrag *drag)

이 신호는 drag 이 표면에서 시작되었을 때 방출됩니다.

[invokable] void QWaylandSurface::frameStarted()

전송할 모든 프레임 콜백을 준비합니다.

참고: 이 함수는 메타객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

[static] QWaylandSurface *QWaylandSurface::fromResource(wl_resource *resource)

Wayland 리소스 resource 에 해당하는 QWaylandSurface 를 반환합니다.

[invokable] void QWaylandSurface::initialize(QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)

지정된 compositorclient, 지정된 idversion 를 사용하여 QWaylandSurface 를 초기화합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

bool QWaylandSurface::inputRegionContains(const QPoint &p) const

QWaylandSurface 의 입력 영역에 p 점이 포함되어 있으면 true 을 반환합니다. 그렇지 않으면 false 을 반환합니다.

bool QWaylandSurface::inputRegionContains(const QPointF &position) const

QWaylandSurface 의 입력 영역에 position 점이 포함되어 있으면 true 을 반환합니다. 그렇지 않으면 false 을 반환합니다.

[invokable] bool QWaylandSurface::isDestroyed() const

QWaylandSurface 이 삭제된 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

bool QWaylandSurface::isInitialized() const

QWaylandSurface 이 초기화되면 true를 반환합니다.

QWaylandView *QWaylandSurface::primaryView() const

QWaylandSurface 의 기본 보기를 반환합니다.

QWaylandView::advance() 및 QWaylandSurface::setPrimaryView()도 참조하세요 .

struct wl_resource *QWaylandSurface::resource() const

이에 해당하는 웨이랜드 리소스 QWaylandSurface 를 반환합니다.

[invokable] void QWaylandSurface::sendFrameCallbacks()

보류 중인 프레임 콜백을 보냅니다.

참고: 이 함수는 메타객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.

void QWaylandSurface::setPrimaryView(QWaylandView *view)

이 서페이스의 보기가 여러 개 있는 경우 QWaylandSurface 의 기본 보기를 view 로 설정합니다. 기본 보기는 클라이언트의 새로 고침 빈도를 관리하는 보기입니다. QWaylandView::advance ()가 호출될 때 버퍼 참조를 삭제하는 작업을 처리합니다. 자세한 내용은 QWaylandView::advance() 문서를 참조하세요.

QWaylandWlShellIntegration 및 QWaylandXdgShellV5Integration과 같은 셸 표면 통합에서 클라이언트의 최대화 및 전체 화면 요청은 통합에 표면의 기본 보기가 있는 경우에만 영향을 미칩니다.

primaryView() 및 QWaylandView::advance()도 참조하십시오 .

bool QWaylandSurface::setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode)

서페이스에 role 을 설정합니다. 역할은 서페이스가 화면에 매핑되는 방식을 정의하며, 역할이 없으면 서페이스는 숨겨져 있어야 합니다. 역할이 서페이스에 할당되면 이것이 영구적인 역할이 됩니다. 이후 다른 역할로 setRole() 을 호출하면 errorResource 으로 프로토콜 오류가 트리거되고 클라이언트에 errorCode 이 전송됩니다. 이 요구 사항을 적용하는 것이 서피스 역할의 주요 목적입니다.

role 은 포인터 값으로 비교됩니다. QWaylandSurfaceRole 의 두 개체는 이름에 관계없이 서로 다른 역할로 간주됩니다.

서피스 역할은 셸 확장 등 특정 목적을 위해 서피스를 채택할 때 프로토콜 구현에 의해 내부적으로 설정됩니다. 이러한 방식으로 서페이스를 사용하는 확장을 개발하는 경우가 아니라면 이 함수를 호출해서는 안 됩니다.

역할을 할당할 수 있으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.

[signal] void QWaylandSurface::surfaceDestroyed()

이 신호는 해당 wl_surface가 파괴될 때 방출됩니다.

[slot] void QWaylandSurface::updateSelection()

컴포저의 유지된 클립보드 선택으로 서페이스를 업데이트합니다. 이 기능은 서페이스가 키보드 포커스를 받으면 자동으로 수행되지만, 키보드 포커스가 없는 클라이언트를 업데이트할 때 유용합니다.

QList<QWaylandView *> QWaylandSurface::views() const

QWaylandSurface 에 대한 조회수를 반환합니다.

wl_client *QWaylandSurface::waylandClient() const

QWaylandSurface 을 사용하여 wl_client 을 보유합니다.

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