KWayland::Client::ShellSurface
#include <shell.h>

Public Types | |
enum | TransientFlag { TransientFlag::Default = 0x0, TransientFlag::NoFocus = 0x1 } |
typedef QFlags< TransientFlag > | TransientFlags |
Properties | |
QSize | size |
![]() | |
objectName | |
Signals | |
void | pinged () |
void | popupDone () |
void | sizeChanged (const QSize &) |
Public Member Functions | |
ShellSurface (QObject *parent) | |
void | destroy () |
bool | isValid () const |
operator wl_shell_surface * () | |
operator wl_shell_surface * () const | |
void | release () |
void | requestMove (Seat *seat, quint32 serial) |
void | requestResize (Seat *seat, quint32 serial, Qt::Edges edges) |
void | setFullscreen (Output *output=nullptr) |
void | setMaximized (Output *output=nullptr) |
void | setSize (const QSize &size) |
void | setTitle (const QString &title) |
void | setToplevel () |
void | setTransient (Surface *parent, const QPoint &offset=QPoint(), TransientFlags flags=TransientFlag::Default) |
void | setTransientPopup (Surface *parent, Seat *grabbedSeat, quint32 grabSerial, const QPoint &offset=QPoint(), TransientFlags flags=TransientFlag::Default) |
void | setup (wl_shell_surface *surface) |
void | setWindowClass (const QByteArray &windowClass) |
QSize | size () const |
![]() | |
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 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 |
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 (QObject *object) |
T | 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) |
QThread * | thread () const const |
Static Public Member Functions | |
static ShellSurface * | fromQtWinId (WId wid) |
static ShellSurface * | fromWindow (QWindow *window) |
static ShellSurface * | get (wl_shell_surface *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 *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 | |
![]() | |
typedef | QObjectList |
![]() | |
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) |
Detailed Description
Wrapper for the wl_shell_surface interface.
This class is a convenient wrapper for the wl_shell_surface interface.
To create an instance use Shell::createSurface.
Member Enumeration Documentation
|
strong |
Flags which can be passed to a transient surface.
- See also
- setTransient
- Since
- 5.5
Enumerator | |
---|---|
Default |
Default: transient surface accepts keyboard focus. |
NoFocus |
Transient surface does not accept keyboard focus. |
Property Documentation
|
readwrite |
The size of the ShellSurface.
Member Function Documentation
void KWayland::Client::ShellSurface::destroy | ( | ) |
Destroys the data held by this ShellSurface.
This method is supposed to be used when the connection to the Wayland server goes away. If the connection is not valid anymore, it's not possible to call release anymore as that calls into the Wayland connection and the call would fail. This method cleans up the data, so that the instance can be deleted or set up to a new wl_shell_surface interface once there is a new connection available.
This method is automatically invoked when the Shell which created this ShellSurface gets destroyed.
- See also
- release
|
static |
Creates a ShellSurface for the given winId
.
This is an integration feature for QtWayland. On non-wayland platforms this method returns nullptr
as well as for not created QWindows.
The returned ShellSurface will be fully setup, but won't be released. It gets automatically destroyed together with the QWindow corresponding the wid
.
- Since
- 5.28
|
static |
Creates a ShellSurface for the given window
.
This is an integration feature for QtWayland. On non-wayland platforms this method returns nullptr
as well as for not created QWindows.
The returned ShellSurface will be fully setup, but won't be released. It gets automatically destroyed together with the window
.
- Since
- 5.28
|
static |
|
signal |
Signal is emitted when the ShellSurface received a ping request.
The ShellSurface automatically responds to the ping.
|
signal |
The popupDone signal is sent out when a popup grab is broken, that is, when the user clicks a surface that doesn't belong to the client owning the popup surface.
- See also
- setTransientPopup
- Since
- 5.33
void KWayland::Client::ShellSurface::release | ( | ) |
Releases the wl_shell_surface interface.
After the interface has been released the ShellSurface instance is no longer valid and can be setup with another wl_shell_surface interface.
This method is automatically invoked when the Shell which created this ShellSurface gets released.
void KWayland::Client::ShellSurface::requestMove | ( | Seat * | seat, |
quint32 | serial | ||
) |
Requests a resize on the given seat
after the pointer button press with the given serial
.
- Parameters
-
seat The seat on which to resize the window serial The serial of the pointer button press which should trigger the resize edges A hint for the compositor to set e.g. an appropriate cursor image
- Since
- 5.5
void KWayland::Client::ShellSurface::setFullscreen | ( | Output * | output = nullptr | ) |
Sets the ShellSurface fullscreen on output
.
void KWayland::Client::ShellSurface::setTitle | ( | const QString & | title | ) |
void KWayland::Client::ShellSurface::setTransient | ( | Surface * | parent, |
const QPoint & | offset = QPoint() , |
||
TransientFlags | flags = TransientFlag::Default |
||
) |
void KWayland::Client::ShellSurface::setTransientPopup | ( | Surface * | parent, |
Seat * | grabbedSeat, | ||
quint32 | grabSerial, | ||
const QPoint & | offset = QPoint() , |
||
TransientFlags | flags = TransientFlag::Default |
||
) |
Sets this Surface as a popup transient for parent
.
A popup is a transient with an added pointer grab on the grabbedSeat
.
The popup grab can be created if the client has an implicit grab (e.g. button press) on the grabbedSeat
. It needs to pass the grabSerial
indicating the implicit grab to the request for setting the surface. The implicit grab is turned into a popup grab which will persist after the implicit grab ends. The popup grab ends when the ShellSurface gets destroyed or when the compositor breaks the grab through the popupDone signal.
- Parameters
-
parent The parent Surface of this ShellSurface grabbedSeat The Seat on which an implicit grab exists grabSerial The serial of the implicit grab offset The offset of this Surface in the parent coordinate system flags The flags for the transient
- Since
- 5.33
void KWayland::Client::ShellSurface::setup | ( | wl_shell_surface * | surface | ) |
Setup this ShellSurface to manage the surface
.
There is normally no need to call this method as it's invoked by Shell::createSurface.
void KWayland::Client::ShellSurface::setWindowClass | ( | const QByteArray & | windowClass | ) |
Sets a window class for the surface.
The surface class identifies the general class of applications to which the surface belongs. A common convention is to use the file name (or the full path if it is a non-standard location) of the application's .desktop file as the class.
- Since
- 5.55
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Mar 7 2021 22:50:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.