Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QWaylandSurface Class Reference

\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor More...

#include <qwaylandsurface.h>

+ Inheritance diagram for QWaylandSurface:
+ Collaboration diagram for QWaylandSurface:

Public Types

enum  Origin { OriginTopLeft , OriginBottomLeft }
 This enum type is used to specify the origin of a QWaylandSurface's buffer. More...
 

Signals

void hasContentChanged ()
 
void damaged (const QRegion &rect)
 
void parentChanged (QWaylandSurface *newParent, QWaylandSurface *oldParent)
 
void childAdded (QWaylandSurface *child)
 \qmlsignal QtWayland.Compositor::WaylandSurface::childAdded(WaylandSurface child)
 
 Q_REVISION (1, 13) void sourceGeometryChanged()
 
 Q_REVISION (1, 13) void destinationSizeChanged()
 
 Q_REVISION (1, 13) void bufferSizeChanged()
 
void bufferScaleChanged ()
 
void offsetForNextFrame (const QPoint &offset)
 
void contentOrientationChanged ()
 
void surfaceDestroyed ()
 \qmlsignal QtWayland.Compositor::WaylandSurface::surfaceDestroyed()
 
void originChanged ()
 
void subsurfacePositionChanged (const QPoint &position)
 
void subsurfacePlaceAbove (QWaylandSurface *sibling)
 
void subsurfacePlaceBelow (QWaylandSurface *sibling)
 
void dragStarted (QWaylandDrag *drag)
 \qmlsignal void QtWayland.Compositor::WaylandSurface::dragStarted(WaylandDrag drag)
 
void cursorSurfaceChanged ()
 
 Q_REVISION (14) void inhibitsIdleChanged()
 
 Q_REVISION (6, 4) void isOpaqueChanged()
 
void configure (bool hasBuffer)
 
void redraw ()
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QWaylandSurface ()
 Constructs a an uninitialized QWaylandSurface.
 
 QWaylandSurface (QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
 Constructs and initializes a QWaylandSurface for the given compositor and client, and with the given id and version.
 
 ~QWaylandSurface () override
 Destroys the QWaylandSurface.
 
Q_INVOKABLE void initialize (QWaylandCompositor *compositor, QWaylandClient *client, uint id, int version)
 \qmlmethod void QtWayland.Compositor::WaylandSurface::initialize(WaylandCompositor compositor, WaylandClient client, int id, int version)
 
bool isInitialized () const
 Returns true if the QWaylandSurface has been initialized.
 
QWaylandClientclient () const
 
::wl_client * waylandClient () const
 Holds the wl_client using this QWaylandSurface.
 
bool setRole (QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode)
 Sets a role on the surface.
 
QWaylandSurfaceRolerole () const
 
bool hasContent () const
 
QRectF sourceGeometry () const
 
QSize destinationSize () const
 
QSize bufferSize () const
 
int bufferScale () const
 
Qt::ScreenOrientation contentOrientation () const
 
Origin origin () const
 
QWaylandCompositorcompositor () const
 Returns the compositor for this QWaylandSurface.
 
bool inputRegionContains (const QPoint &p) const
 Returns true if the QWaylandSurface's input region contains the point p.
 
bool inputRegionContains (const QPointF &position) const
 Returns true if the QWaylandSurface's input region contains the point position.
 
Q_INVOKABLE void destroy ()
 \qmlmethod void QtWayland.Compositor::WaylandSurface::destroy()
 
Q_INVOKABLE bool isDestroyed () const
 \qmlmethod bool QtWayland.Compositor::WaylandSurface::isDestroyed()
 
Q_INVOKABLE void frameStarted ()
 Prepares all frame callbacks for sending.
 
Q_INVOKABLE void sendFrameCallbacks ()
 Sends pending frame callbacks.
 
QWaylandViewprimaryView () const
 Updates the surface with the compositor's retained clipboard selection.
 
void setPrimaryView (QWaylandView *view)
 Sets this QWaylandSurface's primary view to view, in case there are multiple views of this surface.
 
QList< QWaylandView * > views () const
 Returns the views for this QWaylandSurface.
 
struct wl_resource * resource () const
 Returns the Wayland resource corresponding to this QWaylandSurface.
 
void markAsCursorSurface (bool cursorSurface)
 
bool isCursorSurface () const
 
bool inhibitsIdle () const
 
bool isOpaque () const
 
- Public Member Functions inherited from QWaylandObject
 ~QWaylandObject () override
 
QWaylandCompositorExtensionextension (const QByteArray &name)
 Returns the compositor extension which matches name if one has been registered with the QWaylandObject.
 
QWaylandCompositorExtensionextension (const wl_interface *interface)
 Returns the compositor extension which matches interface if one has been registered with the QWaylandObject.
 
QList< QWaylandCompositorExtension * > extensions () const
 Returns the list of compositor extensions that have been registered with this QWaylandObject.
 
void addExtension (QWaylandCompositorExtension *extension)
 Registers extension with this QWaylandObject.
 
void removeExtension (QWaylandCompositorExtension *extension)
 Removes extension from the list of registered extensions in this QWaylandObject, if it has previously been registered using \l{addExtension()}.
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Static Public Member Functions

static QWaylandSurfacefromResource (::wl_resource *resource)
 Returns the QWaylandSurface corresponding to the Wayland resource resource.
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Protected Member Functions

 QWaylandSurface (QWaylandSurfacePrivate &dptr)
 
- Protected Member Functions inherited from QWaylandObject
 QWaylandObject (QObject *parent=nullptr)
 Creates a QWaylandObject as a child of parent.
 
 QWaylandObject (QObjectPrivate &d, QObject *parent=nullptr)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Properties

QWaylandClientclient
 \qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client
 
QRectF sourceGeometry
 \qmlproperty rect QtWayland.Compositor::WaylandSurface::sourceGeometry
 
QSize destinationSize
 \qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize
 
QSize bufferSize
 \qmlproperty size QtWayland.Compositor::WaylandSurface::bufferSize
 
int bufferScale
 \qmlproperty size QtWayland.Compositor::WaylandSurface::bufferScale
 
Qt::ScreenOrientation contentOrientation
 \qmlproperty enum QtWayland.Compositor::WaylandSurface::contentOrientation
 
QWaylandSurface::Origin origin
 \qmlproperty enum QtWayland.Compositor::WaylandSurface::origin
 
bool hasContent
 \qmlproperty bool QtWayland.Compositor::WaylandSurface::hasContent
 
bool cursorSurface
 \qmlproperty bool QtWayland.Compositor::WaylandSurface::cursorSurface
 
bool inhibitsIdle
 \qmlproperty bool QtWayland.Compositor::WaylandSurface::inhibitsIdle
 
bool isOpaque
 \qmlproperty bool QtWayland.Compositor::WaylandSurface::isOpaque
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Protected Attributes inherited from QWaylandObject
QList< QWaylandCompositorExtension * > extension_vector
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor

Since
5.8

Represents a rectangular area on an output device.

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

\inmodule QtWaylandCompositor

Since
5.8

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

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.

Definition at line 41 of file qwaylandsurface.h.

Member Enumeration Documentation

◆ Origin

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

\value OriginTopLeft The origin is the top left corner of the buffer. \value OriginBottomLeft The origin is the bottom left corner of the buffer.

Enumerator
OriginTopLeft 
OriginBottomLeft 

Definition at line 63 of file qwaylandsurface.h.

Constructor & Destructor Documentation

◆ QWaylandSurface() [1/3]

QWaylandSurface::QWaylandSurface ( )

Constructs a an uninitialized QWaylandSurface.

Definition at line 410 of file qwaylandsurface.cpp.

◆ QWaylandSurface() [2/3]

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

Constructs and initializes a QWaylandSurface for the given compositor and client, and with the given id and version.

Definition at line 419 of file qwaylandsurface.cpp.

References client, compositor(), and initialize().

+ Here is the call graph for this function:

◆ ~QWaylandSurface()

QWaylandSurface::~QWaylandSurface ( )
override

Destroys the QWaylandSurface.

Definition at line 436 of file qwaylandsurface.cpp.

References d, and QWaylandCompositorPrivate::get().

+ Here is the call graph for this function:

◆ QWaylandSurface() [3/3]

QWaylandSurface::QWaylandSurface ( QWaylandSurfacePrivate & dptr)
protected

Definition at line 428 of file qwaylandsurface.cpp.

Member Function Documentation

◆ bufferScale()

int QWaylandSurface::bufferScale ( ) const

Definition at line 627 of file qwaylandsurface.cpp.

References d.

◆ bufferScaleChanged

void QWaylandSurface::bufferScaleChanged ( )
signal

Referenced by QWaylandXdgSurface::initialize().

+ Here is the caller graph for this function:

◆ bufferSize()

QSize QWaylandSurface::bufferSize ( ) const

Definition at line 606 of file qwaylandsurface.cpp.

References d.

◆ childAdded

void QWaylandSurface::childAdded ( QWaylandSurface * child)
signal

\qmlsignal QtWayland.Compositor::WaylandSurface::childAdded(WaylandSurface child)

This signal is emitted when a wl_subsurface, child, has been added to the surface.

This signal is emitted when a wl_subsurface, child, has been added to the surface.

◆ client()

QWaylandClient * QWaylandSurface::client ( ) const

Definition at line 490 of file qwaylandsurface.cpp.

References compositor(), contains(), d, and isDestroyed().

+ Here is the call graph for this function:

◆ compositor()

QWaylandCompositor * QWaylandSurface::compositor ( ) const

Returns the compositor for this QWaylandSurface.

Definition at line 691 of file qwaylandsurface.cpp.

References d.

Referenced by QWaylandQuickSurface::QWaylandQuickSurface(), QWaylandSurface(), client(), QWaylandQtShellSurfacePrivate::configure(), and initialize().

+ Here is the caller graph for this function:

◆ configure

void QWaylandSurface::configure ( bool hasBuffer)
signal

Referenced by QWaylandQuickSurface::setUseTextureAlpha().

+ Here is the caller graph for this function:

◆ contentOrientation()

Qt::ScreenOrientation QWaylandSurface::contentOrientation ( ) const

Definition at line 648 of file qwaylandsurface.cpp.

References d.

◆ contentOrientationChanged

void QWaylandSurface::contentOrientationChanged ( )
signal

◆ cursorSurfaceChanged

void QWaylandSurface::cursorSurfaceChanged ( )
signal

Referenced by markAsCursorSurface().

+ Here is the caller graph for this function:

◆ damaged

void QWaylandSurface::damaged ( const QRegion & rect)
signal

Referenced by QWaylandQtShellSurface::initialize(), and PresentationFeedback::setSurface().

+ Here is the caller graph for this function:

◆ destinationSize()

QSize QWaylandSurface::destinationSize ( ) const

Definition at line 577 of file qwaylandsurface.cpp.

References d.

◆ destroy()

void QWaylandSurface::destroy ( )

\qmlmethod void QtWayland.Compositor::WaylandSurface::destroy()

Destroys the WaylandSurface.

Destroys the QWaylandSurface.

Definition at line 763 of file qwaylandsurface.cpp.

References d.

◆ dragStarted

void QWaylandSurface::dragStarted ( QWaylandDrag * drag)
signal

\qmlsignal void QtWayland.Compositor::WaylandSurface::dragStarted(WaylandDrag drag)

This signal is emitted when a drag has started from this surface.

This signal is emitted when a drag has started from this surface.

◆ frameStarted()

void QWaylandSurface::frameStarted ( )

Prepares all frame callbacks for sending.

Definition at line 700 of file qwaylandsurface.cpp.

References d.

Referenced by Vsp2Layer::enableVspLayer(), QWaylandOutput::frameStarted(), and Vsp2Layer::handleBufferCommitted().

+ Here is the caller graph for this function:

◆ fromResource()

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

◆ hasContent()

bool QWaylandSurface::hasContent ( ) const

Definition at line 521 of file qwaylandsurface.cpp.

References d.

◆ hasContentChanged

void QWaylandSurface::hasContentChanged ( )
signal

Referenced by QtWayland::WlShellIntegration::WlShellIntegration(), and PresentationFeedback::setSurface().

+ Here is the caller graph for this function:

◆ inhibitsIdle()

bool QWaylandSurface::inhibitsIdle ( ) const

Definition at line 830 of file qwaylandsurface.cpp.

References d.

◆ initialize()

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

\qmlmethod void QtWayland.Compositor::WaylandSurface::initialize(WaylandCompositor compositor, WaylandClient client, int id, int version)

Initializes the WaylandSurface with the given compositor and client, and with the given id and version.

Initializes the QWaylandSurface with the given compositor and client, and with the given id and version.

Definition at line 455 of file qwaylandsurface.cpp.

References QWaylandClient::client(), client, compositor(), d, and QWaylandSurfacePrivate::removeUninitializedSurface().

Referenced by QWaylandCompositorPrivate::compositor_create_surface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inputRegionContains() [1/2]

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

Returns true if the QWaylandSurface's input region contains the point p.

Otherwise returns false.

Definition at line 730 of file qwaylandsurface.cpp.

References d.

◆ inputRegionContains() [2/2]

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

Returns true if the QWaylandSurface's input region contains the point position.

Otherwise returns false.

Since
5.14

Definition at line 742 of file qwaylandsurface.cpp.

References d, position(), and qFloor().

+ Here is the call graph for this function:

◆ isCursorSurface()

bool QWaylandSurface::isCursorSurface ( ) const

Definition at line 805 of file qwaylandsurface.cpp.

References d.

Referenced by QWaylandKeyboardPrivate::focused().

+ Here is the caller graph for this function:

◆ isDestroyed()

bool QWaylandSurface::isDestroyed ( ) const

\qmlmethod bool QtWayland.Compositor::WaylandSurface::isDestroyed()

Returns true if the WaylandSurface has been destroyed. Otherwise returns false.

Returns true if the QWaylandSurface has been destroyed. Otherwise returns false.

Definition at line 778 of file qwaylandsurface.cpp.

References d.

Referenced by client(), and QWaylandSeat::setKeyboardFocus().

+ Here is the caller graph for this function:

◆ isInitialized()

bool QWaylandSurface::isInitialized ( ) const

Returns true if the QWaylandSurface has been initialized.

Definition at line 473 of file qwaylandsurface.cpp.

References d.

◆ isOpaque()

bool QWaylandSurface::isOpaque ( ) const

Definition at line 851 of file qwaylandsurface.cpp.

References d.

◆ markAsCursorSurface()

void QWaylandSurface::markAsCursorSurface ( bool cursorSurface)

Definition at line 795 of file qwaylandsurface.cpp.

References cursorSurface, cursorSurfaceChanged(), d, and emit.

+ Here is the call graph for this function:

◆ offsetForNextFrame

void QWaylandSurface::offsetForNextFrame ( const QPoint & offset)
signal

Referenced by QtWayland::WlShellIntegration::WlShellIntegration().

+ Here is the caller graph for this function:

◆ origin()

QWaylandSurface::Origin QWaylandSurface::origin ( ) const

Definition at line 682 of file qwaylandsurface.cpp.

References d.

◆ originChanged

void QWaylandSurface::originChanged ( )
signal

◆ parentChanged

void QWaylandSurface::parentChanged ( QWaylandSurface * newParent,
QWaylandSurface * oldParent )
signal

◆ primaryView()

QWaylandView * QWaylandSurface::primaryView ( ) const

Updates the surface with the compositor's retained clipboard selection.

Although this is done automatically when the surface receives keyboard focus, this function is useful for updating clients which do not have keyboard focus.

Returns this QWaylandSurface's primary view.

See also
QWaylandView::advance(), QWaylandSurface::setPrimaryView()

Definition at line 890 of file qwaylandsurface.cpp.

References d.

Referenced by QWaylandSurfaceViewMapper::maybePrimaryView(), and PresentationFeedback::sendSyncOutput().

+ Here is the caller graph for this function:

◆ Q_REVISION [1/5]

QWaylandSurface::Q_REVISION ( 1 ,
13  )
signal

◆ Q_REVISION [2/5]

QWaylandSurface::Q_REVISION ( 1 ,
13  )
signal

◆ Q_REVISION [3/5]

QWaylandSurface::Q_REVISION ( 1 ,
13  )
signal

◆ Q_REVISION [4/5]

QWaylandSurface::Q_REVISION ( 14 )
signal

◆ Q_REVISION [5/5]

QWaylandSurface::Q_REVISION ( 6 ,
4  )
signal

◆ redraw

void QWaylandSurface::redraw ( )
signal

Referenced by QtWayland::WlShellIntegration::WlShellIntegration(), and Vsp2Layer::handleSurfaceChanged().

+ Here is the caller graph for this function:

◆ resource()

struct wl_resource * QWaylandSurface::resource ( ) const

◆ role()

QWaylandSurfaceRole * QWaylandSurface::role ( ) const

Definition at line 990 of file qwaylandsurface.cpp.

References d.

Referenced by setRole(), and QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().

+ Here is the caller graph for this function:

◆ sendFrameCallbacks()

void QWaylandSurface::sendFrameCallbacks ( )

Sends pending frame callbacks.

Definition at line 710 of file qwaylandsurface.cpp.

References d, i, and time.

◆ setPrimaryView()

void QWaylandSurface::setPrimaryView ( QWaylandView * view)

Sets this QWaylandSurface's primary view to view, in case there are multiple views of this surface.

The primary view is the view that governs the client's refresh rate. It takes care of discarding buffer references when QWaylandView::advance() is called. See the documentation for QWaylandView::advance() for more details.

In shell surface integrations, such as QWaylandWlShellIntegration and QWaylandXdgShellV5Integration, maximize and fullscreen requests from the client will only have an effect if the integration has the primary view of the surface.

See also
QWaylandView::advance()

Definition at line 912 of file qwaylandsurface.cpp.

References d, and view.

◆ setRole()

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

Sets a role on the surface.

A role defines how a surface will be mapped on screen; without a role a surface is supposed to be hidden. Once a role is assigned to a surface, this becomes its permanent role. Any subsequent call to setRole() with a different role will trigger a protocol error to the errorResource and send an errorCode to the client. Enforcing this requirement is the main purpose of the surface role.

The role is compared by pointer value. Any two objects of QWaylandSurfaceRole will be considered different roles, regardless of their names.

The surface role is set internally by protocol implementations when a surface is adopted for a specific purpose, for example in a \l{Shell Extensions - Qt Wayland Compositor}{shell extension}. Unless you are developing extensions which use surfaces in this way, you should not call this function.

Returns true if a role can be assigned; false otherwise.

Definition at line 974 of file qwaylandsurface.cpp.

References QByteArray::constData(), d, QWaylandSurfaceRole::name(), resource(), and role().

Referenced by QWaylandIviApplicationPrivate::ivi_application_surface_create(), QWaylandWlShellPrivate::shell_get_shell_surface(), QWaylandXdgSurfacePrivate::xdg_surface_get_popup(), QWaylandXdgSurfacePrivate::xdg_surface_get_toplevel(), and QWaylandQtShellPrivate::zqt_shell_v1_surface_create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sourceGeometry()

QRectF QWaylandSurface::sourceGeometry ( ) const

Definition at line 552 of file qwaylandsurface.cpp.

References d.

◆ subsurfacePlaceAbove

void QWaylandSurface::subsurfacePlaceAbove ( QWaylandSurface * sibling)
signal

◆ subsurfacePlaceBelow

void QWaylandSurface::subsurfacePlaceBelow ( QWaylandSurface * sibling)
signal

◆ subsurfacePositionChanged

void QWaylandSurface::subsurfacePositionChanged ( const QPoint & position)
signal

◆ surfaceDestroyed

void QWaylandSurface::surfaceDestroyed ( )
signal

\qmlsignal QtWayland.Compositor::WaylandSurface::surfaceDestroyed()

This signal is emitted when the corresponding wl_surface is destroyed.

This signal is emitted when the corresponing wl_surface is destroyed.

◆ views()

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

Returns the views for this QWaylandSurface.

Definition at line 932 of file qwaylandsurface.cpp.

References d.

◆ waylandClient()

wl_client * QWaylandSurface::waylandClient ( ) const

Holds the wl_client using this QWaylandSurface.

Definition at line 502 of file qwaylandsurface.cpp.

References client.

Referenced by QWaylandKeyboardPrivate::focused(), QtWayland::QtKeyExtensionGlobal::postQtKeyEvent(), QWaylandQtTextInputMethod::setFocus(), QWaylandTextInputPrivate::setFocus(), and QWaylandTextInputV3Private::setFocus().

+ Here is the caller graph for this function:

Property Documentation

◆ bufferScale

QWaylandSurface::bufferScale
read

\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferScale

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

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.

Definition at line 49 of file qwaylandsurface.h.

Referenced by QWaylandQuickItem::updatePaintNode().

◆ bufferSize

QWaylandSurface::bufferSize
read

\qmlproperty size QtWayland.Compositor::WaylandSurface::bufferSize

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

For the size in surface coordinates, use \l destinationSize instead.

See also
destinationSize
bufferScale

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 \l destinationSize instead.

See also
destinationSize
bufferScale

Definition at line 48 of file qwaylandsurface.h.

Referenced by QWaylandSurfaceTextureProvider::setBufferRef().

◆ client

◆ contentOrientation

QWaylandSurface::contentOrientation
read

\qmlproperty enum QtWayland.Compositor::WaylandSurface::contentOrientation

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

See also
{WaylandOutput::transform}{WaylandOutput.transform}

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

See also
QWaylandOutput::transform

Definition at line 50 of file qwaylandsurface.h.

◆ cursorSurface

QWaylandSurface::cursorSurface
readwrite

\qmlproperty bool QtWayland.Compositor::WaylandSurface::cursorSurface

This property holds whether the WaylandSurface is a cursor surface.

This property holds whether the QWaylandSurface is a cursor surface.

Definition at line 53 of file qwaylandsurface.h.

Referenced by markAsCursorSurface().

◆ destinationSize

QWaylandSurface::destinationSize
read

\qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize

Since
5.13

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

See also
bufferScale
bufferSize
Since
5.13

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

See also
bufferScale
bufferSize

Definition at line 47 of file qwaylandsurface.h.

Referenced by QWaylandXdgSurfacePrivate::calculateFallbackWindowGeometry(), and QWaylandQuickItem::mapToSurface().

◆ hasContent

QWaylandSurface::hasContent
read

\qmlproperty bool QtWayland.Compositor::WaylandSurface::hasContent

This property holds whether the WaylandSurface has content.

This property holds whether the QWaylandSurface has content.

Definition at line 52 of file qwaylandsurface.h.

Referenced by QWaylandXdgShellPrivate::xdg_wm_base_get_xdg_surface().

◆ inhibitsIdle

QWaylandSurface::inhibitsIdle
read

\qmlproperty bool QtWayland.Compositor::WaylandSurface::inhibitsIdle

Since
5.14

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

See also
IdleInhibitManagerV1
Since
5.14

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

See also
QWaylandIdleInhibitManagerV1

Definition at line 54 of file qwaylandsurface.h.

◆ isOpaque

QWaylandSurface::isOpaque
read

\qmlproperty bool QtWayland.Compositor::WaylandSurface::isOpaque

Since
6.4

This property holds whether the surface is fully opaque, as reported by the client through the set_opaque_region request.

Since
6.4

This property holds whether the surface is fully opaque, as reported by the client through the set_opaque_region request.

Definition at line 55 of file qwaylandsurface.h.

Referenced by QWaylandSurfaceTextureProvider::setBufferRef().

◆ origin

QWaylandSurface::origin
read

\qmlproperty enum QtWayland.Compositor::WaylandSurface::origin

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

It can have the following values: \list

  • WaylandSurface.OriginTopLeft The origin is the top left corner of the buffer.
  • WaylandSurface.OriginBottomLeft The origin is the bottom left corner of the buffer. \endlist

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

Definition at line 51 of file qwaylandsurface.h.

◆ sourceGeometry

QWaylandSurface::sourceGeometry
read

\qmlproperty rect QtWayland.Compositor::WaylandSurface::sourceGeometry

Since
5.13

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

See also
bufferScale
bufferSize
destinationSize
Since
5.13

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 \l bufferScale.

See also
bufferScale
bufferSize
destinationSize

Definition at line 46 of file qwaylandsurface.h.

Referenced by QWaylandQuickItem::updatePaintNode().


The documentation for this class was generated from the following files: