QWaylandSurface Class

The QWaylandSurface class represents a rectangular area on an output device. More...

Header: #include <QWaylandSurface>
qmake: QT += waylandcompositor
Since: Qt 5.8
Instantiated By: WaylandSurface
Inherits: QWaylandObject

This class was introduced in Qt 5.8.

Public Types

enum Origin { OriginTopLeft, OriginBottomLeft }

Properties

Public Functions

int bufferScale() const
QSize bufferSize() const
QWaylandClient *client() const
Qt::ScreenOrientation contentOrientation() const
QSize destinationSize() const
bool hasContent() const
bool inhibitsIdle() const
bool isCursorSurface() const
void markAsCursorSurface(bool cursorSurface)
QWaylandSurface::Origin origin() const
QRectF sourceGeometry() const

Signals

Detailed Description

This class encapsulates a rectangular area of pixels that is displayed on an output device. It corresponds to the interface wl_surface in the Wayland protocol.

Member Type Documentation

enum QWaylandSurface::Origin

This enum type is used to specify the origin of a QWaylandSurface's buffer.

ConstantValueDescription
QWaylandSurface::OriginTopLeft0The origin is the top left corner of the buffer.
QWaylandSurface::OriginBottomLeft1The origin is the bottom left corner of the buffer.

Property Documentation

bufferScale : const int

This property holds the QWaylandSurface's buffer scale. The buffer scale lets a client supply higher resolution buffer data for use on high resolution outputs.

Access functions:

int bufferScale() const

Notifier signal:

void bufferScaleChanged()

bufferSize : const QSize

This property holds the size of the current buffer of this QWaylandSurface in pixels, not in surface coordinates.

For the size in surface coordinates, use destinationSize instead.

Access functions:

QSize bufferSize() const

Notifier signal:

void bufferSizeChanged()

See also destinationSize and bufferScale.

client : QWaylandClient* const

This property holds the client using this QWaylandSurface.

Access functions:

QWaylandClient *client() const

contentOrientation : const Qt::ScreenOrientation

This property holds the orientation of the QWaylandSurface's contents.

Access functions:

Qt::ScreenOrientation contentOrientation() const

Notifier signal:

void contentOrientationChanged()

See also QWaylandOutput::transform.

cursorSurface : bool

This property holds whether the QWaylandSurface is a cursor surface.

Access functions:

bool isCursorSurface() const
void markAsCursorSurface(bool cursorSurface)

Notifier signal:

void cursorSurfaceChanged()

destinationSize : const QSize

This property holds the size of this WaylandSurface in surface coordinates.

This property was introduced in Qt 5.13.

Access functions:

QSize destinationSize() const

Notifier signal:

void destinationSizeChanged()

See also bufferScale and bufferSize.

hasContent : const bool

This property holds whether the QWaylandSurface has content.

Access functions:

bool hasContent() const

Notifier signal:

void hasContentChanged()

inhibitsIdle : const bool

This property holds whether this surface is intended to inhibit the idle behavior of the compositor such as screen blanking, locking and screen saving.

This property was introduced in Qt 5.14.

Access functions:

bool inhibitsIdle() const

Notifier signal:

void inhibitsIdleChanged()

See also QWaylandIdleInhibitManagerV1.

origin : const QWaylandSurface::Origin

This property holds the origin of the QWaylandSurface's buffer, or QWaylandSurface::OriginTopLeft if the surface has no buffer.

Access functions:

QWaylandSurface::Origin origin() const

Notifier signal:

void originChanged()

sourceGeometry : const QRectF

This property describes the portion of the attached QWaylandBuffer that should be drawn on the screen. The coordinates are from the corner of the buffer and are scaled by bufferScale.

This property was introduced in Qt 5.13.

Access functions:

QRectF sourceGeometry() const

Notifier signal:

void sourceGeometryChanged()

See also bufferScale, bufferSize, and destinationSize.