KWayland::Server::SurfaceInterface
#include <surface_interface.h>

Properties | |
QRegion | damage |
QRegion | input |
QRegion | opaque |
qint32 | scale |
QSize | size |
KWayland::Server::OutputInterface::Transform | transform |
![]() | |
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 () |
![]() | |
void | aboutToBeUnbound () |
void | unbound () |
Public Member Functions | |
QPointer< BlurInterface > | blur () const |
QRect | boundingRect () const |
BufferInterface * | buffer () |
QList< QPointer< SubSurfaceInterface > > | childSubSurfaces () const |
QPointer< ConfinedPointerInterface > | confinedPointer () const |
QPointer< ContrastInterface > | contrast () const |
QRegion | damage () const |
SurfaceInterface * | dataProxy () const |
void | frameRendered (quint32 msec) |
bool | inhibitsIdle () const |
QRegion | input () const |
bool | inputIsInfinite () const |
bool | inputIsInfitine () const |
SurfaceInterface * | inputSurfaceAt (const QPointF &position) |
bool | isMapped () const |
QPointer< LockedPointerInterface > | lockedPointer () 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< ShadowInterface > | shadow () const |
QSize | size () const |
QPointer< SlideInterface > | slideOnShowHide () const |
QPointer< SubSurfaceInterface > | subSurface () const |
SurfaceInterface * | surfaceAt (const QPointF &position) |
QRegion | trackedDamage () const |
OutputInterface::Transform | transform () const |
![]() | |
ClientConnection * | client () |
void | create (ClientConnection *client, quint32 version, quint32 id) |
Global * | global () |
quint32 | id () const |
wl_resource * | parentResource () const |
wl_resource * | resource () |
![]() | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QString &name, 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 QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () 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 | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
T | qobject_cast (const QObject *object) |
T | qobject_cast (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) |
QThread * | thread () const const |
Static Public Member Functions | |
static SurfaceInterface * | get (quint32 id, const ClientConnection *client) |
static SurfaceInterface * | get (wl_resource *native) |
![]() | |
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 *context, Functor functor, 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) |
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, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
![]() | |
typedef | QObjectList |
![]() | |
Resource (Private *d, QObject *parent=nullptr) | |
![]() | |
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 |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
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
◆ damage
|
read |
The current damage region.
Definition at line 68 of file surface_interface.h.
◆ input
|
read |
The current input region.
Definition at line 76 of file surface_interface.h.
◆ opaque
|
read |
The opaque region for a translucent buffer.
Definition at line 72 of file surface_interface.h.
Member Function Documentation
◆ blur()
QPointer< BlurInterface > KWayland::Server::SurfaceInterface::blur | ( | ) | const |
◆ blurChanged
|
signal |
- Since
- 5.5
◆ boundingRect()
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 757 of file surface_interface.cpp.
◆ buffer()
BufferInterface * KWayland::Server::SurfaceInterface::buffer | ( | ) |
- Returns
- the current BufferInterface, might be
nullptr
.
Definition at line 713 of file surface_interface.cpp.
◆ childSubSurfaceAdded
|
signal |
Emitted whenever a new child sub-surface subSurface
is added.
- Since
- 5.70
◆ childSubSurfaceRemoved
|
signal |
Emitted whenever the child sub-surface subSurface
is removed.
- Since
- 5.70
◆ childSubSurfaces()
QList< QPointer< SubSurfaceInterface > > KWayland::Server::SurfaceInterface::childSubSurfaces | ( | ) | const |
- Returns
- Children in stacking order from bottom (first) to top (last).
Definition at line 735 of file surface_interface.cpp.
◆ 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
◆ confinedPointer()
QPointer< ConfinedPointerInterface > KWayland::Server::SurfaceInterface::confinedPointer | ( | ) | const |
Pointer confinement installed on this SurfaceInterface.
- See also
- pointerConstraintsChanged
- Since
- 5.29
Definition at line 922 of file surface_interface.cpp.
◆ contrast()
QPointer< ContrastInterface > KWayland::Server::SurfaceInterface::contrast | ( | ) | const |
- Returns
- The Contrast for this Surface.
- Since
- 5.5
Definition at line 782 of file surface_interface.cpp.
◆ contrastChanged
|
signal |
- Since
- 5.5
◆ damaged
|
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.
◆ dataProxy()
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 940 of file surface_interface.cpp.
◆ get() [1/2]
|
static |
- Returns
- The SurfaceInterface with given
id
forclient
, if it exists, otherwisenullptr
.
- Since
- 5.3
Definition at line 730 of file surface_interface.cpp.
◆ get() [2/2]
|
static |
- Returns
- The SurfaceInterface for the
native
resource.
Definition at line 725 of file surface_interface.cpp.
◆ inhibitsIdle()
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 928 of file surface_interface.cpp.
◆ inhibitsIdleChanged
|
signal |
◆ inputIsInfinite()
bool KWayland::Server::SurfaceInterface::inputIsInfinite | ( | ) | const |
Replaces Surface::inputIsInfitine instead.
- Since
- 5.5
Definition at line 695 of file surface_interface.cpp.
◆ inputIsInfitine()
bool KWayland::Server::SurfaceInterface::inputIsInfitine | ( | ) | const |
Use Surface::inputIsInfinite instead.
- Deprecated:
- Since 5.5, use inputIsInfinite
Definition at line 690 of file surface_interface.cpp.
◆ inputSurfaceAt()
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
-
position The position in surface-local coordinates
- Returns
- Input receiving child surface at the given
position
or surface itself at the position, might benullptr
- Since
- 5.52
Definition at line 888 of file surface_interface.cpp.
◆ isMapped()
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 794 of file surface_interface.cpp.
◆ lockedPointer()
QPointer< LockedPointerInterface > KWayland::Server::SurfaceInterface::lockedPointer | ( | ) | const |
Pointer lock installed on this SurfaceInterface.
- See also
- pointerConstraintsChanged
- Since
- 5.29
Definition at line 916 of file surface_interface.cpp.
◆ outputs()
QVector< OutputInterface * > KWayland::Server::SurfaceInterface::outputs | ( | ) | const |
- Returns
- All OutputInterfaces the SurfaceInterface is on.
- See also
- setOutputs
- Since
- 5.27
Definition at line 817 of file surface_interface.cpp.
◆ 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
◆ resetTrackedDamage()
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 811 of file surface_interface.cpp.
◆ setDataProxy()
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 934 of file surface_interface.cpp.
◆ setOutputs()
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 823 of file surface_interface.cpp.
◆ shadow()
QPointer< ShadowInterface > KWayland::Server::SurfaceInterface::shadow | ( | ) | const |
◆ shadowChanged
|
signal |
- Since
- 5.4
◆ size()
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
◆ sizeChanged
|
signal |
- Since
- 5.3
◆ slideOnShowHide()
QPointer< SlideInterface > KWayland::Server::SurfaceInterface::slideOnShowHide | ( | ) | const |
◆ slideOnShowHideChanged
|
signal |
- Since
- 5.5
◆ subSurface()
QPointer< SubSurfaceInterface > KWayland::Server::SurfaceInterface::subSurface | ( | ) | const |
- Returns
- The SubSurface for this Surface in case there is one.
Definition at line 741 of file surface_interface.cpp.
◆ subSurfaceTreeChanged
|
signal |
Emitted whenever the tree of sub-surfaces changes in a way which requires a repaint.
- Since
- 5.22
◆ surfaceAt()
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
-
position The position in surface-local coordinates
- Returns
- Child surface at the given
position
or surface itself at the position, might benullptr
- Since
- 5.22
Definition at line 862 of file surface_interface.cpp.
◆ trackedDamage()
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 805 of file surface_interface.cpp.
◆ unmapped
|
signal |
Emitted when the Surface removes its content.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 03:54:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.