KWayland::Client::PlasmaShellSurface

KWayland::Client::PlasmaShellSurface Class Reference

#include <plasmashell.h>

Inheritance diagram for KWayland::Client::PlasmaShellSurface:

Public Types

enum  PanelBehavior { AlwaysVisible, AutoHide, WindowsCanCover, WindowsGoBelow }
 
enum  Role {
  Role::Normal, Role::Desktop, Role::Panel, Role::OnScreenDisplay,
  Role::Notification, Role::ToolTip, Role::CriticalNotification
}
 

Signals

void autoHidePanelHidden ()
 
void autoHidePanelShown ()
 

Public Member Functions

 PlasmaShellSurface (QObject *parent)
 
void destroy ()
 
bool isValid () const
 
 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)
 
- 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 PlasmaShellSurfaceget (Surface *surf)
 
- 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

- Properties inherited from QObject
 objectName
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- 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)
 

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

Describes how a PlasmaShellSurface with role Role::Panel should behave.

See also
Role

Definition at line 257 of file plasmashell.h.

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.

Since
5.24
ToolTip 

The Surface represents a tooltip.

Since
5.24
CriticalNotification 

The Surface represents a critical notification, like battery is running out.

Since
5.58

Definition at line 229 of file plasmashell.h.

Member Function Documentation

void KWayland::Client::PlasmaShellSurface::autoHidePanelHidden ( )
signal

Emitted when the compositor hided an auto hiding panel.

See also
requestHideAutoHidingPanel
autoHidePanelShown
requestShowAutoHidingPanel
Since
5.28
void KWayland::Client::PlasmaShellSurface::autoHidePanelShown ( )
signal

Emitted when the compositor showed an auto hiding panel.

See also
requestHideAutoHidingPanel
autoHidePanelHidden
requestShowAutoHidingPanel
Since
5.28
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 206 of file plasmashell.cpp.

PlasmaShellSurface * KWayland::Client::PlasmaShellSurface::get ( Surface surf)
static
Returns
the PlasmaShellSurface * associated with surface, if any, nullptr if not found.
Since
5.6

Definition at line 216 of file plasmashell.cpp.

bool KWayland::Client::PlasmaShellSurface::isValid ( ) const
Returns
true if managing a org_kde_plasma_surface.

Definition at line 225 of file plasmashell.cpp.

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 201 of file plasmashell.cpp.

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.

See also
autoHidePanelHidden
autoHidePanelShown
requestShowAutoHidingPanel
Since
5.28

Definition at line 324 of file plasmashell.cpp.

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.

See also
autoHidePanelHidden
autoHidePanelShown
requestHideAutoHidingPanel
Since
5.28

Definition at line 329 of file plasmashell.cpp.

PlasmaShellSurface::Role KWayland::Client::PlasmaShellSurface::role ( ) const
Returns
The requested Role, default value is Role::Normal.
See also
setRole

Definition at line 285 of file plasmashell.cpp.

void KWayland::Client::PlasmaShellSurface::setPanelBehavior ( PlasmaShellSurface::PanelBehavior  behavior)

Sets the PanelBehavior for a PlasmaShellSurface with Role Role::Panel.

See also
setRole

Definition at line 290 of file plasmashell.cpp.

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
takesFocusSet to true if the surface should gain focus.
Since
5.28

Definition at line 334 of file plasmashell.cpp.

void KWayland::Client::PlasmaShellSurface::setPosition ( const QPoint point)

Requests to position this PlasmaShellSurface at point in global coordinates.

Definition at line 240 of file plasmashell.cpp.

void KWayland::Client::PlasmaShellSurface::setRole ( PlasmaShellSurface::Role  role)

Changes the requested Role to role.

See also
role

Definition at line 246 of file plasmashell.cpp.

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 319 of file plasmashell.cpp.

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 314 of file plasmashell.cpp.

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 211 of file plasmashell.cpp.


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:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.