KWayland::Server::SurfaceInterface

KWayland::Server::SurfaceInterface Class Reference

#include <surface_interface.h>

Inheritance diagram for KWayland::Server::SurfaceInterface:

Properties

QRegion damage
 
QRegion input
 
QRegion opaque
 
qint32 scale
 
QSize size
 
KWayland::Server::OutputInterface::Transform transform
 
- Properties inherited from QObject
 objectName
 

Signals

void blurChanged ()
 
void childSubSurfaceAdded (SubSurfaceInterface *subSurface)
 
void childSubSurfaceRemoved (SubSurfaceInterface *subSurface)
 
void committed ()
 
void contrastChanged ()
 
void damaged (const QRegion &)
 
void inhibitsIdleChanged ()
 
void inputChanged (const QRegion &)
 
void opaqueChanged (const QRegion &)
 
void pointerConstraintsChanged ()
 
void scaleChanged (qint32)
 
void shadowChanged ()
 
void sizeChanged ()
 
void slideOnShowHideChanged ()
 
void subSurfaceTreeChanged ()
 
void transformChanged (KWayland::Server::OutputInterface::Transform)
 
void unmapped ()
 
- Signals inherited from KWayland::Server::Resource
void aboutToBeUnbound ()
 
void unbound ()
 

Public Member Functions

QPointer< BlurInterfaceblur () const
 
QRect boundingRect () const
 
BufferInterfacebuffer ()
 
QList< QPointer< SubSurfaceInterface > > childSubSurfaces () const
 
QPointer< ConfinedPointerInterfaceconfinedPointer () const
 
QPointer< ContrastInterfacecontrast () const
 
QRegion damage () const
 
SurfaceInterfacedataProxy () const
 
void frameRendered (quint32 msec)
 
bool inhibitsIdle () const
 
QRegion input () const
 
bool inputIsInfinite () const
 
bool inputIsInfitine () const
 
SurfaceInterfaceinputSurfaceAt (const QPointF &position)
 
bool isMapped () const
 
QPointer< LockedPointerInterfacelockedPointer () const
 
QPoint offset () const
 
QRegion opaque () const
 
QVector< OutputInterface * > outputs () const
 
void resetTrackedDamage ()
 
qint32 scale () const
 
void setDataProxy (SurfaceInterface *surface)
 
void setOutputs (const QVector< OutputInterface * > &outputs)
 
QPointer< ShadowInterfaceshadow () const
 
QSize size () const
 
QPointer< SlideInterfaceslideOnShowHide () const
 
QPointer< SubSurfaceInterfacesubSurface () const
 
SurfaceInterfacesurfaceAt (const QPointF &position)
 
QRegion trackedDamage () const
 
OutputInterface::Transform transform () const
 
- Public Member Functions inherited from KWayland::Server::Resource
ClientConnectionclient ()
 
void create (ClientConnection *client, quint32 version, quint32 id)
 
Globalglobal ()
 
quint32 id () const
 
wl_resource * parentResource () const
 
wl_resource * resource ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static SurfaceInterfaceget (wl_resource *native)
 
static SurfaceInterfaceget (quint32 id, const ClientConnection *client)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from KWayland::Server::Resource
 Resource (Private *d, QObject *parent=nullptr)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Attributes inherited from KWayland::Server::Resource
QScopedPointer< Private > d
 

Detailed Description

Resource representing a wl_surface.

The SurfaceInterface gets created by the CompositorInterface. A SurfaceInterface normally takes up a role by being "attached" to either a ShellSurfaceInterface, a SubSurfaceInterface or a Cursor.

The implementation of the SurfaceInterface does not only wrap the features exposed by wl_surface, but goes further by integrating the information added to a SurfaceInterface by other interfaces. This should make interacting from the server easier, it only needs to monitor the SurfaceInterface and does not need to track each specific interface.

The SurfaceInterface takes care of reference/unreferencing the BufferInterface attached to it. As long as a BufferInterface is attached, the released signal won't be sent. If the BufferInterface is no longer needed by the SurfaceInterface, it will get unreferenced and might be automatically deleted (if it's no longer referenced).

See also
CompositorInterface
BufferInterface
SubSurfaceInterface
BlurInterface
ContrastInterface
ShadowInterface
SlideInterface

Definition at line 62 of file surface_interface.h.

Property Documentation

QRegion KWayland::Server::SurfaceInterface::damage
read

The current damage region.

Definition at line 68 of file surface_interface.h.

QRegion KWayland::Server::SurfaceInterface::input
read

The current input region.

Definition at line 76 of file surface_interface.h.

QRegion KWayland::Server::SurfaceInterface::opaque
read

The opaque region for a translucent buffer.

Definition at line 72 of file surface_interface.h.

Member Function Documentation

QPointer< BlurInterface > KWayland::Server::SurfaceInterface::blur ( ) const
Returns
The Blur for this Surface.
Since
5.5

Definition at line 792 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::blurChanged ( )
signal
Since
5.5
QRect KWayland::Server::SurfaceInterface::boundingRect ( ) const

Returns the rectangle that bounds this surface and all of its sub-surfaces.

QPoint(0, 0) corresponds to the upper left corner of this surface.

Since
5.69

Definition at line 773 of file surface_interface.cpp.

BufferInterface * KWayland::Server::SurfaceInterface::buffer ( )
Returns
the current BufferInterface, might be nullptr.

Definition at line 729 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::childSubSurfaceAdded ( SubSurfaceInterface subSurface)
signal

Emitted whenever a new child sub-surface subSurface is added.

Since
5.70
void KWayland::Server::SurfaceInterface::childSubSurfaceRemoved ( SubSurfaceInterface subSurface)
signal

Emitted whenver the child sub-surface subSurface is removed.

Since
5.70
QList< QPointer< SubSurfaceInterface > > KWayland::Server::SurfaceInterface::childSubSurfaces ( ) const
Returns
Children in stacking order from bottom (first) to top (last).

Definition at line 751 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::committed ( )
signal

Emitted when the Surface has been committed.

This signal is emitted after all the relevant damage and xyzChanged signals for this commit are emitted.

Since
5.54
QPointer< ConfinedPointerInterface > KWayland::Server::SurfaceInterface::confinedPointer ( ) const

Pointer confinement installed on this SurfaceInterface.

See also
pointerConstraintsChanged
Since
5.29

Definition at line 938 of file surface_interface.cpp.

QPointer< ContrastInterface > KWayland::Server::SurfaceInterface::contrast ( ) const
Returns
The Contrast for this Surface.
Since
5.5

Definition at line 798 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::contrastChanged ( )
signal
Since
5.5
void KWayland::Server::SurfaceInterface::damaged ( const QRegion )
signal

Emitted whenever the SurfaceInterface got damaged.

The signal is only emitted during the commit of state. A damage means that a new BufferInterface got attached.

See also
buffer
damage
SurfaceInterface * KWayland::Server::SurfaceInterface::dataProxy ( ) const

Returns the data proxy of this SurfaceInterface or null if there is none set.

Since
5.56

Definition at line 956 of file surface_interface.cpp.

SurfaceInterface * KWayland::Server::SurfaceInterface::get ( wl_resource *  native)
static
Returns
The SurfaceInterface for the native resource.

Definition at line 741 of file surface_interface.cpp.

SurfaceInterface * KWayland::Server::SurfaceInterface::get ( quint32  id,
const ClientConnection client 
)
static
Returns
The SurfaceInterface with given id for client, if it exists, otherwise nullptr.
Since
5.3

Definition at line 746 of file surface_interface.cpp.

bool KWayland::Server::SurfaceInterface::inhibitsIdle ( ) const
Returns
Whether this SurfaceInterface wants idle to be inhibited on the Output it is shown
See also
inhibitsIdleChanged
Since
5.41

Definition at line 944 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::inhibitsIdleChanged ( )
signal

Emitted whenever the SurfaceInterface starts/ends to inhibit idle.

See also
inhibitsIdle
Since
5.41
bool KWayland::Server::SurfaceInterface::inputIsInfinite ( ) const

Replaces Surface::inputIsInfitine instead.

Since
5.5

Definition at line 711 of file surface_interface.cpp.

bool KWayland::Server::SurfaceInterface::inputIsInfitine ( ) const

Use Surface::inputIsInfinite instead.

Deprecated:
Since 5.5, use inputIsInfinite

Definition at line 706 of file surface_interface.cpp.

SurfaceInterface * KWayland::Server::SurfaceInterface::inputSurfaceAt ( const QPointF position)

Finds the input receiving SurfaceInterface at the given position in surface-local coordinates.

This can be either a descendant SurfaceInterface honoring the stacking order or the SurfaceInterface itself if its geometry contains the given position.

If no such SurfaceInterface is found, e.g. because the SurfaceInterface is unmapped or there is no input region containing the position, nullptr is returned.

Parameters
positionThe position in surface-local coordinates
Returns
Input receiving child surface at the given position or surface itself at the position, might be nullptr
Since
5.52

Definition at line 903 of file surface_interface.cpp.

bool KWayland::Server::SurfaceInterface::isMapped ( ) const

Whether the SurfaceInterface is currently considered to be mapped.

A SurfaceInterface is mapped if it has a non-null BufferInterface attached. If the SurfaceInterface references a SubSurfaceInterface it is only considered mapped if it has a BufferInterface attached and the parent SurfaceInterface is mapped.

Returns
Whether the SurfaceInterface is currently mapped
Since
5.22

Definition at line 810 of file surface_interface.cpp.

QPointer< LockedPointerInterface > KWayland::Server::SurfaceInterface::lockedPointer ( ) const

Pointer lock installed on this SurfaceInterface.

See also
pointerConstraintsChanged
Since
5.29

Definition at line 932 of file surface_interface.cpp.

QVector< OutputInterface * > KWayland::Server::SurfaceInterface::outputs ( ) const
Returns
All OutputInterfaces the SurfaceInterface is on.
See also
setOutputs
Since
5.27

Definition at line 833 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::pointerConstraintsChanged ( )
signal

Emitted whenever a pointer constraint get (un)installed on this SurfaceInterface.

The pointer constraint does not get activated, the compositor needs to activate the lock/confinement.

See also
confinedPointer
lockedPointer
Since
5.29
void KWayland::Server::SurfaceInterface::resetTrackedDamage ( )

Reset the damage tracking.

The compositor should invoke this method once it updated it's internal state and processed the current damage.

See also
trackedDamage
Since
5.22

Definition at line 827 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::setDataProxy ( SurfaceInterface surface)

Set surface as a data proxy for this SurfaceInterface.

This enables the proxy to conduct drags on the surface's client behalf.

Setting a data proxy is only allowed when the client owning this surface has not created a data device itself.

Since
5.56

Definition at line 950 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::setOutputs ( const QVector< OutputInterface * > &  outputs)

Sets the outputs this SurfaceInterface overlaps with, may be empty.

The compositor should update whenever the SurfaceInterface becomes visible on an OutputInterface by e.g. getting (un)mapped, resized, moved, etc.

See also
outputs
Since
5.27

Definition at line 839 of file surface_interface.cpp.

QPointer< ShadowInterface > KWayland::Server::SurfaceInterface::shadow ( ) const
Returns
The Shadow for this Surface.
Since
5.4

Definition at line 786 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::shadowChanged ( )
signal
Since
5.4
QSize KWayland::Server::SurfaceInterface::size ( ) const

The size of the Surface in global compositor space.

See also
For buffer size use BufferInterface::size from SurfaceInterface::buffer
Since
5.3
void KWayland::Server::SurfaceInterface::sizeChanged ( )
signal
Since
5.3
QPointer< SlideInterface > KWayland::Server::SurfaceInterface::slideOnShowHide ( ) const
Returns
The Slide for this Surface.
Since
5.5

Definition at line 804 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::slideOnShowHideChanged ( )
signal
Since
5.5
QPointer< SubSurfaceInterface > KWayland::Server::SurfaceInterface::subSurface ( ) const
Returns
The SubSurface for this Surface in case there is one.

Definition at line 757 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::subSurfaceTreeChanged ( )
signal

Emitted whenever the tree of sub-surfaces changes in a way which requires a repaint.

Since
5.22
SurfaceInterface * KWayland::Server::SurfaceInterface::surfaceAt ( const QPointF position)

Finds the SurfaceInterface at the given position in surface-local coordinates.

This can be either a descendant SurfaceInterface honoring the stacking order or the SurfaceInterface itself if its geometry contains the given position.

If no such SurfaceInterface is found, e.g. because the SurfaceInterface is unmapped, nullptr is returned.

Parameters
positionThe position in surface-local coordinates
Returns
Child surface at the given position or surface itself at the position, might be nullptr
Since
5.22

Definition at line 877 of file surface_interface.cpp.

QRegion KWayland::Server::SurfaceInterface::trackedDamage ( ) const

Returns the tracked damage since the last call to resetTrackedDamage.

In contrast to damage this method does not reset the damage when a new BufferInterface gets committed. This allows a compositor to properly track the damage over multiple commits even if it didn't render each new BufferInterface.

The damage gets reset whenever resetTrackedDamage is called. This allows a compositor to properly track the change in its rendering scene for this SurfaceInterface. After it updates its internal state (e.g. by creating an OpenGL texture from the BufferInterface) it can invoke resetTrackedDamage and the damage tracker will start to track further damage changes.

Returns
Combined damage since last call to resetTrackedDamage
See also
damage
resetTrackedDamage
Since
5.22

Definition at line 821 of file surface_interface.cpp.

void KWayland::Server::SurfaceInterface::unmapped ( )
signal

Emitted when the Surface removes its content.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 22:48:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.