KWayland::Client::PlasmaShellSurface
#include <plasmashell.h>

Public Types | |
enum | PanelBehavior { AlwaysVisible, AutoHide, WindowsCanCover, WindowsGoBelow } |
enum | Role { Role::Normal, Role::Desktop, Role::Panel, Role::OnScreenDisplay, Role::Notification, Role::ToolTip, Role::CriticalNotification, Role::AppletPopup } |
Signals | |
void | autoHidePanelHidden () |
void | autoHidePanelShown () |
Public Member Functions | |
PlasmaShellSurface (QObject *parent) | |
void | destroy () |
bool | isValid () const |
void | openUnderCursor () |
operator org_kde_plasma_surface * () | |
operator org_kde_plasma_surface * () const | |
void | release () |
void | requestHideAutoHidingPanel () |
void | requestShowAutoHidingPanel () |
Role | role () const |
void | setPanelBehavior (PanelBehavior behavior) |
void | setPanelTakesFocus (bool takesFocus) |
void | setPosition (const QPoint &point) |
void | setRole (Role role) |
void | setSkipSwitcher (bool skip) |
void | setSkipTaskbar (bool skip) |
void | setup (org_kde_plasma_surface *surface) |
![]() | |
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 PlasmaShellSurface * | get (Surface *surf) |
![]() | |
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 | |
![]() | |
objectName | |
![]() | |
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 org_kde_plasma_surface interface.
This class is a convenient wrapper for the org_kde_plasma_surface interface.
To create an instance use PlasmaShell::createSurface.
A PlasmaShellSurface is a privileged Surface which can add further hints to the Wayland server about it's position and the usage role. The Wayland server is allowed to ignore all requests.
Even if a PlasmaShellSurface is created for a Surface a normal ShellSurface (or similar) needs to be created to have the Surface mapped as a window by the Wayland server.
- See also
- PlasmaShell
- Surface
Definition at line 173 of file plasmashell.h.
Member Enumeration Documentation
◆ PanelBehavior
Describes how a PlasmaShellSurface with role Role::Panel
should behave.
- See also
- Role
Definition at line 266 of file plasmashell.h.
◆ Role
|
strong |
Describes possible roles this PlasmaShellSurface can have.
The role can be used by the Wayland server to e.g. change the stacking order accordingly.
Enumerator | |
---|---|
Normal | A normal Surface. |
Desktop | The Surface represents a desktop, normally stacked below all other surfaces. |
Panel | The Surface represents a panel (dock), normally stacked above normal surfaces. |
OnScreenDisplay | The Surface represents an on screen display, like a volume changed notification. |
Notification | The Surface represents a notification.
|
ToolTip | The Surface represents a tooltip.
|
CriticalNotification | The Surface represents a critical notification, like battery is running out.
|
AppletPopup | The Surface used for applets. |
Definition at line 229 of file plasmashell.h.
Member Function Documentation
◆ autoHidePanelHidden
|
signal |
Emitted when the compositor hid an auto hiding panel.
- Since
- 5.28
◆ autoHidePanelShown
|
signal |
Emitted when the compositor showed an auto hiding panel.
- Since
- 5.28
◆ destroy()
void KWayland::Client::PlasmaShellSurface::destroy | ( | ) |
Destroys the data held by this PlasmaShellSurface.
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 org_kde_plasma_surface interface once there is a new connection available.
This method is automatically invoked when the PlasmaShell which created this PlasmaShellSurface gets destroyed.
- See also
- release
Definition at line 202 of file plasmashell.cpp.
◆ get()
|
static |
- Returns
- the PlasmaShellSurface * associated with surface, if any, nullptr if not found.
- Since
- 5.6
Definition at line 212 of file plasmashell.cpp.
◆ isValid()
bool KWayland::Client::PlasmaShellSurface::isValid | ( | ) | const |
- Returns
true
if managing a org_kde_plasma_surface.
Definition at line 221 of file plasmashell.cpp.
◆ openUnderCursor()
void KWayland::Client::PlasmaShellSurface::openUnderCursor | ( | ) |
Request that the initial position of this surface will be under the cursor.
Has to be called before attaching any buffer to the corresponding surface.
- Since
- 5.94
Definition at line 242 of file plasmashell.cpp.
◆ release()
void KWayland::Client::PlasmaShellSurface::release | ( | ) |
Releases the org_kde_plasma_surface interface.
After the interface has been released the PlasmaShellSurface instance is no longer valid and can be setup with another org_kde_plasma_surface interface.
This method is automatically invoked when the PlasmaShell which created this PlasmaShellSurface gets released.
Definition at line 197 of file plasmashell.cpp.
◆ requestHideAutoHidingPanel()
void KWayland::Client::PlasmaShellSurface::requestHideAutoHidingPanel | ( | ) |
Requests to hide a surface with Role Panel and PanelBahvior AutoHide.
Once the compositor has hidden the panel the signal autoHidePanelHidden gets emitted. Once it is shown again the signal autoHidePanelShown gets emitted.
To show the surface again from client side use requestShowAutoHidingPanel.
- Since
- 5.28
Definition at line 336 of file plasmashell.cpp.
◆ requestShowAutoHidingPanel()
void KWayland::Client::PlasmaShellSurface::requestShowAutoHidingPanel | ( | ) |
Requests to show a surface with Role Panel and PanelBahvior AutoHide.
This request allows the client to show a surface which it previously requested to be hidden with requestHideAutoHidingPanel.
- Since
- 5.28
Definition at line 341 of file plasmashell.cpp.
◆ role()
PlasmaShellSurface::Role KWayland::Client::PlasmaShellSurface::role | ( | ) | const |
- Returns
- The requested Role, default value is
Role::Normal
.
- See also
- setRole
Definition at line 297 of file plasmashell.cpp.
◆ setPanelBehavior()
void KWayland::Client::PlasmaShellSurface::setPanelBehavior | ( | PlasmaShellSurface::PanelBehavior | behavior | ) |
Sets the PanelBehavior for a PlasmaShellSurface with Role Role::Panel
.
- See also
- setRole
Definition at line 302 of file plasmashell.cpp.
◆ setPanelTakesFocus()
void KWayland::Client::PlasmaShellSurface::setPanelTakesFocus | ( | bool | takesFocus | ) |
Set whether a PlasmaShellSurface should get focus or not.
By default some roles do not take focus. With this request the compositor can be instructed to also pass focus.
- Parameters
-
takesFocus Set to true
if the surface should gain focus.
- Since
- 5.28
Definition at line 346 of file plasmashell.cpp.
◆ setPosition()
void KWayland::Client::PlasmaShellSurface::setPosition | ( | const QPoint & | point | ) |
Requests to position this PlasmaShellSurface at point
in global coordinates.
Definition at line 236 of file plasmashell.cpp.
◆ setRole()
void KWayland::Client::PlasmaShellSurface::setRole | ( | PlasmaShellSurface::Role | role | ) |
◆ setSkipSwitcher()
void KWayland::Client::PlasmaShellSurface::setSkipSwitcher | ( | bool | skip | ) |
Setting this bit on a window will indicate it does not prefer to be included in a window switcher.
- Since
- 5.47
Definition at line 331 of file plasmashell.cpp.
◆ setSkipTaskbar()
void KWayland::Client::PlasmaShellSurface::setSkipTaskbar | ( | bool | skip | ) |
Setting this bit to the window, will make it say it prefers to not be listed in the taskbar.
Taskbar implementations may or may not follow this hint.
- Since
- 5.5
Definition at line 326 of file plasmashell.cpp.
◆ setup()
void KWayland::Client::PlasmaShellSurface::setup | ( | org_kde_plasma_surface * | surface | ) |
Setup this PlasmaShellSurface to manage the surface
.
There is normally no need to call this method as it's invoked by PlasmaShell::createSurface.
Definition at line 207 of file plasmashell.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jan 31 2023 03:53:29 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.